request

package
v0.0.0-...-9337120 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

自定义请求辅助方法层

Index

Constants

View Source
const (
	IdNullError      = 100002
	EmptyParmasError = 100003
	EmptyEventError  = 100004
)

自定义业务异常

Variables

View Source
var ErrorMap = map[int]string{
	IdNullError:      "id不能为空!",
	EmptyParmasError: "请求参数不能为空",
	EmptyEventError:  "事件名不能为空",
}

Functions

This section is empty.

Types

type AddDebugDeviceIDReq

type AddDebugDeviceIDReq struct {
	Appid    int    `json:"appid"`
	Remark   string `json:"remark"`
	DeviceID string `json:"deviceID"`
}

type AddUserGroup

type AddUserGroup struct {
	Ids    []string `json:"uids"`
	Name   string   `json:"name"`
	Remark string   `json:"remark"`
	Appid  int      `json:"appid"`
}

type AnalysisFilter

type AnalysisFilter struct {
	FilterType string `json:"filterType"`
	Filts      []struct {
		FilterType string `json:"filterType"`
		Filts      []struct {
			ColumnName string      `json:"columnName"`
			Comparator string      `json:"comparator"`
			FilterType string      `json:"filterType"`
			Ftv        interface{} `json:"ftv"`
		} `json:"filts,omitempty"`
		Relation   string      `json:"relation,omitempty"`
		ColumnName string      `json:"columnName,omitempty"`
		Comparator string      `json:"comparator,omitempty"`
		Ftv        interface{} `json:"ftv,omitempty"`
	} `json:"filts"`
	Relation string `json:"relation"`
}

type AttrManagerByMetaReq

type AttrManagerByMetaReq struct {
	Appid     int    `json:"appid"`
	Typ       int    `json:"typ"`
	EventName string `json:"event_name"`
}

type AttrManagerReq

type AttrManagerReq struct {
	Appid int `json:"appid"`
	Typ   int `json:"typ"`
}

type CheckConfigStruct

type CheckConfigStruct struct {
	Code int
	Key  string
}

type DebugDeviceIDListReq

type DebugDeviceIDListReq struct {
	Appid int `json:"appid"`
}

type DelDebugDeviceIDReq

type DelDebugDeviceIDReq struct {
	Appid    int    `json:"appid"`
	DeviceID string `json:"deviceID"`
}

type DeleteUserGroup

type DeleteUserGroup struct {
	Id    int `json:"id"`
	Appid int `json:"appid"`
}

type DeleteUserReq

type DeleteUserReq struct {
	Id int32 `json:"id"`
}

type EventFailDescReq

type EventFailDescReq struct {
	StartTime string `json:"start_time"`
	EndTime   string `json:"end_time"`
	Appid     int    `json:"appid"`
	DataName  string `json:"data_name"`
}

type EventReqData

type EventReqData struct {
	UserGroup         []int          `json:"userGroup"`
	ZhibiaoArr        []EventZhibiao `json:"zhibiaoArr"`
	GroupBy           []string       `json:"groupBy"`
	WhereFilter       AnalysisFilter `json:"whereFilter"`
	WhereFilterByUser AnalysisFilter `json:"whereFilterByUser"`
	Date              []string       `json:"date"`
	WindowTimeFormat  string         `json:"windowTimeFormat"`
	Appid             int            `json:"appid"`
}

type EventZhibiao

type EventZhibiao struct {
	SelectAttr        []string         `json:"selectAttr,omitempty"`
	Typ               int              `json:"typ"`
	EventName         string           `json:"eventName,omitempty"`
	EventNameDisplay  string           `json:"eventNameDisplay"`
	Relation          AnalysisFilter   `json:"relation,omitempty"`
	ScaleType         string           `json:"scaleType,omitempty"`
	Operate           string           `json:"operate,omitempty"`
	One               FormulaDimension `json:"one,omitempty"`
	Two               FormulaDimension `json:"two,omitempty"`
	DivisorNoGrouping bool             `json:"divisor_no_grouping"`
}

type FindNameCount

type FindNameCount struct {
	Appid  int    `db:"appid" json:"appid"`
	Name   string `db:"name" json:"name"`
	RtType int8   `db:"rt_type" json:"rt_type"`
}

type FindRtById

type FindRtById struct {
	Appid int `db:"appid" json:"appid"`
	Id    int `json:"id"`
}

type FormulaDimension

type FormulaDimension struct {
	SelectAttr []string       `json:"selectAttr"`
	EventName  string         `json:"eventName"`
	Relation   AnalysisFilter `json:"relation"`
}

type FunnelReqData

type FunnelReqData struct {
	UserGroup         []int          `json:"userGroup"`
	ZhibiaoArr        []Zhibiao      `json:"zhibiaoArr"`
	WhereFilter       AnalysisFilter `json:"whereFilter"`
	WindowTime        int            `json:"windowTime"`
	WindowTimeFormat  string         `json:"windowTimeFormat"`
	Date              []string       `json:"date"`
	Appid             int            `json:"appid"`
	WhereFilterByUser AnalysisFilter `json:"whereFilterByUser"`
	GroupBy           []string       `json:"groupBy"`
}

type GetAnalyseSelectOptionsReq

type GetAnalyseSelectOptionsReq struct {
	Appid int `json:"appid"`
}

type GetCalcuSymbolDataReq

type GetCalcuSymbolDataReq struct {
	Appid     int    `json:"appid"`
	EventName string `json:"event_name"`
}

type GetPannelList

type GetPannelList struct {
	Appid int `db:"appid" json:"appid"`
}

type GetUserByIdReq

type GetUserByIdReq struct {
	Id int32 `json:"id"`
}

type GmOperaterLogList

