serializer

package
v0.0.0-...-426aaea Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminInfo

type AdminInfo struct {
	ID           int       `json:"id"`
	Name         string    `json:"name"`
	LoginTime    time.Time `json:"login_time"`
	Avatar       string    `json:"avatar"`
	Introduction string    `json:"introduction"`
	Roles        []string  `json:"roles"`
}

type AdminSessionInfo

type AdminSessionInfo struct {
	ID        int       `json:"id"`
	Username  string    `json:"user_name"`
	LoginTime time.Time `json:"login_time"`
}

type Response

type Response struct {
	Errno  int         `json:"errno"`
	ErrMsg string      `json:"errmsg,omitempty"`
	Data   interface{} `json:"data,omitempty"`
}

func BuildResponseErr

func BuildResponseErr(code int, err error) Response

func BuildResponseOk

func BuildResponseOk(code int) Response

func BuildResponseOkWithData

func BuildResponseOkWithData(code int, data interface{}) Response

type ServiceList

type ServiceList struct {
	Total int                `json:"total"`
	List  []*ServiceListItem `json:"list"`
}

type ServiceListItem

type ServiceListItem struct {
	ID          uint   `json:"id"`
	ServiceName string `json:"service_name"`
	ServiceDesc string `json:"service_desc"`
	LoadType    int    `json:"load_type" `
	ServiceAddr string `json:"service_addr"`
	Qps         int64  `json:"qps" `
	Qpd         int64  `json:"qpd" `
	TotalNode   int    `json:"total_node"`
}

type Token

type Token struct {
	Token string `json:"token"`
}

Jump to

Keyboard shortcuts

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