Documentation ¶
Index ¶
Constants ¶
View Source
const ( FileStorage = "file" S3Storage = "s3" )
Variables ¶
This section is empty.
Functions ¶
func CreateDirIfNotExist ¶ added in v0.0.9
CreateDirIfNotExist creates the directory for the given file path if it does not exist.
Types ¶
type S3 ¶ added in v0.0.7
type S3 struct { Endpoint string Bucket string Region string AccessKeyID string SecretAccessKey string // contains filtered or unexported fields }
func (S3) DeleteObject ¶ added in v0.0.7
type Storage ¶
type Storage interface { // ListObject returns a list of all objects in the storage backend. ListObject(prefix string) ([]Object, error) // GetObject returns the object identified by the given identifier. GetObject(identifier string) (Object, error) // PutObject stores the data in the storage backend identified by the given identifier. PutObject(identifier string, data []byte) error // DeleteObject deletes the object identified by the given identifier. DeleteObject(identifier string) error }
func GetStorage ¶ added in v0.1.2
func GetStorage(storage typedef.MultiStorage) (Storage, error)
Click to show internal directories.
Click to hide internal directories.