Documentation ¶
Index ¶
- Constants
- type BucketObjectList
- type Client
- func (c *Client) Create(key string, r io.Reader) (etag string, err error)
- func (c *Client) DeleteMulti(keys ...string) (*cos.ObjectDeleteMultiResult, error)
- func (c *Client) Exists(key string) bool
- func (c *Client) GetObjectPresignedURL(key string, expire time.Duration) (*url.URL, error)
- func (c *Client) Head(key string) (*ObjectMetaData, error)
- func (c *Client) NewBucketObjectList(prefix string) *BucketObjectList
- type CosFileResource
- func (h *CosFileResource) CanHandle(path string) bool
- func (h *CosFileResource) ContentLength(path string) (length int64, err error)
- func (h *CosFileResource) CreateFile(path string, reader io.Reader) (etag string, err error)
- func (h *CosFileResource) EntityTag(path string) (etag string, err error)
- func (h *CosFileResource) IsModified(path string, etag string) (ok bool, err error)
- func (h *CosFileResource) OpenForRead(path string) (reader io.ReadCloser, err error)
- type ObjectMetaData
Constants ¶
View Source
const (
// CosPathPrefix cos路径前缀
CosPathPrefix = "cos:/"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BucketObjectList ¶
type BucketObjectList struct {
// contains filtered or unexported fields
}
BucketObjectList 存储桶对象列表
type Client ¶
Client cos client
func (*Client) DeleteMulti ¶
func (c *Client) DeleteMulti(keys ...string) (*cos.ObjectDeleteMultiResult, error)
DeleteMulti 删除多个对象
func (*Client) GetObjectPresignedURL ¶
GetObjectPresignedURL 得到获取对象的预签名链接
func (*Client) NewBucketObjectList ¶
func (c *Client) NewBucketObjectList(prefix string) *BucketObjectList
NewBucketObjectList 新建一个桶对象列表
type CosFileResource ¶
type CosFileResource struct {
// contains filtered or unexported fields
}
CosFileResource Cos文件资源
func NewCosFileResourceHandler ¶
func NewCosFileResourceHandler(client *Client) *CosFileResource
NewCosFileResourceHandler 新建cos文件处理器
func (*CosFileResource) CanHandle ¶
func (h *CosFileResource) CanHandle(path string) bool
CanHandle 文件资源处理接口
func (*CosFileResource) ContentLength ¶
func (h *CosFileResource) ContentLength(path string) (length int64, err error)
ContentLength 文件资源处理接口
func (*CosFileResource) CreateFile ¶
CreateFile 文件资源处理接口
func (*CosFileResource) EntityTag ¶
func (h *CosFileResource) EntityTag(path string) (etag string, err error)
EntityTag 文件资源处理接口
func (*CosFileResource) IsModified ¶
func (h *CosFileResource) IsModified(path string, etag string) (ok bool, err error)
IsModified 文件资源处理接口
func (*CosFileResource) OpenForRead ¶
func (h *CosFileResource) OpenForRead(path string) (reader io.ReadCloser, err error)
OpenForRead 文件资源处理接口
Click to show internal directories.
Click to hide internal directories.