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 objectstorage.Config `json:"storageConfig" toml:"storage_config,omitempty"` Debug bool `json:"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 *objectstorage.Uploader) UploadManager
ProvideUploadManager transforms an *objectstorage.Uploader into an UploadManager.
Click to show internal directories.
Click to hide internal directories.