domain

package
v0.0.0-...-4ae83c4 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArithArgs

type ArithArgs struct {
	A int
	B int
}

type ArithReply

type ArithReply struct {
	C int
}

type BizError

type BizError struct {
	Code int64
	Msg  string
}

type Model

type Model struct {
	Id        uint   `json:"id"`
	UpdatedAt string `json:"updatedAt"`
	CreatedAt string `json:"createdAt"`
}

Model

type NestedItem

type NestedItem struct {
	Id       int           `json:"id"`
	Name     string        `json:"name"`
	Parent   int           `json:"parent"`
	Children []*NestedItem `json:"children"`
}

type PageData

type PageData struct {
	Result interface{} `json:"result"`

	Pagination Pagination `json:"pagination"`
}

func (*PageData) Populate

func (d *PageData) Populate(result interface{}, total int64, page, pageSize int)

type PaginateReq

type PaginateReq struct {
	Page     int    `json:"page"`
	PageSize int    `json:"pageSize"`
	Field    string `json:"field"`
	Order    string `json:"order"`
}

PaginateReq

func (*PaginateReq) ConvertParams

func (r *PaginateReq) ConvertParams()

type Pagination

type Pagination struct {
	Total    int `json:"total"`
	Page     int `json:"page"`
	PageSize int `json:"pageSize"`
}

type ReqId

type ReqId struct {
	Id uint `json:"id" param:"id"`
}

ReqId

type Response

type Response struct {
	Code int64       `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data"`
}

Response

type RpcReq

type RpcReq struct {
	NodeIp   string
	NodePort int

	ApiPath   string
	ApiMethod string
	Data      interface{}
}

type RpcResp

type RpcResp struct {
	Code    consts.ResultCode `json:"code"`
	Msg     string            `json:"msg"`
	Payload interface{}       `json:"payload"`
}

func (*RpcResp) Fail

func (result *RpcResp) Fail(msg string)

func (*RpcResp) Failf

func (result *RpcResp) Failf(str string, args ...interface{})

func (*RpcResp) IsSuccess

func (result *RpcResp) IsSuccess() bool

func (*RpcResp) Pass

func (result *RpcResp) Pass(msg string)

func (*RpcResp) Passf

func (result *RpcResp) Passf(str string, args ...interface{})

Jump to

Keyboard shortcuts

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