serializer

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvironmentCodeNull     = ""
	EndpointFoundRecordNull = "Error 1146: Table 'gateway_admin.rows' doesn't exist"
)
View Source
const (
	ErrBindJson            ErrorStr = "INVALID_ARGUMENT.1"
	ErrCreate                       = "FAILED_TO_CREATE"
	ErrDelete                       = "FAILED_TO_DELETE"
	ErrGetFile                      = "INVALID_ARGUMENT.2"
	ErrReqStringToInt               = "INVALID_ARGUMENT.3"
	ErrEnvironment                  = "INVALID_ARGUMENT.4"
	ErrEnvironmentCodeNull          = "UNAUTHENTICATED.1"
	ErrNoSecret                     = "UNAUTHENTICATED.2"
	ErrDBOperate                    = "INTERNAL_DB"
	ErrK8sOperate                   = "INTERNAL_K8S"
	ErrUCOperate                    = "INTERNAL_UC"
	ErrJsonMarshal                  = "INTERNAL_Other.1"
	ErrJsonUnMarshal                = "INTERNAL_Other.2"
	ErrCopier                       = "INTERNAL_Other.3"
	ErrChangeLogLevel               = "INTERNAL_Other.4"
	ErrDBNotFind                    = "NOT_FOUND_DB"
	ErrTelnetFind                   = "NOT_FOUND_TELNET"
	ErrSnapshotFind                 = "NOT_FOUND_SNAPSHOT"
	ErrDBAlreadyExist               = "ALREADY_EXISTS_DB"
	ErrK8sAlreadyExist              = "ALREADY_EXISTS_K8S"
)

Variables

Functions

func ErrorLocalRes

func ErrorLocalRes(c *gin.Context, status ErrorStr, msg string, locale string, localMessage string)

func ErrorRes

func ErrorRes(c *gin.Context, status ErrorStr, msg string)

func SuccessDataRes

func SuccessDataRes(c *gin.Context, data interface{}, msg string)

func SuccessPageDataRes

func SuccessPageDataRes(c *gin.Context, data interface{}, page int, count int64, msg string)

func SuccessRes

func SuccessRes(c *gin.Context, msg string)

Types

type AlarmParam

type AlarmParam struct {
	SmsType string
}

type AlarmRecordQuery

type AlarmRecordQuery struct {
	Begin      string `json:"begin"`
	End        string `json:"end"`
	RecordName string `json:"record_name"`
}

type AlarmRuleQuery

type AlarmRuleQuery struct {
	RuleAlias string
	NotifyId  string
}

type AllWhiteIps

type AllWhiteIps struct {
	EnvironmentCode string `json:"environment_code"`
	IpAddress       string `json:"ip_address"`
}

func (AllWhiteIps) TableName

func (AllWhiteIps) TableName() string

type EndpointParam

type EndpointParam struct {
	RouteId         int
	PolicyId        int
	KeyId           int
	CorsId          int
	Method          string
	Keyword         string
	EnvironmentCode string
	ApiType         string
}

type ErrorResModel

type ErrorResModel struct {
	Status           ErrorStr          `json:"status"`
	Message          string            `json:"message"`
	LocalizedMessage *LocalizedMessage `json:"localized_message,omitempty"`
}

type ErrorStr

type ErrorStr string

type KeyParam

type KeyParam struct {
	EnvironmentCode string
	Name            string
	KeyType         string
}

type LocalizedMessage

type LocalizedMessage struct {
	Locale  string `json:"locale"`
	Message string `json:"message"`
}

type NotifyChannelQuery

type NotifyChannelQuery struct {
	NotifyName         string
	NotifyType         string
	NotifyConfigTypeId string
}

type PageParam

type PageParam struct {
	Page int `json:"page"`
	Size int `json:"size"`
}

type PolicyParam

type PolicyParam struct {
	EnvironmentCode string
	Name            string
	PolicyType      string
}

type ResPageDataModel

type ResPageDataModel struct {
	Data  interface{} `json:"data,omitempty"`
	Page  int         `json:"page"`
	Total int64       `json:"total"`
}

type RouteParam

type RouteParam struct {
	EnvironmentCode string
	Keyword         string
	Strategy        string
}

type SuccessResModel

type SuccessResModel struct {
	Data interface{} `json:"data,omitempty"`
}

Jump to

Keyboard shortcuts

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