Documentation ¶
Index ¶
- Variables
- type AbstractStorage
- func (aStorage *AbstractStorage) AddStorage(storageKey string, storage Storage) (err error)
- func (aStorage *AbstractStorage) CreateCLink(filePath, path string) (cLink string, err error)
- func (aStorage *AbstractStorage) CreateCLinkInStorage(filePath, path, storageKey string) (cLink string, err error)
- func (aStorage *AbstractStorage) Delete(cLink string) (err error)
- func (aStorage *AbstractStorage) GetPathByCLink(cLink string) (path string)
- func (aStorage *AbstractStorage) GetStorage(storageKey string) (s Storage, err error)
- func (aStorage *AbstractStorage) GetURL(cLink string, options ...interface{}) (URL string)
- func (aStorage *AbstractStorage) PrepareCLink(path string) (cLink string, err error)
- func (aStorage *AbstractStorage) PrepareCLinkInStorage(path, storageKey string) (cLink string, err error)
- func (aStorage *AbstractStorage) SetDefaultStorage(storageKey string) (err error)
- func (aStorage *AbstractStorage) UploadByCLink(filePath, cLink string) (err error)
- type ExpirationVerifier
- type Storage
- type StorageConfig
- type StoragesConfig
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AbstractStorage ¶
type AbstractStorage struct {
// contains filtered or unexported fields
}
func New ¶
func New() *AbstractStorage
func (*AbstractStorage) AddStorage ¶
func (aStorage *AbstractStorage) AddStorage(storageKey string, storage Storage) (err error)
AddStorage - add new storage to storages list
func (*AbstractStorage) CreateCLink ¶
func (aStorage *AbstractStorage) CreateCLink(filePath, path string) (cLink string, err error)
CreateCLink - save file and create cLink in default storage
func (*AbstractStorage) CreateCLinkInStorage ¶
func (aStorage *AbstractStorage) CreateCLinkInStorage(filePath, path, storageKey string) (cLink string, err error)
CreateCLinkInStorage - save file and create clink in selected storage by storageKey
func (*AbstractStorage) Delete ¶
func (aStorage *AbstractStorage) Delete(cLink string) (err error)
Delete - delete file in storage by cLink
func (*AbstractStorage) GetPathByCLink ¶
func (aStorage *AbstractStorage) GetPathByCLink(cLink string) (path string)
func (*AbstractStorage) GetStorage ¶
func (aStorage *AbstractStorage) GetStorage(storageKey string) (s Storage, err error)
GetStorage - get storage from list by storage by
func (*AbstractStorage) GetURL ¶
func (aStorage *AbstractStorage) GetURL(cLink string, options ...interface{}) (URL string)
GetURL - return http link by cLink
func (*AbstractStorage) PrepareCLink ¶
func (aStorage *AbstractStorage) PrepareCLink(path string) (cLink string, err error)
func (*AbstractStorage) PrepareCLinkInStorage ¶
func (aStorage *AbstractStorage) PrepareCLinkInStorage(path, storageKey string) (cLink string, err error)
func (*AbstractStorage) SetDefaultStorage ¶
func (aStorage *AbstractStorage) SetDefaultStorage(storageKey string) (err error)
SetDefaultStorage - set storage as default
func (*AbstractStorage) UploadByCLink ¶
func (aStorage *AbstractStorage) UploadByCLink(filePath, cLink string) (err error)
type ExpirationVerifier ¶
type StorageConfig ¶
type StoragesConfig ¶
type StoragesConfig struct { Default string `json:"default" yaml:"default"` Instances []StorageConfig `json:"instances" yaml:"instances"` }
Click to show internal directories.
Click to hide internal directories.