Documentation ¶
Index ¶
- Variables
- func NewTencentCloudOSS() file.File
- type OssMetadata
- type TencentCloudOSS
- func (t *TencentCloudOSS) Del(ctx context.Context, st *file.DelRequest) error
- func (t *TencentCloudOSS) Get(ctx context.Context, st *file.GetFileStu) (io.ReadCloser, error)
- func (t *TencentCloudOSS) Init(ctx context.Context, metadata *file.FileConfig) error
- func (t *TencentCloudOSS) List(ctx context.Context, st *file.ListRequest) (*file.ListResp, error)
- func (t *TencentCloudOSS) Put(ctx context.Context, st *file.PutFileStu) error
- func (t *TencentCloudOSS) Stat(ctx context.Context, st *file.FileMetaRequest) (*file.FileMetaResp, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrClientNotExist = errors.New("specific client not exist") ErrNotSpecifyEndPoint = errors.New("not specify endpoint in metadata") )
Functions ¶
func NewTencentCloudOSS ¶
Types ¶
type OssMetadata ¶
type OssMetadata struct { Endpoint string `json:"endpoint"` // bucket url https://console.cloud.tencent.com/cos/bucket AccessKeyID string `json:"accessKeyID"` // SecretID https://console.cloud.tencent.com/cam/capi AccessKeySecret string `json:"accessKeySecret"` // SecretKey Timeout int `json:"timeout"` // timeout in milliseconds // contains filtered or unexported fields }
type TencentCloudOSS ¶
type TencentCloudOSS struct {
// contains filtered or unexported fields
}
func (*TencentCloudOSS) Del ¶
func (t *TencentCloudOSS) Del(ctx context.Context, st *file.DelRequest) error
func (*TencentCloudOSS) Get ¶
func (t *TencentCloudOSS) Get(ctx context.Context, st *file.GetFileStu) (io.ReadCloser, error)
func (*TencentCloudOSS) Init ¶
func (t *TencentCloudOSS) Init(ctx context.Context, metadata *file.FileConfig) error
Init does metadata parsing and connection creation
func (*TencentCloudOSS) List ¶
func (t *TencentCloudOSS) List(ctx context.Context, st *file.ListRequest) (*file.ListResp, error)
func (*TencentCloudOSS) Put ¶
func (t *TencentCloudOSS) Put(ctx context.Context, st *file.PutFileStu) error
func (*TencentCloudOSS) Stat ¶
func (t *TencentCloudOSS) Stat(ctx context.Context, st *file.FileMetaRequest) (*file.FileMetaResp, error)
Click to show internal directories.
Click to hide internal directories.