Documentation ¶
Overview ¶
Package ufile include resources of ucloud ufile product
See also
- API: https://docs.ucloud.cn/api/ufile-api/index
- Product: https://www.ucloud.cn/site/product/ufile.html
for detail.
Index ¶
- type CreateBucketRequest
- type CreateBucketResponse
- type CreateUFileTokenRequest
- type CreateUFileTokenResponse
- type DeleteBucketRequest
- type DeleteBucketResponse
- type DeleteUFileTokenRequest
- type DeleteUFileTokenResponse
- type DescribeBucketRequest
- type DescribeBucketResponse
- type DescribeUFileTokenRequest
- type DescribeUFileTokenResponse
- type UFileBucketSet
- type UFileClient
- func (c *UFileClient) CreateBucket(req *CreateBucketRequest) (*CreateBucketResponse, error)
- func (c *UFileClient) CreateUFileToken(req *CreateUFileTokenRequest) (*CreateUFileTokenResponse, error)
- func (c *UFileClient) DeleteBucket(req *DeleteBucketRequest) (*DeleteBucketResponse, error)
- func (c *UFileClient) DeleteUFileToken(req *DeleteUFileTokenRequest) (*DeleteUFileTokenResponse, error)
- func (c *UFileClient) DescribeBucket(req *DescribeBucketRequest) (*DescribeBucketResponse, error)
- func (c *UFileClient) DescribeUFileToken(req *DescribeUFileTokenRequest) (*DescribeUFileTokenResponse, error)
- func (c *UFileClient) NewCreateBucketRequest() *CreateBucketRequest
- func (c *UFileClient) NewCreateUFileTokenRequest() *CreateUFileTokenRequest
- func (c *UFileClient) NewDeleteBucketRequest() *DeleteBucketRequest
- func (c *UFileClient) NewDeleteUFileTokenRequest() *DeleteUFileTokenRequest
- func (c *UFileClient) NewDescribeBucketRequest() *DescribeBucketRequest
- func (c *UFileClient) NewDescribeUFileTokenRequest() *DescribeUFileTokenRequest
- func (c *UFileClient) NewUpdateBucketRequest() *UpdateBucketRequest
- func (c *UFileClient) NewUpdateUFileTokenRequest() *UpdateUFileTokenRequest
- func (c *UFileClient) UpdateBucket(req *UpdateBucketRequest) (*UpdateBucketResponse, error)
- func (c *UFileClient) UpdateUFileToken(req *UpdateUFileTokenRequest) (*UpdateUFileTokenResponse, error)
- type UFileDomainSet
- type UFileTokenSet
- type UpdateBucketRequest
- type UpdateBucketResponse
- type UpdateUFileTokenRequest
- type UpdateUFileTokenResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateBucketRequest ¶
type CreateBucketRequest struct { request.CommonBase // 待创建Bucket的名称,具有全局唯一性 BucketName *string `required:"true"` // Bucket访问类型,public或private; 默认为private Type *string `required:"false"` }
CreateBucketRequest is request schema for CreateBucket action
type CreateBucketResponse ¶
type CreateBucketResponse struct { response.CommonBase // 已创建Bucket的ID BucketId string // 已创建Bucket的名称 BucketName string }
CreateBucketResponse is response schema for CreateBucket action
type CreateUFileTokenRequest ¶
type CreateUFileTokenRequest struct { request.CommonBase // 令牌允许操作的bucket,默认*表示全部 AllowedBuckets []string `required:"false"` // 令牌允许执行的操作,[ TOKEN_ALLOW_NONE , TOKEN_ALLOW_READ , TOKEN_ALLOW_WRITE , TOKEN_ALLOW_DELETE , TOKEN_ALLOW_LIST, TOKEN_ALLOW_IOP , TOKEN_ALLOW_DP ]。默认TOKEN_ALLOW_NONE AllowedOps []string `required:"false"` // 令牌允许操作的key前缀,默认*表示全部 AllowedPrefixes []string `required:"false"` // 令牌的超时时间点(时间戳),默认一天;注意:过期时间不能超过 4102416000 ExpireTime *int `required:"false"` // 令牌名称 TokenName *string `required:"true"` }
CreateUFileTokenRequest is request schema for CreateUFileToken action
type CreateUFileTokenResponse ¶
type CreateUFileTokenResponse struct { response.CommonBase // 创建令牌的token_id TokenId string }
CreateUFileTokenResponse is response schema for CreateUFileToken action
type DeleteBucketRequest ¶
type DeleteBucketRequest struct { request.CommonBase // 待删除Bucket的名称 BucketName *string `required:"true"` }
DeleteBucketRequest is request schema for DeleteBucket action
type DeleteBucketResponse ¶
type DeleteBucketResponse struct { response.CommonBase // Bucket的ID BucketId string // Bucket的名称 BucketName string }
DeleteBucketResponse is response schema for DeleteBucket action
type DeleteUFileTokenRequest ¶
type DeleteUFileTokenRequest struct { request.CommonBase // 令牌ID TokenId *string `required:"true"` }
DeleteUFileTokenRequest is request schema for DeleteUFileToken action
type DeleteUFileTokenResponse ¶
type DeleteUFileTokenResponse struct {
response.CommonBase
}
DeleteUFileTokenResponse is response schema for DeleteUFileToken action
type DescribeBucketRequest ¶
type DescribeBucketRequest struct { request.CommonBase // 待获取Bucket的名称,若不提供,则获取所有Bucket BucketName *string `required:"false"` // 获取所有Bucket列表的限制数目,默认为20 Limit *int `required:"false"` // 获取所有Bucket列表的偏移数目,默认为0 Offset *int `required:"false"` }
DescribeBucketRequest is request schema for DescribeBucket action
type DescribeBucketResponse ¶
type DescribeBucketResponse struct { response.CommonBase // Bucket的描述信息 参数见 UFileBucketSet DataSet []UFileBucketSet }
DescribeBucketResponse is response schema for DescribeBucket action
type DescribeUFileTokenRequest ¶
type DescribeUFileTokenRequest struct { request.CommonBase // 0表示显示部分token信息;不传递和其他情况表示显示全部token信息 Display *int `required:"false"` // 令牌ID,只返回指定ID信息,否则拉取所有令牌 TokenId *string `required:"false"` }
DescribeUFileTokenRequest is request schema for DescribeUFileToken action
type DescribeUFileTokenResponse ¶
type DescribeUFileTokenResponse struct { response.CommonBase // 操作名称 Action string // 令牌描述信息 DataSet []UFileTokenSet // 返回码 RetCode int }
DescribeUFileTokenResponse is response schema for DescribeUFileToken action
type UFileBucketSet ¶
type UFileBucketSet struct { // Bucket所属业务, general或vod或udb general: 普通业务; vod: 视频云业务; udb: 云数据库业务 Biz string // Bucket的ID BucketId string // Bucket名称 BucketName string // 与Bucket关联的CND加速域名的ID列表 CdnDomainId []string // Bucket的创建时间 CreateTime int // Bucket的域名集合 参数见 UFileDomainSet Domain UFileDomainSet // 是否存在自定义域名。0不存在,1存在,2错误 HasUserDomain int // Bucket的修改时间 ModifyTime int // Bucket所属地域 Region string // 所属业务组 Tag string // Bucket访问类型 Type string }
UFileBucketSet - DescribeBucket
this model is auto created by ucloud code generater for open api, you can also see https://docs.ucloud.cn/api for detail.
type UFileClient ¶
UFileClient is the client of UFile
func NewClient ¶
func NewClient(config *ucloud.Config, credential *auth.Credential) *UFileClient
NewClient will return a instance of UFileClient
func (*UFileClient) CreateBucket ¶
func (c *UFileClient) CreateBucket(req *CreateBucketRequest) (*CreateBucketResponse, error)
CreateBucket - 创建Bucket
func (*UFileClient) CreateUFileToken ¶
func (c *UFileClient) CreateUFileToken(req *CreateUFileTokenRequest) (*CreateUFileTokenResponse, error)
CreateUFileToken - 创建ufile令牌
func (*UFileClient) DeleteBucket ¶
func (c *UFileClient) DeleteBucket(req *DeleteBucketRequest) (*DeleteBucketResponse, error)
DeleteBucket - 删除Bucket
func (*UFileClient) DeleteUFileToken ¶
func (c *UFileClient) DeleteUFileToken(req *DeleteUFileTokenRequest) (*DeleteUFileTokenResponse, error)
DeleteUFileToken - 删除令牌
func (*UFileClient) DescribeBucket ¶
func (c *UFileClient) DescribeBucket(req *DescribeBucketRequest) (*DescribeBucketResponse, error)
DescribeBucket - 获取Bucket的描述信息
func (*UFileClient) DescribeUFileToken ¶
func (c *UFileClient) DescribeUFileToken(req *DescribeUFileTokenRequest) (*DescribeUFileTokenResponse, error)
DescribeUFileToken - 获取令牌信息
func (*UFileClient) NewCreateBucketRequest ¶
func (c *UFileClient) NewCreateBucketRequest() *CreateBucketRequest
NewCreateBucketRequest will create request of CreateBucket action.
func (*UFileClient) NewCreateUFileTokenRequest ¶
func (c *UFileClient) NewCreateUFileTokenRequest() *CreateUFileTokenRequest
NewCreateUFileTokenRequest will create request of CreateUFileToken action.
func (*UFileClient) NewDeleteBucketRequest ¶
func (c *UFileClient) NewDeleteBucketRequest() *DeleteBucketRequest
NewDeleteBucketRequest will create request of DeleteBucket action.
func (*UFileClient) NewDeleteUFileTokenRequest ¶
func (c *UFileClient) NewDeleteUFileTokenRequest() *DeleteUFileTokenRequest
NewDeleteUFileTokenRequest will create request of DeleteUFileToken action.
func (*UFileClient) NewDescribeBucketRequest ¶
func (c *UFileClient) NewDescribeBucketRequest() *DescribeBucketRequest
NewDescribeBucketRequest will create request of DescribeBucket action.
func (*UFileClient) NewDescribeUFileTokenRequest ¶
func (c *UFileClient) NewDescribeUFileTokenRequest() *DescribeUFileTokenRequest
NewDescribeUFileTokenRequest will create request of DescribeUFileToken action.
func (*UFileClient) NewUpdateBucketRequest ¶
func (c *UFileClient) NewUpdateBucketRequest() *UpdateBucketRequest
NewUpdateBucketRequest will create request of UpdateBucket action.
func (*UFileClient) NewUpdateUFileTokenRequest ¶
func (c *UFileClient) NewUpdateUFileTokenRequest() *UpdateUFileTokenRequest
NewUpdateUFileTokenRequest will create request of UpdateUFileToken action.
func (*UFileClient) UpdateBucket ¶
func (c *UFileClient) UpdateBucket(req *UpdateBucketRequest) (*UpdateBucketResponse, error)
UpdateBucket - 更改Bucket的属性
func (*UFileClient) UpdateUFileToken ¶
func (c *UFileClient) UpdateUFileToken(req *UpdateUFileTokenRequest) (*UpdateUFileTokenResponse, error)
UpdateUFileToken - 更新令牌的操作权限,可操作key的前缀,可操作bucket和令牌超时时间点
type UFileDomainSet ¶
type UFileDomainSet struct { // UCDN加速域名 Cdn []string // 用户自定义CDN加速域名 CustomCdn []string // 用户自定义源站域名 CustomSrc []string // 源站域名 Src []string }
UFileDomainSet - DescribeBucket
this model is auto created by ucloud code generater for open api, you can also see https://docs.ucloud.cn/api for detail.
type UFileTokenSet ¶
type UFileTokenSet struct { // 令牌允许操作的bucket AllowedBuckets []string // 令牌允许执行的操作,[ TOKEN_ALLOW_NONE , TOKEN_ALLOW_READ , TOKEN_ALLOW_WRITE , TOKEN_ALLOW_DELETE , TOKEN_ALLOW_LIST, TOKEN_ALLOW_IOP , TOKEN_ALLOW_DP ] AllowedOps []string // 令牌允许操作的key前缀 AllowedPrefixes []string // 创建时间 CreateTime int // 令牌的超时时间点 ExpireTime int // 修改时间 ModifyTime int // 令牌私钥 PrivateKey string // 令牌公钥 PublicKey string // 所属地区 Region string // 令牌ID TokenId string // 令牌名称 TokenName string }
UFileTokenSet - ufile令牌集合
this model is auto created by ucloud code generater for open api, you can also see https://docs.ucloud.cn/api for detail.
type UpdateBucketRequest ¶
type UpdateBucketRequest struct { request.CommonBase // 待修改Bucket的名称 BucketName *string `required:"true"` // Bucket访问类型;public或private Type *string `required:"true"` }
UpdateBucketRequest is request schema for UpdateBucket action
type UpdateBucketResponse ¶
type UpdateBucketResponse struct { response.CommonBase // Bucket的ID BucketId string // Bucket的名称 BucketName string }
UpdateBucketResponse is response schema for UpdateBucket action
type UpdateUFileTokenRequest ¶
type UpdateUFileTokenRequest struct { request.CommonBase // 令牌允许操作的bucket AllowedBuckets []string `required:"false"` // 令牌允许执行的操作,[ TOKEN_ALLOW_NONE , TOKEN_ALLOW_READ , TOKEN_ALLOW_WRITE , TOKEN_ALLOW_DELETE , TOKEN_ALLOW_LIST, TOKEN_ALLOW_IOP , TOKEN_ALLOW_DP ] AllowedOps []string `required:"false"` // 令牌允许操作的key前缀 AllowedPrefixes []string `required:"false"` // 令牌的超时时间点(时间戳);注意:过期时间不能超过 4102416000 ExpireTime *int `required:"false"` // 令牌ID TokenId *string `required:"true"` // 令牌名称 TokenName *string `required:"false"` }
UpdateUFileTokenRequest is request schema for UpdateUFileToken action
type UpdateUFileTokenResponse ¶
type UpdateUFileTokenResponse struct {
response.CommonBase
}
UpdateUFileTokenResponse is response schema for UpdateUFileToken action