internal

package
v0.0.1-f37a881 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Glob = &GlobalPageData{}

Functions

func Error

func Error(c *gin.Context, code int, data interface{})

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 Menu struct {
	Name, Link string
	Role       int
	Menus      Menus
}
type Menus []*Menu

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 NodeAvailableRequest struct {
	Addr string `json:"addr"`
	Port string `json:"port"`
	Tag  string `json:"tag"`
}

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 NodeResponse struct {
	Addr   string `json:"addr"`
	Region string `json:"region"`
}

type PutUserToNodeRequest

type PutUserToNodeRequest struct {
	Email string `json:"email" form:"email"`
	Role  string `json:"role" form:"role"`
	Node  string `json:"node" form:"node"`
}

type RequestWithEmail

type RequestWithEmail struct {
	Email string `json:"email"`
}

type RequestWithEmailAndPassword

type RequestWithEmailAndPassword struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type UserCreateRequest

type UserCreateRequest struct {
	Email    string `json:"email"`
	Password string `json:"password"`
	Role     string `json:"role"`
}

type UserListResponse

type UserListResponse []*UserResponse

type UserNodeResponse

type UserNodeResponse struct {
	Name  string `json:"name"`
	ID    uint   `json:"id"`
	Using bool   `json:"using"`
}

type UserNodesResponse

type UserNodesResponse []*UserNodeResponse

type UserResponse

type UserResponse struct {
	Email    string           `json:"email"`
	RoleId   int              `json:"roleId"`
	Locked   bool             `json:"locked"`
	IsAdmin  bool             `json:"isAdmin"`
	Role     string           `json:"role"`
	NodeNum  int              `json:"nodeNum"`
	NodeList NodeListResponse `json:"nodeList"`
	Token    string           `json:"token"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL