Documentation ¶
Index ¶
- Constants
- type Blacklist
- func (this *Blacklist) GetFid() string
- func (this *Blacklist) GetMd5() string
- func (this *Blacklist) GetSize() int
- func (this *Blacklist) GetVerifyDate() time.Time
- func (this *Blacklist) SetFid(fileId string)
- func (this *Blacklist) SetMd5(md5 string)
- func (this *Blacklist) SetSize(size int)
- func (this *Blacklist) SetVerifyDate(verifyDate time.Time)
- type ImgMeta
- type Info
- func (this *Info) GetContentType() string
- func (this *Info) GetFid() string
- func (this *Info) GetFileSuffix() string
- func (this *Info) GetFileType() int
- func (this *Info) GetId() bson.ObjectId
- func (this *Info) GetIdToString() string
- func (this *Info) GetNude() bool
- func (this *Info) GetOnline() bool
- func (this *Info) GetRdm() string
- func (this *Info) GetUploadDate() time.Time
- func (this *Info) SetContentType(contentType string)
- func (this *Info) SetFid(fid string)
- func (this *Info) SetFileSuffix(fileSuffix string)
- func (this *Info) SetFileType(fileType int)
- func (this *Info) SetId(id bson.ObjectId)
- func (this *Info) SetNude(nude bool)
- func (this *Info) SetOnline(online bool)
- func (this *Info) SetRdm(rdm string)
- func (this *Info) SetUploadDate(uploadDate time.Time)
- type Res
- func (this *Res) GetContentType() string
- func (this *Res) GetFid() string
- func (this *Res) GetFileSuffix() string
- func (this *Res) GetFileType() int
- func (this *Res) GetId() bson.ObjectId
- func (this *Res) GetIdToString() string
- func (this *Res) GetMd5() string
- func (this *Res) GetNude() bool
- func (this *Res) GetOnline() bool
- func (this *Res) GetRefnum() int
- func (this *Res) GetSize() int
- func (this *Res) GetUploadDate() time.Time
- func (this *Res) SetContentType(contentType string)
- func (this *Res) SetFid(fid string)
- func (this *Res) SetFileSuffix(fileSuffix string)
- func (this *Res) SetFileType(fileType int)
- func (this *Res) SetId(id string)
- func (this *Res) SetMd5(md5 string)
- func (this *Res) SetNude(nude bool)
- func (this *Res) SetOnline(online bool)
- func (this *Res) SetSize(size int)
- func (this *Res) SetUploadDate(uploadDate time.Time)
Constants ¶
View Source
const ( MSG_SUCCESS = "1000" //正常消息 MSG_ERROR = "1001" //异常消息 MSG_IMG_SAVE_ERROR = "1002" //保存失败 MSG_IMG_READ_ERROR = "1003" //读取失败 MSG_IMG_LESS_THAN = "1004" //超过限制大小,默认小于80M MSG_IMG_ISNUDE = "1005" //图片涉黄 MSG_NOT_SUPPORT = "1006" //不支持文件 )
*
- 消息常量
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blacklist ¶
type Blacklist struct { Fid string //唯一ID Md5 string //md5值 Size int //大小 VerifyDate time.Time //认证时间 }
*
- 文件黑名单
func (*Blacklist) GetVerifyDate ¶
func (*Blacklist) SetVerifyDate ¶
verifyDate
type Info ¶
type Info struct { Id bson.ObjectId `bson:"_id"` Fid string //唯一ID Rdm string //随机数 Nude bool //是否涉黄 Online bool //是否上线 true 永久存储 false 定期清理 FileType int //类型 0、图片文件 1、二进制文件 FileSuffix string //上传文件的后缀 ContentType string //MIME UploadDate time.Time //上传时间 }
*
- 文件信息
func NewInfoByRes ¶
func (*Info) GetContentType ¶
func (*Info) GetFileSuffix ¶
func (*Info) GetFileType ¶
func (*Info) GetIdToString ¶
func (*Info) GetUploadDate ¶
type Res ¶
type Res struct { Id bson.ObjectId `bson:"_id"` Fid string //唯一ID Md5 string //md5值 Size int //大小 Refnum int //上传次数 Nude bool //是否涉黄 Online bool //是否上线 true 永久存储 false 定期清理 FileType int //类型 0、图片文件 1、二进制文件 FileSuffix string //上传文件的后缀 ContentType string //MIME UploadDate time.Time //上传时间 }
*
- 文件资源
func (*Res) GetContentType ¶
func (*Res) GetFileSuffix ¶
func (*Res) GetFileType ¶
func (*Res) GetIdToString ¶
func (*Res) GetUploadDate ¶
Click to show internal directories.
Click to hide internal directories.