Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultAdminRole = Role{
Id: "admin",
Name: "admin",
Comment: "admin",
}
View Source
var DefaultAdminUserInfo = UserInfo{
Id: "admin",
LoginName: "admin",
LoginPassword: "3ef7b7e37a0fe84e4c5cdcd1934db0852f608c5c925751b9ef6cf872eb6eeaca",
Salt: "init",
UserName: "admin",
Email: "admin@cali.io",
}
View Source
var DefaultAdminUserInfoRole = UserInfoRoleLink{
Id: "admin",
UserInfo: "admin",
Role: "admin",
}
View Source
var (
DefaultCaliCategory = CaliCategory{Id: "default", Category: "全部", CreatedAt: time.Now().Unix(), UpdatedAt: time.Now().Unix()}
)
View Source
var DefaultSysConfig = make([]SysConfig, 0)
View Source
var DefaultUserInfo = UserInfo{
Id: "init",
LoginName: "anyone",
LoginPassword: "9fafdfffa1222faddec96c954ed67618aa78808842c8753d6d788e77258ada82",
Salt: "init",
UserName: "anyone",
Email: "anyone@cali.io",
}
View Source
var DefaultUserInfoRole = UserInfoRoleLink{
Id: "user",
UserInfo: "init",
Role: "user",
}
View Source
var DefaultUserRole = Role{
Id: "user",
Name: "user",
Comment: "user",
}
View Source
var DefaultWatcherRole = Role{
Id: "watcher",
Name: "watcher",
Comment: "watcher",
}
View Source
var RoleActions = make([]RoleAction, 0)
Functions ¶
This section is empty.
Types ¶
type Api ¶
type Api struct { Result bool `json:"result"` StatusCode int `json:"statusCode"` Message string `json:"message"` Info interface{} `json:"info"` }
func NewErrorApi ¶
func NewErrorApi() Api
func NewErrorApiWithInfo ¶
func NewErrorApiWithInfo(info interface{}) Api
func NewOKApiWithInfo ¶
func NewOKApiWithInfo(info interface{}) Api
type CaliBook ¶ added in v0.1.0
type CaliBook struct { Id string `json:"id" xorm:"pk varchar(64) 'id'"` Title string `json:"title" xorm:"varchar(64) not null 'title'"` Author string `json:"author" xorm:"varchar(64) not null 'author'"` DownloadCount int `json:"download_count" xorm:"int default 0 'download_count'"` DoubanId string `json:"douban_id" xorm:"varchar(16) default '' 'douban_id'"` DoubanJson string `json:"douban_json" xorm:"text 'douban_json'"` CreatedAt int64 `json:"created" xorm:"bigint default 0 'created'"` UpdatedAt int64 `json:"updated" xorm:"bigint default 0 'updated'"` }
type CaliBookCategory ¶ added in v0.1.0
type CaliBookCategory struct { Id string `json:"id" xorm:"pk varchar(64) 'id'"` CaliCategory string `json:"cali_category" xorm:"varchar(64) notnull 'cali_category'"` CaliBook string `json:"cali_book" xorm:"varchar(64) notnull 'cali_book'"` CreatedAt int64 `json:"created" xorm:"bigint default 0 'created'"` UpdatedAt int64 `json:"updated" xorm:"bigint default 0 'updated'"` }
func (CaliBookCategory) TableName ¶ added in v0.1.0
func (CaliBookCategory) TableName() string
type CaliBookVo ¶ added in v0.1.0
type CaliBookVo struct { CaliBook Formats []CaliFormat `json:"formats"` Categories []CaliCategory `json:"categories"` }
type CaliCategory ¶ added in v0.1.0
type CaliCategory struct { Id string `json:"id" xorm:"pk varchar(64) 'id'"` Category string `json:"category" xorm:"varchar(64) notnull 'category'"` CreatedAt int64 `json:"created" xorm:"bigint default 0 'created'"` UpdatedAt int64 `json:"updated" xorm:"bigint default 0 'updated'"` }
func (CaliCategory) TableName ¶ added in v0.1.0
func (CaliCategory) TableName() string
type CaliFormat ¶ added in v0.1.0
type CaliFormat struct { Id string `json:"id" xorm:"pk varchar(64) 'id'"` CaliBook string `json:"cali_book" xorm:"varchar(64) notnull 'cali_book'"` Format string `json:"format" xorm:"varchar(64) notnull 'format'"` UncompressedSize int64 `json:"uncompressed_size" xorm:"bigint default 0 'uncompressed_size'"` Title string `json:"title" xorm:"varchar(64) notnull 'title'"` Author string `json:"author" xorm:"varchar(64) notnull 'author'"` FileName string `json:"file_name" xorm:"varchar(128) notnull 'file_name'"` Tag string `json:"tag" xorm:"varchar(128) default '' 'tag'"` DownloadCount int `json:"download_count" xorm:"int default 0 'download_count'"` CreatedAt int64 `json:"created" xorm:"bigint default 0 'created'"` UpdatedAt int64 `json:"updated" xorm:"bigint default 0 'updated'"` }
func (CaliFormat) TableName ¶ added in v0.1.0
func (CaliFormat) TableName() string
type Role ¶ added in v0.0.2
type RoleAction ¶ added in v0.0.2
type RoleAction struct { Id string `json:"id" xorm:"pk varchar(64) 'id'"` Role string `json:"role" xorm:"varchar(64) notnull 'role'"` Controller string `json:"controller" xorm:"varchar(64) notnull 'controller'"` Method string `json:"method" xorm:"varchar(64) notnull 'method'"` Comments string `json:"comments" xorm:"varchar(64) notnull 'comments'"` //zhu shi }
func (RoleAction) TableName ¶ added in v0.0.2
func (RoleAction) TableName() string
type SysConfig ¶ added in v0.0.3
type SysConfig struct { Id string `json:"id" xorm:"pk varchar(64) 'id'"` Ikey string `json:"key" xorm:"varchar(64) notnull 'ikey'"` Value string `json:"value" xorm:"varchar(64) notnull 'value'"` Comments string `json:"comments" xorm:"varchar(128) default '' 'comments'"` CreatedAt int64 `json:"created" xorm:"bigint default 0 'created'"` UpdatedAt int64 `json:"updated" xorm:"bigint default 0 'updated'"` }
type SysStatus ¶ added in v0.0.4
type SysStatus struct { Id string `json:"id" xorm:"pk varchar(64) 'id'"` Ikey string `json:"key" xorm:"varchar(64) notnull 'ikey'"` Value string `json:"value" xorm:"varchar(64) default '' 'value'"` Comments string `json:"comments" xorm:"varchar(128) default '' 'comments'"` CreatedAt int64 `json:"created" xorm:"bigint default 0 'created'"` UpdatedAt int64 `json:"updated" xorm:"bigint default 0 'updated'"` }
type UserConfig ¶ added in v0.1.0
type UserConfig struct { Id string `json:"id" xorm:"pk varchar(64) 'id'"` UserInfo string `json:"user_info" xorm:"varchar(64) notnull 'user_info'"` MaxDownload int `json:"max_download" xorm:"int default 5 'max_download'"` TmpMaxDownload int `json:"tmpMaxDownload" xorm:"int default 0 'tmp_max_download'"` }
func NewUserConfig ¶ added in v0.1.0
func NewUserConfig(userInfoId string) UserConfig
func (UserConfig) TableName ¶ added in v0.1.0
func (UserConfig) TableName() string
type UserInfo ¶ added in v0.0.2
type UserInfo struct { Id string `json:"id" xorm:"pk varchar(64) 'id'"` LoginName string `json:"loginName" xorm:"varchar(64) notnull 'login_name'"` LoginPassword string `json:"loginPassword" xorm:"varchar(128) notnull 'login_password'"` Salt string `json:"salt" xorm:"varchar(128) notnull 'salt'"` Email string `json:"email" xorm:"varchar(64) notnull 'email'"` UserName string `json:"userName" xorm:"varchar(64) notnull 'user_name'"` Img string `json:"img" xorm:"varchar(256) default '' 'img'"` Valid int `json:"valid" xorm:"int default 0 'valid'"` //0 有效 1 无效 2 wait active CreatedAt int64 `json:"created" xorm:"bigint default 0 'created'"` UpdatedAt int64 `json:"updated" xorm:"bigint default 0 'updated'"` }
type UserInfoBookDownloadLink ¶ added in v0.0.4
type UserInfoBookDownloadLink struct { Id string `json:"id" xorm:"pk varchar(64) 'id'"` UserInfo string `json:"user_info" xorm:"varchar(64) notnull 'user_info'"` CaliFormat string `json:"cali_format" xorm:"varchar(64) notnull 'cali_format'"` CreatedAt int64 `json:"created" xorm:"bigint default 0 'created'"` UpdatedAt int64 `json:"updated" xorm:"bigint default 0 'updated'"` }
func (UserInfoBookDownloadLink) TableName ¶ added in v0.0.4
func (UserInfoBookDownloadLink) TableName() string
type UserInfoBookUploadLink ¶ added in v0.0.4
type UserInfoBookUploadLink struct { Id string `json:"id" xorm:"pk varchar(64) 'id'"` UserInfo string `json:"user_info" xorm:"varchar(64) notnull 'user_info'"` CaliFormat string `json:"cali_format" xorm:"varchar(64) notnull 'cali_format'"` CreatedAt int64 `json:"created" xorm:"bigint default 0 'created'"` UpdatedAt int64 `json:"updated" xorm:"bigint default 0 'updated'"` }
func (UserInfoBookUploadLink) TableName ¶ added in v0.0.4
func (UserInfoBookUploadLink) TableName() string
type UserInfoRoleLink ¶ added in v0.0.2
type UserInfoRoleLink struct { Id string `json:"id" xorm:"pk varchar(64) 'id'"` UserInfo string `json:"user_info" xorm:"varchar(64) notnull 'user_info'"` Role string `json:"role" xorm:"varchar(64) notnull 'role'"` }
func (UserInfoRoleLink) TableName ¶ added in v0.0.2
func (UserInfoRoleLink) TableName() string
Click to show internal directories.
Click to hide internal directories.