Documentation ¶
Index ¶
- Variables
- func ConfigureGetRoute(route httproute.Route) httproute.Route
- func ConfigurePostRoute(route httproute.Route) httproute.Route
- func ExtractKey(r *http.Request) string
- type DirectorMaker
- type GetHandler
- type GetHandlerLogger
- type ImageVariant
- type ImagesStore
- type JSONResponseWriter
- type PostHandler
- type PostHandlerCloudStorageService
- type PostHandlerLogger
- type PresignProvider
- type VipsDaemon
Constants ¶
This section is empty.
Variables ¶
View Source
var DependencySet = wire.NewSet( NewGetHandlerLogger, wire.Struct(new(GetHandler), "*"), NewPostHandlerLogger, wire.Struct(new(PostHandler), "*"), )
Functions ¶
func ExtractKey ¶
Types ¶
type DirectorMaker ¶
type GetHandler ¶
type GetHandler struct { DirectorMaker DirectorMaker Logger GetHandlerLogger ImagesCDNHost imagesconfig.ImagesCDNHost HTTPHost utilhttputil.HTTPHost HTTPProto utilhttputil.HTTPProto VipsDaemon VipsDaemon }
func (*GetHandler) ServeHTTP ¶
func (h *GetHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GetHandlerLogger ¶
func NewGetHandlerLogger ¶
func NewGetHandlerLogger(lf *log.Factory) GetHandlerLogger
type ImageVariant ¶
type ImageVariant string
const ( ImageVariantOriginal ImageVariant = "original" ImageVariantProfile ImageVariant = "profile" )
func ParseImageVariant ¶
func ParseImageVariant(s string) (ImageVariant, bool)
type ImagesStore ¶
type JSONResponseWriter ¶
type JSONResponseWriter interface {
WriteResponse(rw http.ResponseWriter, resp *api.Response)
}
type PostHandler ¶
type PostHandler struct { Logger PostHandlerLogger JSON JSONResponseWriter PostHandlerCloudStorageService PostHandlerCloudStorageService PresignProvider PresignProvider Database *appdb.Handle ImagesStore ImagesStore Clock clock.Clock }
func (*PostHandler) ServeHTTP ¶
func (h *PostHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
nolint:gocognit
type PostHandlerCloudStorageService ¶
type PostHandlerCloudStorageService interface {
PresignPutRequest(ctx context.Context, r *imagesservice.PresignUploadRequest) (*imagesservice.PresignUploadResponse, error)
}
type PostHandlerLogger ¶
func NewPostHandlerLogger ¶
func NewPostHandlerLogger(lf *log.Factory) PostHandlerLogger
type PresignProvider ¶
Click to show internal directories.
Click to hide internal directories.