Documentation ¶
Index ¶
- Variables
- func NewCloudStorage(objectStoreConfig *imagesconfig.ObjectStoreConfig, c clock.Clock) imagesservice.ImagesCloudStorageServiceStorage
- type AppProvider
- type RequestMiddleware
- type RequestProvider
- type RootProvider
- func (p *RootProvider) Handler(f func(*RequestProvider) http.Handler) http.Handler
- func (p *RootProvider) Middleware(f func(*RequestProvider) httproute.Middleware) httproute.Middleware
- func (p *RootProvider) NewAppProvider(ctx context.Context, appCtx *config.AppContext) *AppProvider
- func (p *RootProvider) RootMiddleware(factory func(*RootProvider) httproute.Middleware) httproute.Middleware
Constants ¶
This section is empty.
Variables ¶
View Source
var AppRootDependencySet = wire.NewSet( RootDependencySet, wire.FieldsOf(new(*AppProvider), "RootProvider", "Config", ), )
View Source
var DependencySet = wire.NewSet( RequestDependencySet, deps.CommonDependencySet, appdb.NewHandle, clock.DependencySet, imagesservice.DependencySet, NewCloudStorage, )
View Source
var RequestDependencySet = wire.NewSet( AppRootDependencySet, wire.FieldsOf(new(*RequestProvider), "AppProvider", "Request", ), deps.ProvideRemoteIP, deps.ProvideUserAgentString, deps.ProvideHTTPHost, deps.ProvideHTTPProto, )
View Source
var RootDependencySet = wire.NewSet( wire.FieldsOf(new(*RootProvider), "EnvironmentConfig", "ObjectStoreConfig", "LoggerFactory", "SentryHub", "VipsDaemon", "DatabasePool", ), wire.FieldsOf(new(*imagesconfig.EnvironmentConfig), "TrustProxy", "CORSAllowedOrigins", "ImagesCDNHost", "DatabaseConfig", ), )
Functions ¶
func NewCloudStorage ¶
func NewCloudStorage(objectStoreConfig *imagesconfig.ObjectStoreConfig, c clock.Clock) imagesservice.ImagesCloudStorageServiceStorage
Types ¶
type AppProvider ¶
type AppProvider struct { *RootProvider Config *config.Config LoggerFactory *log.Factory }
func (*AppProvider) NewRequestProvider ¶
func (p *AppProvider) NewRequestProvider(r *http.Request) *RequestProvider
type RequestMiddleware ¶
type RequestMiddleware struct { RootProvider *RootProvider ConfigSource *configsource.ConfigSource }
type RequestProvider ¶
type RequestProvider struct { *AppProvider Request *http.Request }
type RootProvider ¶
type RootProvider struct { EnvironmentConfig imagesconfig.EnvironmentConfig ObjectStoreConfig *imagesconfig.ObjectStoreConfig LoggerFactory *log.Factory SentryHub *getsentry.Hub DatabasePool *db.Pool VipsDaemon *vipsutil.Daemon BaseResources *resource.Manager }
func NewRootProvider ¶
func NewRootProvider( envConfig imagesconfig.EnvironmentConfig, objectStoreConfig *imagesconfig.ObjectStoreConfig, ) (*RootProvider, error)
func (*RootProvider) Handler ¶
func (p *RootProvider) Handler(f func(*RequestProvider) http.Handler) http.Handler
func (*RootProvider) Middleware ¶
func (p *RootProvider) Middleware(f func(*RequestProvider) httproute.Middleware) httproute.Middleware
func (*RootProvider) NewAppProvider ¶
func (p *RootProvider) NewAppProvider(ctx context.Context, appCtx *config.AppContext) *AppProvider
func (*RootProvider) RootMiddleware ¶
func (p *RootProvider) RootMiddleware(factory func(*RootProvider) httproute.Middleware) httproute.Middleware
Click to show internal directories.
Click to hide internal directories.