Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Providers represents this package's offering to the dependency manager. Providers = wire.NewSet( ProvideUploadManager, wire.FieldsOf(new(*Config), "Storage", ), ) )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Storage storage.Config `json:"storage_config" mapstructure:"storage_config" toml:"storage_config,omitempty"` Debug bool `json:"debug" mapstructure:"debug" toml:"debug,omitempty"` // contains filtered or unexported fields }
Config contains settings regarding search indices.
type RootUploadDirectory ¶
type RootUploadDirectory string
RootUploadDirectory is a type alias for dependency injection's sake.
type UploadManager ¶
type UploadManager interface { SaveFile(ctx context.Context, path string, content []byte) error ReadFile(ctx context.Context, path string) ([]byte, error) ServeFiles(res http.ResponseWriter, req *http.Request) }
UploadManager stores data in a given storage provider.
func ProvideUploadManager ¶
func ProvideUploadManager(u *storage.Uploader) UploadManager
ProvideUploadManager transforms a *storage.Uploader into an UploadManager.
Click to show internal directories.
Click to hide internal directories.