Documentation ¶
Index ¶
- Variables
- type Config
- type FileStore
- func (f *FileStore) Del(keys []string) error
- func (f *FileStore) Get(key string) (io.ReadCloser, error)
- func (f *FileStore) IsNotExistErr(err error) bool
- func (f *FileStore) PresignURL(key, method string, expired time.Duration) (*url.URL, error)
- func (f *FileStore) Set(key string, reader io.Reader) error
- type KV
- type OKV
- func (o *OKV) Del(keys []string) error
- func (o *OKV) Get(keys []string) (map[string][]byte, error)
- func (o *OKV) GetBatch(keys []string) ([]*KV, error)
- func (o *OKV) GetOne(key string) ([]byte, error)
- func (o *OKV) Path(key string) string
- func (o *OKV) PresignURL(key string, method string, expired time.Duration) (*url.URL, error)
- func (o *OKV) Put(data map[string][]byte) error
- func (o *OKV) PutBatch(kvList []*KV) error
- func (o *OKV) PutOne(key string, val []byte) error
- type OSS
- func (c *OSS) Delete(filePath []string) error
- func (c *OSS) Get(filePath string) (io.ReadCloser, error)
- func (c *OSS) GetByte(filePath string) ([]byte, error)
- func (c *OSS) PresignURL(path string, method string, expired time.Duration) (*url.URL, error)
- func (c *OSS) UnZip(filePath string, rename func(file *zip.File) string) (map[string][]byte, error)
- func (c *OSS) Upload(filename string, reader io.Reader) (string, error)
- type Store
Constants ¶
This section is empty.
Variables ¶
View Source
var ShanghaiLoc, _ = time.LoadLocation("Asia/Shanghai")
Functions ¶
This section is empty.
Types ¶
type FileStore ¶
type FileStore struct {
// contains filtered or unexported fields
}
func NewFileStore ¶
func (*FileStore) IsNotExistErr ¶
func (*FileStore) PresignURL ¶ added in v0.5.0
type OKV ¶
type OKV struct {
// contains filtered or unexported fields
}
func (*OKV) Path ¶
Path returns the object path of key, be likes namespace/key[/filename][.ext][.gz]
func (*OKV) PresignURL ¶ added in v0.5.1
PresignURL 上传(put)/下载(get)
Click to show internal directories.
Click to hide internal directories.