Documentation ¶
Index ¶
- Constants
- Variables
- func ImageView2(scheme string, bucket Bucket, key string, options ...ImageView2Option) string
- func NewMac(ak, sk string) *auth.Credentials
- func UploadToken(ak, sk string, bucket Bucket, expires ...uint64) string
- type Bucket
- type BucketDomain
- type BucketName
- type ImageStyle
- type ImageView2Option
- func ImageView2Colors(value int64) ImageView2Option
- func ImageView2Format(value string) ImageView2Option
- func ImageView2Height(value int64) ImageView2Option
- func ImageView2IgnoreErr(value int64) ImageView2Option
- func ImageView2Interlace(value string) ImageView2Option
- func ImageView2Mode(value int64) ImageView2Option
- func ImageView2Quality(value int64) ImageView2Option
- func ImageView2Watermark(value string) ImageView2Option
- func ImageView2Width(value int64) ImageView2Option
- type ImageView2Params
- type QBox
- func (box *QBox) Fetch(url string, bucket Bucket, keys ...string) (storage.FetchRet, error)
- func (box *QBox) Pfop(bucket Bucket, key string, fops []string, pipeline, notifyUrl string, ...) (string, error)
- func (box *QBox) PutFile(p string, bucket Bucket, keyPrefix ...string) (*UploadedRet, error)
- func (box *QBox) UploadToken(bucket Bucket, expires ...uint64) string
- type UploadedRet
Constants ¶
View Source
const ( BucketImolaStatic Bucket = 1 BucketNestStatic Bucket = 2 BucketNestPhoto Bucket = 3 BucketNameImolaStatic BucketName = "zhuke-static" BucketNameNestStatic BucketName = "dome-static" BucketNameNestPhoto BucketName = "nestciao-photo" BucketDomainImolaStatic BucketDomain = "static.imolacn.com" BucketDomainNestStatic BucketDomain = "static.zc0901.com" BucketDomainNestPhoto BucketDomain = "img.imolacn.com" )
View Source
const (
ReturnBody = `` /* 498-byte string literal not displayed */
)
Variables ¶
View Source
var BucketImageStyle = map[int64]*ImageStyle{ BucketImolaStatic.Int64(): { Url: "!wxa.pic", ShareUrl: "!wxa.pic", DownloadUrl: "", OriginalUrl: "!wxa.pic", ImageSearchUrl: "!wxa.pic", }, BucketNestPhoto.Int64(): { Url: "~500x.jpg", ShareUrl: "~500x.jpg", DownloadUrl: "~jpg", OriginalUrl: "~1200x1200.jpg", ImageSearchUrl: "~736x.jpg", }, }
Functions ¶
func ImageView2 ¶
func ImageView2(scheme string, bucket Bucket, key string, options ...ImageView2Option) string
ImageView2 七牛图片基本处理 官方文档:https://developer.qiniu.com/dora/1279/basic-processing-images-imageview2
func NewMac ¶
func NewMac(ak, sk string) *auth.Credentials
Types ¶
type BucketDomain ¶
type BucketDomain string
BucketDomain 标志七牛存储空间的域名
func (BucketDomain) String ¶
func (bucketDomain BucketDomain) String() string
type BucketName ¶
type BucketName string
BucketName 标志七牛存储空间的名称
func (BucketName) String ¶
func (bucketName BucketName) String() string
type ImageStyle ¶
type ImageView2Option ¶
type ImageView2Option func(params *ImageView2Params)
func ImageView2Colors ¶
func ImageView2Colors(value int64) ImageView2Option
func ImageView2Format ¶
func ImageView2Format(value string) ImageView2Option
func ImageView2Height ¶
func ImageView2Height(value int64) ImageView2Option
func ImageView2IgnoreErr ¶
func ImageView2IgnoreErr(value int64) ImageView2Option
func ImageView2Interlace ¶
func ImageView2Interlace(value string) ImageView2Option
func ImageView2Mode ¶
func ImageView2Mode(value int64) ImageView2Option
func ImageView2Quality ¶
func ImageView2Quality(value int64) ImageView2Option
func ImageView2Watermark ¶
func ImageView2Watermark(value string) ImageView2Option
func ImageView2Width ¶
func ImageView2Width(value int64) ImageView2Option
type ImageView2Params ¶
type QBox ¶
type QBox struct {
// contains filtered or unexported fields
}
func (*QBox) Pfop ¶
func (box *QBox) Pfop(bucket Bucket, key string, fops []string, pipeline, notifyUrl string, force bool) (string, error)
Pfop 持久化数据处理
type UploadedRet ¶
type UploadedRet struct { Key string `json:"key"` Size int64 `json:"size"` Type string `json:"type"` Hash string `json:"hash"` Width int64 `json:"width"` Height int64 `json:"height"` Orientation string `json:"orientation"` Color string `json:"color"` VideoRotate string `json:"videoRotate"` VideoWidth int64 `json:"videoWidth"` VideoHeight int64 `json:"videoHeight"` VideoDuration string `json:"videoDuration"` Url string `json:"url"` OriginalUrl string `json:"originalUrl"` }
Click to show internal directories.
Click to hide internal directories.