Documentation ¶
Overview ¶
Aliyun OSS API:
https://help.aliyun.com/document_detail/32145.html https://help.aliyun.com/document_detail/59670.htm https://help.aliyun.com/document_detail/100624.htm https://help.aliyun.com/document_detail/66222.html https://www.alibabacloud.com/help/doc-detail/28759.htm https://help.aliyun.com/document_detail/28756.html https://developer.aliyun.com/ask/2549 https://error-center.aliyun.com/status/product/Oss
Index ¶
- Constants
- func ConfigDemo() string
- func ValidUrlFilepath(p string) (out string, err error)
- type OssClient
- func (client *OssClient) BucketUrl() string
- func (client *OssClient) Copy(source, target string, opts ...oss.Option) (code string, err error)
- func (client *OssClient) Delete(source string, opts ...oss.Option) (err error)
- func (client *OssClient) Get(source, target string, opts ...oss.Option) (code string, err error)
- func (client *OssClient) GetSite() string
- func (client *OssClient) GetSts(sessionName string) (result *StsResult, err error)
- func (client *OssClient) PutObject(reader io.Reader, target string, opts ...oss.Option) (link string, err error)
- func (client *OssClient) StsUploadLocal(sessionName string, source, target string, options ...oss.Option) (link string, err error)
- func (client *OssClient) Upload(source string, target string) (link string, err error)
- func (client *OssClient) UploadDir(source string, target string) (link string, err error)
- func (client *OssClient) UploadFromUrl(source string, target string, opts ...oss.Option) (link string, err error)
- func (client *OssClient) UploadLocal(source, target string, opts ...oss.Option) (link string, err error)
- type OssConfig
- type StsResult
Constants ¶
View Source
const ( ALIYUN_Domain = "aliyuncs.com" CODE_NoSuchKey = "NoSuchKey" )
Variables ¶
This section is empty.
Functions ¶
func ConfigDemo ¶
func ConfigDemo() string
func ValidUrlFilepath ¶
Types ¶
type OssClient ¶
type OssClient struct {
// contains filtered or unexported fields
}
func NewOssClient ¶
func (*OssClient) StsUploadLocal ¶
func (client *OssClient) StsUploadLocal(sessionName string, source, target string, options ...oss.Option) (link string, err error)
test Sts client
func (*OssClient) UploadFromUrl ¶
type OssConfig ¶
type OssConfig struct { AccessKeyId string `mapstructure:"access_key_id" json:"accessKeyId,omitempty"` AccessKeySecret string `mapstructure:"access_key_secret" json:"accessKeySecret,omitempty"` Region string `mapstructure:"region" json:"region,omitempty"` Bucket string `mapstructure:"bucket" json:"bucket,omitempty"` // use custom domain instead of https://BUCKET.oss-{REGION_ID}.aliyunc.com Site string `mapstructure:"site" json:"site,omitempty"` RoleArn string `mapstructure:"role_arn" json:"roleArn,omitempty"` // sts DurationSeconds int `mapstructure:"duration_seconds" json:"durationSeconds,omitempty"` // sts // contains filtered or unexported fields }
func NewOssConfig ¶
Click to show internal directories.
Click to hide internal directories.