Documentation ¶
Index ¶
Constants ¶
View Source
const (
ProviderCOS = "cos"
)
ProviderCOS provider tencent cloud cos
Variables ¶
View Source
var ErrorMissingKey = xerr.Newf(400, "MissingKey", "key is required")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // Group can auto add prefix to key Group(prefix string) Client // Prefix show group prefix Prefix() string // FullKey add prefix to key FullKey(key string) string // GetRaw get raw http resp GetRaw(key string) (*http.Response, error) // GetReader please close it after use GetReader(key string) (io.ReadCloser, error) // Get get file byte content only Get(key string) ([]byte, error) // Exists exists or not Exists(key string) (bool, error) // Put please close reader yourself, key is required, default content type is application/octet-stream Put(r io.Reader, key, name, contentType string) error // PutRaw put the raw data without any meta, you can only use it by api. PutRaw(r io.Reader, key string) error // PutURL save the src online file to key PutURL(src, key string) error // Delete delete Delete(key string) error // IsNotFoundError check not found err IsNotFoundError(err error) bool }
Client is obj client interface
Click to show internal directories.
Click to hide internal directories.