register

package
v0.0.0-...-0651e20 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidResponse

func IsValidResponse(t string) error

Types

type Config

type Config struct {
	ExtraConfig   *ExtraConfig
	GeneralConfig *GeneralConfig
}
var PConfig *Config

func NewConfig

func NewConfig() (*Config, error)

type Context

type Context struct {
	echo.Context
}

type CrabError

type CrabError struct {
	HttpCode     int              `json:"-"`
	ResponseType CrabResponseType `json:"-"`
	Message      string           `json:"msg"`
	Reason       string           `json:"reason,omitempty"`
	Status       string           `json:"status"`
}

func NewCrabError

func NewCrabError() *CrabError

func (*CrabError) GetMsg

func (i *CrabError) GetMsg(code int) string

func (*CrabError) SetData

func (i *CrabError) SetData(code int, t CrabResponseType, dataList ...interface{})

implement interface CrabResponseInf

func (*CrabError) Success

func (i *CrabError) Success() bool

type CrabResponse

type CrabResponse struct {
	HttpCode     int              `json:"-"`
	Msg          string           `json:"msg"`
	Status       string           `json:"status"`
	ResponseType CrabResponseType `json:"-"`
	Data         interface{}      `json:"data" swaggertype:"array,object"`
}

func NewCrabResponse

func NewCrabResponse() *CrabResponse

func (*CrabResponse) GetRedirectURL

func (ir *CrabResponse) GetRedirectURL() (string, error)

func (*CrabResponse) SetData

func (ir *CrabResponse) SetData(code int, t CrabResponseType, dataList ...interface{})

implement interface CrabResponseInf

type CrabResponseIf

type CrabResponseIf interface {
	SetData(code int, t CrabResponseType, dataList ...interface{})
}

type CrabResponseType

type CrabResponseType string
var (
	CrabResponseTypeRedirect CrabResponseType = "Redirect"
	CrabResponseTypeJSON     CrabResponseType = "JSON"
)

type ExtraConfig

type ExtraConfig struct{}

type GeneralConfig

type GeneralConfig struct {
	CrabConfig *config.CrabConfig
	MyConfig   *config.MysqlConfig
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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