Documentation ¶
Index ¶
- Variables
- func Error(c *gin.Context, code int, data interface{})
- type ErrResponse
- type GlobalPageData
- type Menu
- type Menus
- type NodeAddRequest
- type NodeAddResponse
- type NodeAvailableRequest
- type NodeAvailableResponse
- type NodeListResponse
- type NodeResponse
- type PutUserToNodeRequest
- type RequestWithEmail
- type RequestWithEmailAndPassword
- type UserCreateRequest
- type UserListResponse
- type UserNodeResponse
- type UserNodesResponse
- type UserResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var Glob = &GlobalPageData{}
Functions ¶
Types ¶
type ErrResponse ¶
type ErrResponse struct { Code int `json:"code"` Data interface{} `json:"msg"` }
func (*ErrResponse) Build ¶
func (r *ErrResponse) Build(c *gin.Context)
type GlobalPageData ¶
type GlobalPageData struct {
Title, Description, Copyright string
Menus Menus
Body interface{}
CurrentPage string
}
func (*GlobalPageData) AddMenu ¶
func (g *GlobalPageData) AddMenu(name, link string, role int)
func (*GlobalPageData) Init ¶
func (g *GlobalPageData) Init() *GlobalPageData
func (*GlobalPageData) SetCurrentPath ¶
func (g *GlobalPageData) SetCurrentPath(p string)
func (*GlobalPageData) SetCurrentTitle ¶
func (g *GlobalPageData) SetCurrentTitle(p string)
type NodeAddRequest ¶
type NodeAddRequest struct{}
type NodeAddResponse ¶
type NodeAddResponse struct { Addr string `json:"addr"` Port string `json:"port"` Tag string `json:"tag"` }
func (*NodeAddResponse) Build ¶
func (r *NodeAddResponse) Build(c *gin.Context)
type NodeAvailableRequest ¶
type NodeAvailableResponse ¶
type NodeAvailableResponse struct {
State int `json:"state"`
}
func (*NodeAvailableResponse) Build ¶
func (r *NodeAvailableResponse) Build(c *gin.Context)
type NodeListResponse ¶
type NodeListResponse []*NodeResponse
type NodeResponse ¶
type PutUserToNodeRequest ¶
type RequestWithEmail ¶
type RequestWithEmail struct {
Email string `json:"email"`
}
type UserCreateRequest ¶
type UserListResponse ¶
type UserListResponse []*UserResponse
type UserNodeResponse ¶
type UserNodesResponse ¶
type UserNodesResponse []*UserNodeResponse
type UserResponse ¶
Click to show internal directories.
Click to hide internal directories.