core

package
v0.0.0-...-d33d225 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MSPNormalStateHTTPStatusCode int64 = 1001
)

Variables

This section is empty.

Functions

func WrapH

func WrapH(h WrapHandler) func(*gin.Context)

WrapH ...

Types

type Config

type Config struct {
	config.IConfig
}

Config ...

type Elector

type Elector interface {
	IsLeader() bool
}

Elector ...

type ErrCode

type ErrCode string

type I

type I struct {
	Ctx     context.Context
	Config  *Config
	Logger  *Logger
	Db      *gorm.DB
	Elector Elector
}

I ...

var Is *I

Is ...

type Logger

type Logger struct {
	*logger.Logger
}

Logger ...

type MSPNormalizeHTTPResponseBody

type MSPNormalizeHTTPResponseBody struct {
	Code    int64       `json:"code"`
	Data    interface{} `json:"data"`
	Message string      `json:"message"`
}

type MSPNormalizeList

type MSPNormalizeList struct {
	List     interface{}          `json:"list"`
	Paginate MSPNormalizePaginate `json:"paginate"`
}

type MSPNormalizeListPaginateParams

type MSPNormalizeListPaginateParams struct {
	Page     int `json:"page" form:"page"`
	LimitNum int `json:"limit_num" form:"limit_num"`
}

type MSPNormalizePaginate

type MSPNormalizePaginate struct {
	Total    int64 `json:"total"`
	Current  int   `json:"current"`
	PageSize int   `json:"pageSize"`
}

type WrapContext

type WrapContext struct {
	Ctx context.Context
	G   *gin.Context
	Is  *I
}

func (*WrapContext) BindG

func (c *WrapContext) BindG(params interface{})

BindG bind params or exit

type WrapErrorResponse

type WrapErrorResponse struct {
	Msg     string  `json:"msg,omitempty"`
	ErrCode ErrCode `json:"errCode,omitempty"`
}

type WrapHandler

type WrapHandler func(c *WrapContext) (interface{}, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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