gentity

package
v1.0.69 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderKeyDomainCode = "Domain-Code"
	HeaderKeyAppCode    = "App-Code"
	HeaderKeyUserId     = "User-Id"
)
View Source
const (
	MdKeyTraceId    = "trace-id"
	MdKeyDomainCode = "domain-code"
	MdKeyAppCode    = "app-code"
	MdKeyUserId     = "user-id"
	MdKeySourceIp   = "source-ip"
)
View Source
const (
	OrderMapKeyOfCreateTime = "create_time"
	OrderMapKeyOfUpdateTime = "update_time"
	OrderMapKeyOfId         = "id"

	OrderMapValueOfAsc  = "asc"
	OrderMapValueOfDesc = "desc"

	QueryLimit = 300
)
View Source
const ErrorCode = 500
View Source
const SuccessCode = 200

Variables

This section is empty.

Functions

func NewFailResultBytes

func NewFailResultBytes(msg string) []byte

func NewOkResultBytes

func NewOkResultBytes(data interface{}, msg string) []byte

Types

type ApiException

type ApiException struct {
	Code int32
	Msg  string
}

func NewApiException

func NewApiException(code int32, msg string) *ApiException

func NewException

func NewException(msg string) *ApiException

func (*ApiException) Error

func (error *ApiException) Error() string

type ApiResult

type ApiResult struct {
	Code    int32       `json:"code"`
	Success bool        `json:"success"`
	Msg     string      `json:"msg"`
	Data    interface{} `json:"data"`
}

func NewFailResult

func NewFailResult(msg string) ApiResult

func NewOkResult

func NewOkResult(data interface{}, msg string) ApiResult

type QueryCondition

type QueryCondition struct {
	QueryKey   string
	QueryValue interface{}
}

type ReqHeader added in v1.0.54

type ReqHeader struct {
	DomainCode string
	AppCode    string
	UserId     string
	SourceIp   string
}

Jump to

Keyboard shortcuts

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