Documentation ¶
Index ¶
- Constants
- type AlyOssBucketJsonData
- type AlyOssConfigOption
- type AlyOssObj
- func (c *AlyOssObj) Close()
- func (c *AlyOssObj) CreateBucket(bucketName string)
- func (c *AlyOssObj) DeleteBucket(bucketName string)
- func (c *AlyOssObj) DeleteBucketObj(bucketName string)
- func (c *AlyOssObj) DeleteObject(bucketName, objectName string)
- func (c *AlyOssObj) Download(bucketName, object string, savePath string) (err error)
- func (c *AlyOssObj) GetInfo(bucketName, object string) (info go_oss.File, err error)
- func (c *AlyOssObj) GetUrl(bucket, dndpoint, objectName string) string
- func (c *AlyOssObj) Init() bool
- func (c *AlyOssObj) IsBucketExist(bucketName string) bool
- func (c *AlyOssObj) ListBuckets()
- func (c *AlyOssObj) ListObjects(bucketName string) (files []go_oss.File, err error)
- func (c *AlyOssObj) NewAlyOssObj(accessKey, secretKey, bucket, endpoint string, securityToken string, ...) (err error)
- func (c *AlyOssObj) OpenBucket(bucketName string) (err error)
- func (c *AlyOssObj) PutObjectFromFile(bucketName, objectName, localFileName string, args ...string) string
- func (c *AlyOssObj) UploadString(bucketName, tmpstr string, args ...string) string
- type CosConfigOption
- type ObsConfigOption
- type ObsObj
- func (c *ObsObj) Close()
- func (c *ObsObj) CreateBucket(bucketName string)
- func (c *ObsObj) DeleteBucket(bucketName string)
- func (c *ObsObj) DeleteBucketObj(bucketName string)
- func (c *ObsObj) DeleteObject(bucketName, objectName string)
- func (c *ObsObj) Download(bucketName, object string, savePath string) (err error)
- func (c *ObsObj) GetInfo(bucketName, object string) (info go_oss.File, err error)
- func (c *ObsObj) GetUrl(bucket, dndpoint, objectName string) string
- func (c *ObsObj) Init() bool
- func (c *ObsObj) IsBucketExist(bucketName string) bool
- func (c *ObsObj) ListBuckets()
- func (c *ObsObj) ListObjects(bucketName string) (files []go_oss.File, err error)
- func (c *ObsObj) NewObj(accessKey, secretKey, bucket, endpoint string, securityToken string, ...) (err error)
- func (c *ObsObj) OpenBucket(bucketName string) (err error)
- func (c *ObsObj) PutObjectFromFile(bucketName, objectName, localFileName string, args ...string) string
- func (c *ObsObj) UploadString(bucketName, objectName string, args ...string) string
- type UpyunConfigOption
Constants ¶
View Source
const ( ACLPrivate = "private" // 私有权限 ACLPublicRead = "public-read" // 公共读 ACLPublicReadWrite = "public-read-write" // 公共读写 )
View Source
const ( AlyOssType = 0 // 阿里云oss QiniuyOssType = 1 // 七牛云 UpyOssType = 2 // 又拍云 TxOssType = 3 // 腾讯云 )
View Source
const ( AlyOssDomain = 0 // oss 域名 AlyOssDiyDomain = 1 // oss 自定义域名 AlyOssSts = 2 // sts新建client )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlyOssBucketJsonData ¶
type AlyOssConfigOption ¶
type AlyOssConfigOption struct { Bucket string // 命令存储空间 Accesskey string // 用户 key id Secretkey string // 用户 key value // https://helpcdn.aliyun.com/document_detail/31837.html Endpoint string // 地域节点 oss-cn-zhangjiakou.aliyuncs.com 不带http:// SecurityToken string }
阿里云对象存储配置
type AlyOssObj ¶
type AlyOssObj struct { Opt AlyOssConfigOption Newtype int // 以什么方式创建Clinet BucketMap map[string]*oss.Bucket // contains filtered or unexported fields }
func (*AlyOssObj) CreateBucket ¶
创建存储空间,根目录下的 Bucket
func (*AlyOssObj) DeleteBucket ¶
func (*AlyOssObj) DeleteObject ¶
删除文件
func (*AlyOssObj) IsBucketExist ¶
存储空间是否存在
func (*AlyOssObj) ListObjects ¶
func (*AlyOssObj) NewAlyOssObj ¶
func (*AlyOssObj) OpenBucket ¶
打开 bucket空间
type CosConfigOption ¶
type CosConfigOption struct { Bucket string APPID string Region string SecretID string SecretKey string }
腾讯云对象存储配置
type ObsConfigOption ¶
type ObsConfigOption struct { Accesskey string Secretkey string Bucket string Endpoint string Domain string }
华为云配置
type ObsObj ¶
type ObsObj struct { Opt ObsConfigOption Newtype int // 以什么方式创建Clinet BucketMap map[string]*obs.GetObjectOutput // contains filtered or unexported fields }
func (*ObsObj) CreateBucket ¶
func (*ObsObj) DeleteBucket ¶
func (*ObsObj) DeleteBucketObj ¶
func (*ObsObj) DeleteObject ¶
func (*ObsObj) IsBucketExist ¶
func (*ObsObj) ListBuckets ¶
func (c *ObsObj) ListBuckets()
func (*ObsObj) ListObjects ¶
func (*ObsObj) OpenBucket ¶
func (*ObsObj) PutObjectFromFile ¶
Click to show internal directories.
Click to hide internal directories.