Skip to content

Commit

Permalink
feat: extract file.Storage type
Browse files Browse the repository at this point in the history
  • Loading branch information
bounoable committed Oct 19, 2022
1 parent 5373d37 commit 8d99aa3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
7 changes: 7 additions & 0 deletions file/storage.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package file

// Storage provides the storage information of a file.
type Storage struct {
Provider string `json:"provider"`
Path string `json:"path"`
}
7 changes: 2 additions & 5 deletions image/image.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package image

import (
"github.com/modernice/media-entity/file"
"github.com/modernice/media-entity/internal/maps"
"github.com/modernice/media-tools/image"
)
Expand All @@ -24,11 +25,7 @@ func NewTags(tags ...string) Tags {
return image.NewTags(tags...)
}

// Storage provides the storage information for an [Image].
type Storage struct {
Provider string `json:"provider"`
Path string `json:"path"`
}
type Storage = file.Storage

// Dimensions are the width and height of an image, in pixels.
type Dimensions = image.Dimensions
Expand Down

0 comments on commit 8d99aa3

Please sign in to comment.