Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cache = cache.New(5*time.Minute, 10*time.Minute)
View Source
var Connection *sql.DB
Functions ¶
func CreateBucket ¶
func CreateBucket(bucket StorageBucket) error
func CreateObject ¶
func CreateObject(object StorageObject) error
func DeleteApiKey ¶
Types ¶
type StorageBucket ¶
type StorageBucket struct { Id int Name string Type string MaxSize int64 RootPath string Ip string Port int Username string Password string CreatedAt string }
func GetAllBuckets ¶
func GetAllBuckets() ([]StorageBucket, error)
func GetAvailableBucket ¶
func GetAvailableBucket(filesize int) (StorageBucket, error)
func GetBucketById ¶
func GetBucketById(id int) (StorageBucket, error)
func GetBucketByName ¶
func GetBucketByName(name string) (StorageBucket, error)
type StorageObject ¶
type StorageObject struct { Id int Bucket StorageBucket // This should be mapped to the StorageBucket struct, not just the bucket_id. Slug string Size int FileType string FilePath string UploadedBy string CreatedAt string }
func FindObjectBySlug ¶
func FindObjectBySlug(slug string) (StorageObject, error)
Click to show internal directories.
Click to hide internal directories.