Documentation ¶
Index ¶
- func AddCategory(info *Category) error
- func AddConfig(info *Config) error
- func DeleteCategory(id int) error
- func FileDelete(id int) (string, error)
- func FileInfo(id int64) *[]Attachment
- func FileSave(info *Attachment) (int64, error)
- func GetCategoryJson() *[]Category
- func GetFileJson() *[]Attachment
- func GetOneCategoryInfo(id string) *[]Category
- func GetOneConfig(info, addition string) string
- func Initialization()
- func Login(username, password *Config) error
- func RetGroupConfig(groupName string) map[string]string
- func SiteConfig(data *Config) error
- func SiteConfigMap() map[string]string
- func TableNumber(table string) (count int64, err error)
- func UpdateCategory(data *Category) error
- type Attachment
- type Category
- type Config
- type CosConfigOption
- type OssConfigOption
- type QiniuConfigOption
- type SiteConfigOption
- type UpyunConfigOption
- type UserConfigOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Attachment ¶
type Attachment struct { Id int Cid int Name string Mark string `orm:"size(64)"` Path string Type string Created string `orm:"size(10)"` }
文件存储表
type Category ¶
type Category struct { Id int Name string `orm:"size(64)"` Key string `orm:"size(64)"` Description string }
分类表
type Config ¶
type Config struct { Id int Option string `orm:"size(16)"` Value string `orm:"size(32)"` Addition string `orm:"size(16)"` }
全局配置表 Option=配置选项 Value=配置内容
type CosConfigOption ¶
type CosConfigOption struct { CosBucket string //Bucket CosAppid string //APPID CosRegion string //Region CosSkid string //SecretID CosSk string //SecretKey }
腾讯云对象存储配置
type OssConfigOption ¶
type OssConfigOption struct { OssBucket string //Bucket OssAk string //Accesskey OssSk string //Secretkey OssEndpoint string //地域节点 }
阿里云对象存储配置
type QiniuConfigOption ¶
type QiniuConfigOption struct { QnAk string //Accesskey QnSk string //Secretkey QnBucket string //Bucket QnZone string //Zone }
七牛云配置
type SiteConfigOption ¶
type SiteConfigOption struct { WebTitle string `form:"WebTitle"` Keywords string `form:"Keywords"` Description string `form:"Description"` CopyRight string `form:"CopyRight"` LogoUrl string `form:"LogoUrl"` }
网站后台提交的表单字段 映射到此结构体 需要持续添加
type UpyunConfigOption ¶
type UpyunConfigOption struct { UpBucket string //Bucket UpOperator string //Operator UpPassword string //Password UpDomain string //Domain }
又拍云配置
type UserConfigOption ¶
用户配置信息
Click to show internal directories.
Click to hide internal directories.