Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthVersionType ¶
type AuthVersionType string
const ( // AuthV1 v1 AuthV1 AuthVersionType = "v1" // AuthV2 v2 AuthV2 AuthVersionType = "v2" )
type Client ¶
Client OSS client
func New ¶
func New(accessKey, accessSecret string, BucketId int64, serviceUrl string, options ...ClientOption) (*Client, error)
*
- @Author Assassin
- @Date 2021/12/24 14:21
- @Description 创建新的oss *
func (Client) UploadFile ¶
func (client Client) UploadFile(file multipart.File, filename string) (res *UploadFileResponse, err error)
*
- @Author Assassin
- @Date 2021/12/24 14:31
- @Description 上传文件 *
type ClientOption ¶
type ClientOption func(*Client)
ClientOption client option such as UseCname, Timeout, SecurityToken.
type Config ¶
type Config struct {
AccessKey string // AccessKey
AccessSecret string // AccessSecret
BucketId int64 // Bucket
AuthVersion AuthVersionType // v1 or v2 signature,default is v1
}
type UploadFileResponse ¶
type UploadFileResponse struct {
ErrNo int64 `json:"err_no"`
Message string `json:"message"`
Data data
}
*
- @Author Assassin
- @Date 2021/12/24 16:18
- @Description 上传文件返回值 *
Click to show internal directories.
Click to hide internal directories.