Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("Image does not exist")
)
Errors
Functions ¶
This section is empty.
Types ¶
type Image ¶
type Image struct { ID string `json:"id"` Author string `json:"author"` Width int `json:"width"` Height int `json:"height"` URL string `json:"url"` }
Image contains metadata about an image
type Provider ¶
type Provider interface { Get(ctx context.Context, id string) (i *Image, err error) GetRandom(ctx context.Context) (i *Image, err error) GetRandomWithSeed(ctx context.Context, seed int64) (i *Image, err error) ListAll(ctx context.Context) ([]Image, error) List(ctx context.Context, offset, limit int) ([]Image, error) }
Provider is an interface for listing and retrieving images
Click to show internal directories.
Click to hide internal directories.