type GmOperaterLogList struct {
	Page           int      `json:"page"`
	Limit          int      `json:"limit"`
	UserId         int      `json:"operater_id"`
	RoleId         int      `json:"operater_role_id"`
	OperaterAction string   `json:"operater_action"`
	Date           []string `json:"date"`
}

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 LoadPropQuotasReq

type LoadPropQuotasReq struct {
	EventName string `json:"event_name"`
	Appid     int    `json:"appid"`
}

type ModifyUserGroup

type ModifyUserGroup struct {
	Id     int    `json:"id"`
	Name   string `json:"name"`
	Remark string `json:"remark"`
	Appid  int    `json:"appid"`
}

type NewDir

type NewDir struct {
	FolderName string `db:"folder_name" json:"folder_name"`
	FolderType int8   `db:"folder_type" json:"folder_type"` //0为自己创建的
	CreateBy   int    `db:"create_by" json:"create_by"`
	Appid      int    `db:"appid" json:"appid"`
}

type NewPannel

type NewPannel struct {
	PannelName string `json:"pannel_name"`
	FolderId   int    `json:"folder_id"`
}

type ReportCountReq

type ReportCountReq struct {
	StartTime string `json:"start_time"`
	EndTime   string `json:"end_time"`
	Appid     int    `json:"appid"`
}

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 RetentionReqData

type RetentionReqData struct {
	UserGroup  []int `json:"userGroup"`
	ZhibiaoArr []struct {
		EventName        string         `json:"eventName"`
		EventNameDisplay string         `json:"eventNameDisplay"`
		Relation         AnalysisFilter `json:"relation"`
	} `json:"zhibiaoArr"`
	WhereFilter       AnalysisFilter `json:"whereFilter"`
	WindowTime        int            `json:"windowTime"`
	WindowTimeFormat  string         `json:"windowTimeFormat"`
	Date              []string       `json:"date"`
	Appid             int            `json:"appid"`
	WhereFilterByUser AnalysisFilter `json:"whereFilterByUser"`
	GroupBy           []string       `json:"groupBy"`
}

type RolesDelReq

type RolesDelReq struct {
	Id int `json:"id"`
}

type TraceReqData

type TraceReqData struct {
	EventNames        []string       `json:"eventNames"`
	UserGroup         []int          `json:"userGroup"`
	ZhibiaoArr        []Zhibiao      `json:"zhibiaoArr"`
	WhereFilter       AnalysisFilter `json:"whereFilter"`
	WindowTime        int            `json:"windowTime"`
	WindowTimeFormat  string         `json:"windowTimeFormat"`
	Date              []string       `json:"date"`
	Appid             int            `json:"appid"`
	WhereFilterByUser AnalysisFilter `json:"whereFilterByUser"`
	GroupBy           []string       `json:"groupBy"`
}

type UpdateAttrInvisibleReq

type UpdateAttrInvisibleReq struct {
	Appid           int    `json:"appid"`
	AttributeSource int    `json:"attribute_source"`
	AttributeName   string `json:"attribute_name"`
	Status          int    `json:"status"`
}

type UpdateAttrShowNameReq

type UpdateAttrShowNameReq struct {
	Appid         int    `json:"appid"`
	AttributeName string `json:"attribute_name"`
	Typ           int    `json:"typ"`
	ShowName      string `json:"show_name"`
}

type UpdateShowNameReq

type UpdateShowNameReq struct {
	Appid     int    `json:"appid"`
	EventName string `json:"event_name"`
	ShowName  string `json:"show_name"`
}

type UserAddReq

type UserAddReq struct {
	Realname string `json:"realname"`
	RoleId   int32  `json:"role_id"`
	Password string `json:"password"`
	Username string `json:"username"`
}

type UserAttrReqData

type UserAttrReqData struct {
	UserGroup         []int          `json:"userGroup"`
	ZhibiaoArr        []string       `json:"zhibiaoArr"`
	GroupBy           []string       `json:"groupBy"`
	WhereFilterByUser AnalysisFilter `json:"whereFilterByUser"`
	Appid             int            `json:"appid"`
}

type UserBanReq

type UserBanReq struct {
	Typ int `json:"typ"`
	Id  int `json:"id"`
}

type UserEventCountReq

type UserEventCountReq struct {
	Appid            int      `json:"appid"`
	WindowTimeFormat string   `json:"windowTimeFormat"`
	UserID           string   `json:"userId"`
	EventNames       []string `json:"eventNames"`
	Date             []string `json:"date"`
}

type UserEventDetailReq

type UserEventDetailReq struct {
	Page       int      `json:"page"`
	PageSize   int      `json:"page_size"`
	Appid      int      `json:"appid"`
	UserID     string   `json:"userId"`
	EventName  string   `json:"eventName"`
	OrderBy    string   `json:"orderBy"`
	Date       []string `json:"date"`
	EventNames []string `json:"eventNames"`
}

type UserEventListReq

type UserEventListReq struct {
	Uid   int `json:"uid"`
	Appid int `json:"appid"`
}

type UserGroupList

type UserGroupList struct {
	Appid int `json:"appid"`
}

type UserListReq

type UserListReq struct {
	Appid int `json:"appid,omitempty" `
}

type UserListReqData

type UserListReqData struct {
	UI    []string `json:"ui"`
	Appid int      `json:"appid"`
}

type UserUpdateReq

type UserUpdateReq struct {
	Id       int    `json:"id"`
	Realname string `json:"realname"`
	RoleId   int32  `json:"role_id"`
	Password string `json:"password"`
	Username string `json:"username"`
}

type Zhibiao

type Zhibiao struct {
	EventName        string         `json:"eventName"`
	EventNameDisplay string         `json:"eventNameDisplay"`
	Relation         AnalysisFilter `json:"relation"`
}

Jump to

Keyboard shortcuts

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