Documentation ¶
Index ¶
- type AliResp
- type BaiduResp
- type CCResp
- type DbOption
- type FakerData
- type FakerTable
- type FlickrAccount
- type FlickrGetPicResp
- type FormFile
- type JueJinResp
- type NetEasyResp
- type RespJson
- type ResultJson
- type SinaAccount
- type SinaData
- type SinaError
- type SinaMsg
- type SinaPics
- type SinaPublicResponse
- type SiteConfig
- type SmData
- type SmResponse
- type UploadConfig
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AliResp ¶
type AliResp struct { FsUrl string `json:"fs_url"` Code string `json:"code"` Size string `json:"size"` Width string `json:"width"` Url string `json:"url"` Hash string `json:"hash"` }
阿里
func (AliResp) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (AliResp) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*AliResp) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*AliResp) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type BaiduResp ¶
type BaiduResp struct { Errorn int `json:"errorn"` Url string `json:"url"` QuerySign string `json:"querySign"` Simid string `json:"simid"` }
百度图片
func (BaiduResp) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (BaiduResp) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*BaiduResp) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*BaiduResp) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type CCResp ¶
type CCResp struct { Code int `json:"code"` SuccessImage []interface{} `json:"success_image"` }
Upload.cc
func (CCResp) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (CCResp) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*CCResp) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*CCResp) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type DbOption ¶
type DbOption struct { UseDb bool `json:"use_db"` DbType string `json:"db_type"` DbHost string `json:"db_host"` DbName string `json:"db_name"` DbUser string `json:"db_user"` DblPass string `json:"dbl_pass"` TablePrefix string `json:"table_prefix"` }
func (DbOption) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (DbOption) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*DbOption) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*DbOption) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type FakerData ¶
type FakerData struct { ID int `json:"id"` Title string `json:"title"` Author string `json:"author"` PageViews int `json:"page_views"` DisPlayTime string `json:"dis_play_time"` }
Faker Data
func (FakerData) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (FakerData) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*FakerData) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*FakerData) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type FakerTable ¶
func (FakerTable) MarshalEasyJSON ¶
func (v FakerTable) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (FakerTable) MarshalJSON ¶
func (v FakerTable) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*FakerTable) UnmarshalEasyJSON ¶
func (v *FakerTable) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*FakerTable) UnmarshalJSON ¶
func (v *FakerTable) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type FlickrAccount ¶
type FlickrAccount struct { //default size DefaultSize string `json:"default_size"` //api_key Id string `json:"id"` Api_key string `json:"api_key"` Api_secret string `json:"api_secret"` Oauth_token string `json:"oauth_token"` Oauth_token_secret string `json:"oauth_token_secret"` }
func (FlickrAccount) MarshalEasyJSON ¶
func (v FlickrAccount) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (FlickrAccount) MarshalJSON ¶
func (v FlickrAccount) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*FlickrAccount) UnmarshalEasyJSON ¶
func (v *FlickrAccount) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*FlickrAccount) UnmarshalJSON ¶
func (v *FlickrAccount) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type FlickrGetPicResp ¶
type FlickrGetPicResp struct { XMLName xml.Name `xml:"photo"` Id string `xml:"id,attr"` Secret string `xml:"secret,attr"` Server string `xml:"server,attr"` Farm string `xml:"farm,attr"` Dateuploaded string `xml:"dateuploaded,attr"` Originalsecret string `xml:"originalsecret,attr"` Originalformat string `xml:"originalformat,attr"` }
func (FlickrGetPicResp) MarshalEasyJSON ¶
func (v FlickrGetPicResp) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (FlickrGetPicResp) MarshalJSON ¶
func (v FlickrGetPicResp) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*FlickrGetPicResp) UnmarshalEasyJSON ¶
func (v *FlickrGetPicResp) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*FlickrGetPicResp) UnmarshalJSON ¶
func (v *FlickrGetPicResp) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type FormFile ¶
type FormFile struct { Name string //File Name Key string //File upload Name Value []byte //File Value Type string //File MIME Type }
文件类型结构体
func (FormFile) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (FormFile) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*FormFile) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*FormFile) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type JueJinResp ¶
type JueJinResp struct { //S string `json:"s"` //M string `json:"m"` D interface{} `json:"d"` }
掘金图片
func (JueJinResp) MarshalEasyJSON ¶
func (v JueJinResp) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (JueJinResp) MarshalJSON ¶
func (v JueJinResp) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*JueJinResp) UnmarshalEasyJSON ¶
func (v *JueJinResp) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*JueJinResp) UnmarshalJSON ¶
func (v *JueJinResp) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type NetEasyResp ¶
网易图片
func (NetEasyResp) MarshalEasyJSON ¶
func (v NetEasyResp) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (NetEasyResp) MarshalJSON ¶
func (v NetEasyResp) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*NetEasyResp) UnmarshalEasyJSON ¶
func (v *NetEasyResp) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*NetEasyResp) UnmarshalJSON ¶
func (v *NetEasyResp) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type RespJson ¶
type RespJson struct { Code int `json:"code"` Msg string `json:"msg"` Data interface{} `json:"data"` }
func (RespJson) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (RespJson) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*RespJson) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*RespJson) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type ResultJson ¶
type ResultJson struct { Code int `json:"code"` Msg string `json:"msg"` Data fileData `json:"data"` }
Api & upload Json
func (ResultJson) MarshalEasyJSON ¶
func (v ResultJson) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (ResultJson) MarshalJSON ¶
func (v ResultJson) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*ResultJson) UnmarshalEasyJSON ¶
func (v *ResultJson) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ResultJson) UnmarshalJSON ¶
func (v *ResultJson) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type SinaAccount ¶
type SinaAccount struct { //用户名 UserName string `json:"user_name"` //密码 PassWord string `json:"pass_word"` //新浪 Cookie 更新的频率,默认为3600s ,单位 s ResetSinaCookieTime int `json:"reset_sina_cookie_time"` //新浪图床默认使用的尺寸大小 square,thumb150,orj360,orj480,mw690,mw1024,mw2048,small,bmiddle,large 、默认为large DefultPicSize string `json:"defult_pic_size"` }
func (SinaAccount) MarshalEasyJSON ¶
func (v SinaAccount) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (SinaAccount) MarshalJSON ¶
func (v SinaAccount) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*SinaAccount) UnmarshalEasyJSON ¶
func (v *SinaAccount) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SinaAccount) UnmarshalJSON ¶
func (v *SinaAccount) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type SinaData ¶
type SinaData struct { Count int `json:"count"` Data string `json:"data"` Pics SinaPics `json:"pics"` }
func (SinaData) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (SinaData) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*SinaData) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SinaData) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type SinaError ¶
func (SinaError) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (SinaError) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*SinaError) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SinaError) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type SinaMsg ¶
Sina 图床 json
func (SinaMsg) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (SinaMsg) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*SinaMsg) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SinaMsg) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type SinaPics ¶
type SinaPics struct {
Pic_1 picInfo `json:"pic_1"`
}
func (SinaPics) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (SinaPics) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*SinaPics) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SinaPics) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type SinaPublicResponse ¶
type SinaPublicResponse struct { Code int `json:"code"` Msg string `json:"msg"` Data map[string]interface{} `json:"data"` }
新浪公共接口,只需要提供 api 地址即可 {"code":1,"msg":"操作成功","data":{"code":"200","width":176,"height":254,"size":13476,"pid":"005BYqpgly1fz9xxss19rj372jrq","url":"https:\/\/ws3.sinaimg.cn\/large\/005BYqpgly1fz9xxss19rj304w072jrq.jpg"},"runtime":"0.311697s"}
func (SinaPublicResponse) MarshalEasyJSON ¶
func (v SinaPublicResponse) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (SinaPublicResponse) MarshalJSON ¶
func (v SinaPublicResponse) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*SinaPublicResponse) UnmarshalEasyJSON ¶
func (v *SinaPublicResponse) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SinaPublicResponse) UnmarshalJSON ¶
func (v *SinaPublicResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type SiteConfig ¶
type SiteConfig struct { //站点名称 SiteName string `json:"site_name"` SiteFooter string `json:"site_footer"` //网站链接 SiteUrl string `json:"site_url"` //最大上传的图片个数 SiteUploadMaxNumber int `json:"site_upload_max_number"` //最大图片规格 MB SiteUpLoadMaxSize int64 `json:"site_up_load_max_size"` //是否使用 Mysql,使用 Mysql 后就不会再使用 json 进行配置 DbOption DbOption `json:"db_option"` //JWT Token JwtSecret string `json:"jwt_secret"` //加密所需 Salt AuxpiSalt string `json:"auxpi_salt"` //是否开启 API OpenApiUpLoad bool `json:"open_api_up_load"` //Api token 空为 不设置token ApiToken string `json:"api_token"` //Api 默认上传图床 默认为搜狗 可选 SM 图床 ApiDefault string `json:"api_default"` //是否对配置进行缓存 CacheConfig bool `json:"cache_config"` //图床储存的一些配置 SiteUploadWay UploadConfig `json:"site_upload_way"` }
Config 配置
func (SiteConfig) MarshalEasyJSON ¶
func (v SiteConfig) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (SiteConfig) MarshalJSON ¶
func (v SiteConfig) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*SiteConfig) UnmarshalEasyJSON ¶
func (v *SiteConfig) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SiteConfig) UnmarshalJSON ¶
func (v *SiteConfig) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type SmData ¶
type SmData struct { Width int `json:"width"` Height int `json:"height"` Filename string `json:"filename"` Storename string `json:"storename"` Size int `json:"size"` Path string `json:"path"` Hash string `json:"hash"` Timestamp int `json:"timestamp"` Ip string `json:"ip"` Url string `json:"url"` Delete string `json:"delete"` }
func (SmData) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (SmData) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*SmData) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SmData) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type SmResponse ¶
SM 图床 json
func (SmResponse) MarshalEasyJSON ¶
func (v SmResponse) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (SmResponse) MarshalJSON ¶
func (v SmResponse) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*SmResponse) UnmarshalEasyJSON ¶
func (v *SmResponse) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SmResponse) UnmarshalJSON ¶
func (v *SmResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type UploadConfig ¶
type UploadConfig struct { //TODO:是否开启本地上传 LocalStore bool `json:"local_store"` //是否开启微博图床 OpenSinaPicStore bool `json:"open_sina_pic_store"` //Sina Account SinaAccount SinaAccount `json:"sina_account"` //是否开启 flickr 图床 (此功能该可以在后台开启) OpenFlickrStore bool `json:"open_flickr_store"` //Flickr 配置 FlickrAccount FlickrAccount `json:"flickr_account"` }
func (UploadConfig) MarshalEasyJSON ¶
func (v UploadConfig) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (UploadConfig) MarshalJSON ¶
func (v UploadConfig) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*UploadConfig) UnmarshalEasyJSON ¶
func (v *UploadConfig) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*UploadConfig) UnmarshalJSON ¶
func (v *UploadConfig) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type UserInfo ¶
type UserInfo struct { User string `json:"user"` Status string `json:"status"` Code int `json:"code"` Token string `json:"token"` Name string `json:"name"` Avatar string `json:"avatar"` Introduction string `json:"introduction"` Roles []string `json:"roles"` Setting interface{} `json:"setting"` }
func (UserInfo) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (UserInfo) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*UserInfo) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*UserInfo) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface