request

package
v1.8.7 Latest Latest
Warning

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

Go to latest
Published: May 20, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

自定义请求辅助方法层

Index

Constants

View Source
const (
	IdNullError = 100002
)

自定义业务异常

Variables

View Source
var ParmasNullError = map[int]string{
	IdNullError: "id不能为空!",
}

Functions

This section is empty.

Types

type CheckConfigStruct

type CheckConfigStruct struct {
	Code int
	Key  string
}

type DataxInfoDelReq

type DataxInfoDelReq struct {
	ID int `json:"id"`
}

type DataxInfoInsertReq

type DataxInfoInsertReq struct {
	IP       string `json:"ip"`
	Port     int    `json:"port"`
	DbName   string `json:"db_name"`
	Username string `json:"username"`
	Pwd      string `json:"pwd"`
	Remark   string `json:"remark"`
	Typ      string `json:"typ"`
}

func (DataxInfoInsertReq) Validate

func (this DataxInfoInsertReq) Validate() (err error)

type DataxInfoListReq

type DataxInfoListReq struct {
	Remark string `json:"remark"`
	Typ    string `json:"typ"`
	Page   int    `json:"page"`
	Limit  int    `json:"limit"`
}

type DataxInfoTestLinkReq

type DataxInfoTestLinkReq struct {
	IP       string `json:"ip"`
	Port     int    `json:"port"`
	DbName   string `json:"db_name"`
	Username string `json:"username"`
	Pwd      string `json:"pwd"`
	Remark   string `json:"remark"`
	Typ      string `json:"typ"`
}

type GmRoleModel

type GmRoleModel struct {
	ID          int      `json:"id" db:"id"`
	RoleName    string   `json:"name" db:"role_name"`
	Description string   `json:"description" db:"description"`
	RoleList    string   `json:"routes" db:"role_list"`
	Api         []string `json:"api"`
}

GmRoleModel

type Request

type Request struct {
}

自定义请求 辅助方法

func (Request) CheckParameter

func (this Request) CheckParameter(checkConfig []CheckConfigStruct, ctx *fiber.Ctx) (err error)

检查请求参数

func (Request) FormIntDefault

func (this Request) FormIntDefault(ctx *fiber.Ctx, key string, def int) int

FormIntDefault 获取Form参数 如果出错则返回默认值

func (Request) GetToken

func (this Request) GetToken(ctx *fiber.Ctx) (token string)

获取用户token信息

type SelectType

type SelectType struct {
	ID     int    `json:"id"`
	Remark string `json:"remark"`
	Typ    string `json:"typ"`
}

type TimingModel

type TimingModel struct {
	Page   int  `json:"page"`
	Limit  int  `json:"limit"`
	Status *int `json:"status"`
	Action *int `json:"action"`
}

type TransferLogReq

type TransferLogReq struct {
	EsConnect int `json:"es_connect"`
}

type TransferReq

type TransferReq struct {
	AutoIncrementId string `json:"autoIncrementId"`
	EsConnect       int    `json:"es_connect"`
	SelectType      string `json:"selectType"`
	Remark          string `json:"remark"`
	SelectTable     string `json:"selectTable"`
	TypeName        string `json:"type_name"`
	Cols            struct {
		TableCols []string `json:"tableCols"`
		EsCols    []struct {
			Col   string `json:"col"`
			TbCol string `json:"tbCol"`
		} `json:"esCols"`
	} `json:"cols"`
	IndexName       string `json:"indexName"`
	Reset           bool   `json:"reset"`
	GoNum           int    `json:"goNum"`
	EsFlushInterval int    `json:"esFlushInterval"`
	EsBufferSize    int    `json:"esBufferSize"`
	EsDocID         string `json:"esDocId"`
	BufferSize      int    `json:"bufferSize"`
	MaxIdleConns    int    `json:"maxIdleConns"`
	MaxOpenConns    int    `json:"maxOpenConns"`
	CrontabSpec     string `json:"crontab_spec"`
}

func (*TransferReq) ParseSelectType

func (this *TransferReq) ParseSelectType() (*SelectType, error)

Jump to

Keyboard shortcuts

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