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"` //原始文件名 RealName string `json:"real_name"` //实际文件名 Ext string `json:"ext"` Md5 string `json:"md5"` Dir []string `json:"dir"` //多级目录 Method int32 `json:"method"` Source int32 `json:"source"` //`来源 CreateAt int64 `json:"create_at"` ProductId int64 `json:"product_id"` //产品 BizId int64 `json:"biz_id"` //业务 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:"task_id,omitempty"` //异步时 Id string `json:"id,omitempty"` //文件id值 Key string `json:"key"` //文件key Url string `json:"url,omitempty"` //文件url Name string `json:"name,omitempty"` //文件名 Type string `json:"type"` //文件类型 Path string `json:"-"` //本地文件路径 Method int32 `json:"method,omitempty"` //存储方法 CreateAt int64 `json:"create_at"` //创建的时间 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.