Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(o *Options)
Option defines a single option function.
func Middleware ¶
Middleware provides a function to set the middleware option.
func ThumbnailStorage ¶
ThumbnailStorage provides a function to set the ThumbnailStorage option.
type Options ¶
type Options struct { Logger log.Logger Config *config.Config Middleware []func(http.Handler) http.Handler ThumbnailStorage storage.Storage }
Options defines the available options for this package.
type Service ¶
type Service interface { ServeHTTP(http.ResponseWriter, *http.Request) GetThumbnail(http.ResponseWriter, *http.Request) }
Service defines the service handlers.
func NewInstrument ¶
NewInstrument returns a service that instruments metrics.
func NewLogging ¶
NewLogging returns a service that logs messages.
func NewService ¶
NewService returns a service implementation for Service.
func NewTracing ¶
NewTracing returns a service that instruments traces.
type Thumbnails ¶
type Thumbnails struct {
// contains filtered or unexported fields
}
Thumbnails implements the business logic for Service.
func (Thumbnails) GetThumbnail ¶
func (s Thumbnails) GetThumbnail(w http.ResponseWriter, r *http.Request)
GetThumbnail implements the Service interface.
func (Thumbnails) ServeHTTP ¶
func (s Thumbnails) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements the Service interface.
func (Thumbnails) TransferTokenValidator ¶
func (s Thumbnails) TransferTokenValidator(next http.Handler) http.Handler