internal

package
v0.0.1-45c8966 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

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

Types

type ChangePasswordRequest

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

type ErrResponse

type ErrResponse struct {
	Code int         `json:"code"`
	Data interface{} `json:"msg"`
}

func (*ErrResponse) Build

func (r *ErrResponse) Build(c *gin.Context)

type GetNodeListRequest

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

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 Request

type Request interface{}

type Response

type Response interface {
	Build(c *gin.Context)
}

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"`
}

Jump to

Keyboard shortcuts

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