Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HTTPClient ¶ added in v0.14.0
HTTPClient defines the methods an HTTPClient implementation must provide.
type Store ¶
type Store interface { // DownloadAndSaveImage downloads the image located at the url provided and // stores it returning the image ID. DownloadAndSaveImage(ctx context.Context, imageURL string) (imageID string, err error) // GetImage returns the image identified by the ID and version provided. GetImage(ctx context.Context, imageID, version string) (datd []byte, err error) // SaveImage stores an image returning the image ID. SaveImage(ctx context.Context, data []byte) (imageID string, err error) }
Store describes the methods an image.Store implementation must provide.
type StoreMock ¶
StoreMock is a mock implementation of the img.Store interface.
func (*StoreMock) DownloadAndSaveImage ¶ added in v0.14.0
DownloadAndSaveImage implements the img.Store interface.
type Version ¶ added in v0.14.0
Version represents a specific size version of an image.
func GenerateVersions ¶ added in v0.14.0
GenerateVersions generates multiple versions of different sizes for the image provided.
Click to show internal directories.
Click to hide internal directories.