_domain

package
v0.0.0-...-36dec41 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NoErr         = BizErr{0, "请求成功"}
	AuthErr       = BizErr{401, "请重新登录"}
	AuthActionErr = BizErr{403, "权限不足"}

	NeedInitErr = BizErr{1000, "未初始化"}
	ParamErr    = BizErr{2000, "参数解析失败"}

	RequestErr = BizErr{3000, "请求失败"}
	FailErr    = BizErr{3500, "处理失败"}
	SystemErr  = BizErr{4000, "系统错误"}
	LoginErr   = BizErr{5000, "登录失败"}

	ErrNoUser              = BizErr{10100, "找不到用户"}
	ErrNameExist           = BizErr{10100, "同名记录已存在"}
	ErrUsernameExist       = BizErr{10200, "用户名已占用"}
	ErrEmailExist          = BizErr{10300, "邮箱已存在"}
	ErrShortNameExist      = BizErr{10400, "英文缩写已存在"}
	ErrPasswordMustBeSame  = BizErr{10500, "两次密码必须一样"}
	ErrUserNotInProject    = BizErr{10600, "不是该项目的成员"}
	ErrProjectNotExist     = BizErr{10700, "项目不存在"}
	ErrImportSourceDeleted = BizErr{10800, "导入来源已删除"}
	ErrThirdPartyFunctions = BizErr{10900, "获取消息体失败"}
	ErrUserProjectLimit    = BizErr{11000, "免费版项目成员数量限制最多3人"}
)

Functions

This section is empty.

Types

type ArithArgs

type ArithArgs struct {
	A int
	B int
}

type ArithReply

type ArithReply struct {
	C int
}

type BizErr

type BizErr struct {
	Code int64  `json:"code"`
	Msg  string `json:"message"`
}

func (BizErr) Error

func (e BizErr) Error() string

type Model

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

type MqMsg

type MqMsg struct {
	Namespace string `json:"namespace"`
	Room      string `json:"room"`
	Event     string `json:"event"`
	Content   string `json:"content"`
}

type PageData

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

	Total    int `json:"total"`
	Page     int `json:"page"`
	PageSize int `json:"pageSize"`
}

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

func (*PaginateReq) ConvertParams

func (r *PaginateReq) ConvertParams()

type ReqId

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

type Response

type Response struct {
	Code int64 `json:"code"`

	Msg    string `json:"msg"`
	MsgKey string `json:"msgKey"` // show i118 msg on client side

	Data interface{} `json:"data"`
}

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{})

type WsResp

type WsResp struct {
	Msg       string               `json:"msg"`
	IsRunning string               `json:"isRunning,omitempty"`
	Category  consts.WsMsgCategory `json:"category"`

	Info iris.Map    `json:"info,omitempty"`
	Data interface{} `json:"data,omitempty"`
}

Jump to

Keyboard shortcuts

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