Documentation ¶
Index ¶
- Constants
- Variables
- func Signature(app_key, app_secret, method, u, content_md5, content_type string) (string, string)
- type FDSAuth
- type FDSClient
- func (c *FDSClient) Auth(auth FDSAuth) (*http.Response, error)
- func (c *FDSClient) Create_Bucket(bucketname string) (bool, error)
- func (c *FDSClient) Delete_Bucket(bucketname string) (bool, error)
- func (c *FDSClient) Delete_Object(bucketname, objectname string) (bool, error)
- func (c *FDSClient) Get_Object(bucketname, objectname string, postion, size int) (string, error)
- func (c *FDSClient) Is_Bucket_Exists(bucketname string) (bool, error)
- func (c *FDSClient) Is_Object_Exists(bucketname, objectname string) (bool, error)
- func (c *FDSClient) List_Bucket() ([]string, error)
- func (c *FDSClient) List_Object(bucketname string) ([]string, error)
- func (c *FDSClient) Post_Object(bucketname, data, filetype string, cachecontrol int) (string, error)
- func (c *FDSClient) Prefetch_Object(bucketname, objectname string) (bool, error)
- func (c *FDSClient) Put_Object(bucketname, objectname, data, filetype string, cachecontrol int) (bool, error)
- func (c *FDSClient) Refresh_Object(bucketname, objectname string) (bool, error)
- func (c *FDSClient) Rename_Object(bucketname, src_objectname, dst_objectname string) (bool, error)
- func (c *FDSClient) Set_Object_Acl(bucketname, objectname string, acl map[string]interface{}) (bool, error)
- func (c *FDSClient) Set_Public(bucketname, objectname string, disable_prefetch bool) (bool, error)
Constants ¶
View Source
const ( DEFAULT_FDS_SERVICE_BASE_URI = "http://files.fds.api.xiaomi.com/" DEFAULT_FDS_SERVICE_BASE_URI_HTTPS = "https://files.fds.api.xiaomi.com/" DEFAULT_CDN_SERVICE_URI = "http://cdn.fds.api.xiaomi.com/" USER_DEFINED_METADATA_PREFIX = "x-xiaomi-meta-" DELIMITER = "/" )
View Source
const ( PERMISSION_READ = "READ" PERMISSION_WRITE = "WRITE" PERMISSION_FULL_CONTROL = "FULL_CONTROL" PERMISSION_USER = "USER" PERMISSION_GROUP = "GROUP" )
permission
Variables ¶
View Source
var ALL_USERS = map[string]string{"id": "ALL_USERS"}
View Source
var AUTHENTICATED_USERS = map[string]string{"id": "AUTHENTICATED_USERS"}
View Source
var PRE_DEFINED_METADATA = []string{"cache-control",
"content-encoding",
"content-length",
"content-md5",
"content-type",
}
Functions ¶
Types ¶
type FDSClient ¶
func NEWFDSClient ¶
func (*FDSClient) Create_Bucket ¶
func (*FDSClient) Delete_Bucket ¶
func (*FDSClient) Delete_Object ¶
func (*FDSClient) Get_Object ¶
func (*FDSClient) Is_Bucket_Exists ¶
func (*FDSClient) Is_Object_Exists ¶
func (*FDSClient) List_Bucket ¶
func (*FDSClient) List_Object ¶
prefix需要改进
func (*FDSClient) Post_Object ¶
func (c *FDSClient) Post_Object(bucketname, data, filetype string, cachecontrol int) (string, error)
v1类型
func (*FDSClient) Prefetch_Object ¶
func (*FDSClient) Put_Object ¶
func (c *FDSClient) Put_Object(bucketname, objectname, data, filetype string, cachecontrol int) (bool, error)
v2类型 自定义文件名 如果object已存在,将会覆盖
func (*FDSClient) Refresh_Object ¶
func (*FDSClient) Rename_Object ¶
func (*FDSClient) Set_Object_Acl ¶
Click to show internal directories.
Click to hide internal directories.