Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StorageHandler ¶
type StorageHandler interface { Add(hash string, image image.Image) Get(hash string) (image.Image, bool) }
StorageHandler allows us to swap in different implementations of the actual storage method
type ThumbnailInteractor ¶
type ThumbnailStorageRepo ¶
type ThumbnailStorageRepo struct {
StorageHandler StorageHandler
}
func NewThumbnailStorageRepo ¶
func NewThumbnailStorageRepo(handler StorageHandler) *ThumbnailStorageRepo
func (*ThumbnailStorageRepo) Add ¶
func (tr *ThumbnailStorageRepo) Add(thumbnail domain.Thumbnail)
type WebserviceHandler ¶
type WebserviceHandler struct {
ThumbnailInteractor ThumbnailInteractor
}
WebserviceHandler needs a ThumbnailInteractor to get the thumbnail generation going
func (WebserviceHandler) GetThumbnail ¶
func (handler WebserviceHandler) GetThumbnail(w http.ResponseWriter, req *http.Request)
GetThumbnail processes the incoming request and returns a resized image, the error otherwise
Click to show internal directories.
Click to hide internal directories.