Documentation ¶
Index ¶
- func DecodeBytes(data []byte) (string, error)
- func DecodeString(data string) ([]byte, error)
- func IsPreview(file model.File) bool
- func StringSize(size int64) string
- type AWSStorage
- func (s *AWSStorage) Delete(path string) error
- func (s *AWSStorage) Get(path string, passphrase *string) ([]byte, error)
- func (s *AWSStorage) GetString(path string, passphrase *string) (string, error)
- func (s *AWSStorage) Path(path string) string
- func (s *AWSStorage) Upload(path string, data []byte) (string, error)
- type LocalStorage
- func (s *LocalStorage) Delete(path string) error
- func (s *LocalStorage) Get(path string, passphrase *string) ([]byte, error)
- func (s *LocalStorage) GetString(path string, passphrase *string) (string, error)
- func (s *LocalStorage) Path(path string) string
- func (s *LocalStorage) Upload(path string, data []byte) (string, error)
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeBytes ¶
func DecodeString ¶
func StringSize ¶
Types ¶
type AWSStorage ¶
type AWSStorage struct { BucketName string PathPrefix string Config config.Config S3Client *s3.Client }
func (*AWSStorage) Delete ¶
func (s *AWSStorage) Delete(path string) error
func (*AWSStorage) GetString ¶
func (s *AWSStorage) GetString(path string, passphrase *string) (string, error)
func (*AWSStorage) Path ¶
func (s *AWSStorage) Path(path string) string
type LocalStorage ¶
type LocalStorage struct { BaseDir string PathPrefix string MkdirPerm os.FileMode WritePerm os.FileMode ExpireTime time.Duration Config config.Config }
func (*LocalStorage) Delete ¶
func (s *LocalStorage) Delete(path string) error
func (*LocalStorage) Get ¶
func (s *LocalStorage) Get(path string, passphrase *string) ([]byte, error)
func (*LocalStorage) GetString ¶
func (s *LocalStorage) GetString(path string, passphrase *string) (string, error)
func (*LocalStorage) Path ¶
func (s *LocalStorage) Path(path string) string
Click to show internal directories.
Click to hide internal directories.