Documentation
¶
Index ¶
- Variables
- type Api
- type Author
- type Book
- type BookPluginData
- type BookRatingLink
- type BookSerieLink
- type BookTagLink
- type BookVo
- type Comments
- type ConversionOption
- type CustomColumn
- type Data
- type Feed
- type Identifier
- type Language
- type Publisher
- type Role
- type RoleAction
- type Tag
- type UserInfo
- type UserInfoRoleLink
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 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 Author ¶
type Book ¶
type Book struct {
Id int `json:"id" xorm:"pk 'id'"`
Title string `json:"title" xorm:"'title'"`
Sort string `json:"sort" xorm:"'sort'"`
Timestamp time.Time `json:"timestamp" xorm:"'timestamp'"`
Pubdate time.Time `json:"pubdate" xorm:"'pubdate'"`
SeriesIndex float64 `json:"series_index" xorm:"'series_index'"`
AuthorSort string `json:"author_sort" xorm:"'author_sort'"`
Isbn string `json:"isbn" xorm:"'isbn'"`
Lccn string `json:"lccn" xorm:"'lccn'"`
Path string `json:"path" xorm:"'path'"`
Flags int `json:"flags" xorm:"'flags'"`
Uuid string `json:"uuid" xorm:"'uuid'"`
HasCover int `json:"has_cover" xorm:"'has_cover'"`
LastModified time.Time `json:"last_modified" xorm:"'last_modified'"`
}
type BookPluginData ¶
type BookPluginData struct {
Id int `json:"id" xorm:"pk 'id'"`
Book int `json:"book" xorm:"'book'"`
Name string `json:"name" xorm:"'name'"`
Val string `json:"val" xorm:"'val'"`
}
func (BookPluginData) TableName ¶
func (BookPluginData) TableName() string
type BookRatingLink ¶
type BookRatingLink struct {
Id int `json:"id" xorm:"pk 'id'"`
Book int `json:"book" xorm:"'book'"`
Rating int `json:"rating" xorm:"'rating'"`
}
func (BookRatingLink) TableName ¶
func (BookRatingLink) TableName() string
type BookSerieLink ¶
type BookSerieLink struct {
Id int `json:"id" xorm:"pk 'id'"`
Book int `json:"book" xorm:"'book'"`
Series int `json:"series" xorm:"'series'"`
}
func (BookSerieLink) TableName ¶
func (BookSerieLink) TableName() string
type BookTagLink ¶ added in v0.0.2
type BookTagLink struct {
Id int `json:"id" xorm:"pk 'id'"`
Book int `json:"book" xorm:"'book'"`
Tag int `json:"series" xorm:"'tag'"`
}
func (BookTagLink) TableName ¶ added in v0.0.2
func (BookTagLink) TableName() string
type BookVo ¶
type BookVo struct {
Id int `json:"id" xorm:"pk 'id'"`
Title string `json:"title" xorm:"'title'"` // book name
Sort string `json:"sort" xorm:"'sort'"`
Timestamp time.Time `json:"timestamp" xorm:"'timestamp'"`
Pubdate time.Time `json:"pubdate" xorm:"'pubdate'"`
SeriesIndex float64 `json:"series_index" xorm:"'series_index'"`
AuthorSort string `json:"author_sort" xorm:"'author_sort'"`
Isbn string `json:"isbn" xorm:"'isbn'"`
Lccn string `json:"lccn" xorm:"'lccn'"`
Path string `json:"path" xorm:"'path'"`
Flags int `json:"flags" xorm:"'flags'"`
Uuid string `json:"uuid" xorm:"'uuid'"`
HasCover int `json:"has_cover" xorm:"'has_cover'"`
LastModified time.Time `json:"last_modified" xorm:"'last_modified'"`
Rating int `json:"rating" xorm:"'rating'"`
Name string `json:"name" xorm:"'name'"` //author name
Comments string `json:"comments" xorm:"'comments'"` //comments's text only use in single book
Format string `json:"format" xorm:"'format'"`
}
type Comments ¶
type ConversionOption ¶
type ConversionOption struct {
Id int `json:"id" xorm:"pk 'id'"`
Format string `json:"format" xorm:"'format'"`
Book int `json:"book" xorm:"'book'"`
Data string `json:"data" xorm:"'data'"`
}
func (ConversionOption) TableName ¶
func (ConversionOption) TableName() string
type CustomColumn ¶
type CustomColumn struct {
Id int `json:"id" xorm:"pk 'id'"`
Label string
Name string
Datatype string
MarkForDelete int
Editable int
Display string
IsMultiple int
Normalized int
}
func (CustomColumn) TableName ¶
func (CustomColumn) TableName() string
type Data ¶
type Feed ¶
type Identifier ¶
type Identifier struct {
Id int `json:"id" xorm:"pk 'id'"`
Book int `json:"book" xorm:"'book'"`
Type string `json:"type" xorm:"'type'"`
Val string `json:"val" xorm:"'val'"`
}
func (Identifier) TableName ¶
func (Identifier) TableName() string
type Language ¶
type Publisher ¶
type Role ¶ added in v0.0.2
type RoleAction ¶ added in v0.0.2
type RoleAction struct {
Id string `json:"id" xorm:"pk 'id'"`
Role string `json:"role" xorm:"varchar(32) 'role'"`
Controller string `json:"controller" xorm:"'controller'"`
Method string `json:"method" xorm:"'method'"`
Comments string `json:"comments" xorm:"'comments'"` //zhu shi
}
func (RoleAction) TableName ¶ added in v0.0.2
func (RoleAction) TableName() string
type UserInfo ¶ added in v0.0.2
type UserInfo struct {
Id string `json:"id" xorm:"pk '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'"`
UserName string `json:"userName" xorm:"varchar(64) notnull 'user_name'"`
Email string `json:"email" xorm:"varchar(128) 'email'"`
Img string `json:"img" xorm:"varchar(256) 'img'"`
Valid int `json:"valid" xorm:"int default 0 'valid'"` //0 有效 1 无效
}
type UserInfoRoleLink ¶ added in v0.0.2
type UserInfoRoleLink struct {
Id string `json:"id" xorm:"pk 'id'"`
UserInfo string `json:"user_info" xorm:"'user_info'"`
Role string `json:"role" xorm:"'role'"`
}
func (UserInfoRoleLink) TableName ¶ added in v0.0.2
func (UserInfoRoleLink) TableName() string
Click to show internal directories.
Click to hide internal directories.