Documentation ¶
Index ¶
- Constants
- type AppSecurity
- type AppSecuritySet
- type AppSetting
- type CR
- type DeleteRecordRequest
- type DnsRecord
- type DnsRecordResp
- type HttpRecord
- type HttpRecordResp
- type LoginRequest
- type LoginResponse
- type Pagination
- type Permission
- type PermissionActionSet
- type Resolv
- type Role
- type TblDns
- type TblHttp
- type TblUser
- type UserInfo
- type UserListResp
- type UserRequest
Constants ¶
View Source
const ( CodeOK = 0 CodeBadPermission = 1 CodeBadData = 2 CodeNoAuth = 3 CodeNoPermission = 4 CodeServerInternal = 5 CodeNoData = 6 CodeExpire = 7 RoleSuper = 0 RoleAdmin = 1 RoleNormal = 2 GODNS_RFI_KEY = "GODNSLOG" GODNS_RFI_VALUE = "694ef536e5d0245f203a1bcf8cbf3294" // md5sum($GODNS_RFI_KEY) )
============================================================================== api models ==============================================================================
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppSecurity ¶
type AppSecuritySet ¶
type AppSecuritySet struct {
Password string `json:"password"`
}
type AppSetting ¶
type CR ¶
type CR struct { Message string `json:"message"` Code int `json:"code"` Error error `json:"error,omitempty"` Timestamp int64 `json:"timestemp"` Result interface{} `json:"result,omitempty"` }
commone response
type DeleteRecordRequest ¶
type DeleteRecordRequest struct {
Ids []int64 `json:"ids"`
}
type DnsRecordResp ¶
type DnsRecordResp struct { Pagination Data []DnsRecord `json:"data"` }
type HttpRecord ¶
type HttpRecord struct { Id int64 `json:"id,omitempty"` Uid int64 `json:"-"` Callback string `json:"-"` Path string `json:"path"` Ip string `json:"addr"` Method string `json:"method"` Data string `json:"data"` Ctype string `json:"ctype"` Ua string `json:"ua"` Raw string `xorm:"text"` Ctime time.Time `json:"ctime"` }
type HttpRecordResp ¶
type HttpRecordResp struct { Pagination Data []HttpRecord `json:"data"` }
type LoginRequest ¶
type LoginResponse ¶
type Pagination ¶
type Permission ¶
type Permission struct { RoleId int `json:"roleId"` PermissionId string `json:"permissionId"` PermissionName string `json:"permissionName"` ActionEntitySet []PermissionActionSet `json:"ActionEntitySet"` }
type PermissionActionSet ¶
type Role ¶
type Role struct { Id string `json:"id"` Name string `json:"name"` Description string `json:"description"` Permissions []Permission `json:"permissions"` }
type TblHttp ¶
type TblHttp struct { Id int64 `xorm:"pk autoincr"` Uid int64 `xorm:"notnull"` //TblUser.Id fk Ip string `xorm:"varchar(16) notnull"` Var string `xorm:"varchar(255) index"` Path string `xorm:"text notnull"` Method string `xorm:"varchar(16)"` Data string `xorm:"mediumtext"` Ctype string `xorm:"varchar(64)"` Ua string `xorm:"text"` Raw string `xorm:"text"` Ctime time.Time `xorm:"datetime"` Atime time.Time `xorm:"datetime created"` }
type TblUser ¶
type TblUser struct { Id int64 `xorm:"pk autoincr"` Name string `xorm:"varchar(64) notnull unique"` Email string `xorm:"varchar(64) notnull unique"` Role int `xorm:"tinyint notnull default 0"` Token string `xorm:"varchar(128) notnull unique"` Pass string `xorm:"varchar(128) notnull"` //settings Lang string `xorm:"varchar(16) default('en-US') notnull"` Callback string `xorm:"text"` CallbackMessage string `xorm:"text"` Rebind []string `xorm:"json"` CleanInterval int64 `xorm:"default 3600"` Atime time.Time `xorm:"datetime created"` Utime time.Time `xorm:"datetime updated"` }
tbl_user
type UserListResp ¶
type UserListResp struct { Pagination Data []UserInfo `json:"data"` }
Click to show internal directories.
Click to hide internal directories.