Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var FactoriesRegister = NewStorageFactoriesRegister()
Functions ¶
func Registry ¶
func Registry(name string, factory StorageFactory)
Types ¶
type Context ¶
func NewContext ¶
type StorageFactoriesRegister ¶
type StorageFactoriesRegister struct {
// contains filtered or unexported fields
}
func NewStorageFactoriesRegister ¶
func NewStorageFactoriesRegister() *StorageFactoriesRegister
func (*StorageFactoriesRegister) Get ¶
func (r *StorageFactoriesRegister) Get(name string) (factory StorageFactory, ok bool)
func (*StorageFactoriesRegister) Registry ¶
func (r *StorageFactoriesRegister) Registry(name string, factory StorageFactory)
type StorageFactory ¶
type StorageFactory interface {
Factory(ctx *Context, config map[string]interface{}) (storage oss.StorageInterface, err error)
}
func Get ¶
func Get(name string) (factory StorageFactory, ok bool)
type StorageFactoryFunc ¶
type StorageFactoryFunc func(ctx *Context, config map[string]interface{}) (storage oss.StorageInterface, err error)
func (StorageFactoryFunc) Factory ¶
func (f StorageFactoryFunc) Factory(ctx *Context, config map[string]interface{}) (storage oss.StorageInterface, err error)
Click to show internal directories.
Click to hide internal directories.