Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BucketInfo ¶
type ChunkResult ¶
type Config ¶
type Config struct { Access Cdn string `yaml:"fileCdn" json:"fileCdn"` TmpPath string `yaml:"tmpPath" json:"tmpPath"` //本地的临时文件 TokenCallbackUrl string `yaml:"tokenCallbackUrl" json:"tokenCallbackUrl"` MinChunkSize int64 `yaml:"minChunkSize" json:"minChunkSize"` Expires int64 `yaml:"expires" json:"expires"` //TOKEN 过期秒 UseHTTPS bool `yaml:"useHttps" json:"useHttps"` //是否使用https域名 UseCdn bool `yaml:"useCdn" json:"useCdn"` //上传是否使用CDN上传加速 }
type File ¶
type File struct { Info FileInfo `yaml:"info,omitempty" json:"info,omitempty"` Source string `yaml:"src,omitempty" json:"src,omitempty"` Destination string `yaml:"dst,omitempty" json:"dst,omitempty"` StripParent bool `yaml:"strip_parent,omitempty" json:"strip_parent,omitempty"` Default bool `yaml:"-" json:"-"` }
File is a file inside an archive.
type FileInfo ¶
type FileInfo struct { Mode os.FileMode `yaml:"mode,omitempty" json:"mode,omitempty"` Owner string `yaml:"owner,omitempty" json:"owner,omitempty"` Group string `yaml:"group,omitempty" json:"group,omitempty"` MTime string `yaml:"mtime,omitempty" json:"mtime,omitempty"` ParsedMTime time.Time `yaml:"-" json:"-"` }
FileInfo is the file info of a file.
type Path ¶
type Path struct { Id string `json:"id"` //作品ID: vid-nums, 其它id Product string `json:"product"` //产品名 Biz string `json:"biz"` //业务名 Type string `json:"type"` //类型 Name string `json:"name"` //原始文件名 Ext string `json:"ext"` Md5 string `json:"md5"` SaveType int32 `json:"saveType"` ProductId int64 `json:"productId"` //产品 BizId int64 `json:"bizId"` //业务 Source int32 `json:"source"` //`来源 Size int64 `json:"size"` }
type ReaderStream ¶ added in v1.8.75
type ReaderStream interface {
OnReader(r io.ReadSeeker)
}
type ReaderStreamFunc ¶ added in v1.8.75
type ReaderStreamFunc func(r io.ReadSeeker)
func (ReaderStreamFunc) OnReader ¶ added in v1.8.75
func (s ReaderStreamFunc) OnReader(r io.ReadSeeker)
type Result ¶
type Result struct { TaskId string `json:"taskId,omitempty"` Id string `json:"id,omitempty"` //断点续传=UploadId Key string `json:"key"` Url string `json:"url"` Name string `json:"name"` Path string `json:"-"` //本地文件路径 SaveType int32 `json:"saveType"` Duration int64 `json:"duration"` //豪秒 Business interface{} `json:"business,omitempty"` //业务定义数据 }
type WriteStream ¶ added in v1.8.75
type WriteStream interface {
OnWriter(r io.WriteSeeker)
}
type WriterStreamFunc ¶ added in v1.8.75
type WriterStreamFunc func(r io.WriteSeeker)
func (WriterStreamFunc) OnWriter ¶ added in v1.8.75
func (s WriterStreamFunc) OnWriter(r io.WriteSeeker)
Click to show internal directories.
Click to hide internal directories.