deps

package
v0.0.0-...-ee57881 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppRootDependencySet = wire.NewSet(
	RootDependencySet,
	wire.FieldsOf(new(*AppProvider),
		"RootProvider",
		"Config",
	),
)
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

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
}

func (*RequestMiddleware) Handle

func (m *RequestMiddleware) Handle(next http.Handler) http.Handler

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 (*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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL