view

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPaginationSize = 20
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIListItem

type APIListItem struct {
	Path   string `json:"path"`
	Method string `json:"method"`
}

type APIPermItem

type APIPermItem struct {
	Method string `json:"method"`
	Path   string `json:"path"`
}

type ActItem

type ActItem struct {
	Name string `json:"name"`
	Desc string `json:"desc"`
}

type AlarmFilterItem

type AlarmFilterItem struct {
	*db2.AlarmFilter
	Exp string
}

type AppAvailableRoles

type AppAvailableRoles struct {
	AppId   int        `json:"app_id"`
	Default []RoleItem `json:"default"` // 不允许app内修改
	Custom  []RoleItem `json:"custom"`  // 支持app内修改
}

type AppPermItem

type AppPermItem struct {
	Aid           int      `json:"aid"`
	AppName       string   `json:"app_name"`
	AvailableEnvs []string `json:"available_envs"` // 可选的环境
	AllowEnvs     []string `json:"allow_envs"`     // 可用的环境
}

type AppRoleInfoItem

type AppRoleInfoItem struct {
	RoleItem `json:",inline"`
	// SubResources []ResourceItem		`json:"sub_resources"`  // 角色所对应app下的子资源
	// Acts 		[]ActItem			`json:"acts"`			// 角色对app子资源的action
	// PmsDetails 		[]RolePmsDetail `json:"pms_details"`
	Uids []int `json:"uids"` // 当前是该角色的用户的id
}

type At

type At struct {
	AtMobiles []string `json:"atMobiles"`
	IsAtAll   bool     `json:"isAtAll"`
}

type CascaderItem

type CascaderItem struct {
	Value    string         `json:"value"`
	Label    string         `json:"label"`
	Children []CascaderItem `json:"children,omitempty"`
}

type ClickhouseSystemClusters

type ClickhouseSystemClusters struct {
	Cluster     string `json:"cluster"`
	ShardNum    uint32 `json:"shardNum"`
	ShardWeight uint32 `json:"ShardWeight"`
	ReplicaNum  uint32 `json:"replicaNum"`
}

type Cluster

type Cluster struct {
	Cluster     string
	ShardNum    int
	ReplicaNum  int
	HostName    string
	HostAddress string
	Port        int
}

type Column

type Column struct {
	Field   string `json:"field" form:"field"`
	Type    string `json:"type" form:"type"`
	Comment string `json:"comment" form:"comment"`
}

type ConfigFormat

type ConfigFormat string

ConfigFormat ..

const (
	ConfigFormatToml       ConfigFormat = "toml"
	ConfigFormatYaml       ConfigFormat = "yaml"
	ConfigFormatJson       ConfigFormat = "json"
	ConfigFormatXml        ConfigFormat = "xml"
	ConfigFormatProperties ConfigFormat = "properties"
	ConfigFormatIni        ConfigFormat = "ini"
	ConfigFormatConf       ConfigFormat = "conf"
)

type ConfigMetadata

type ConfigMetadata struct {
	Version     string `json:"version"`
	ChangeLog   string `json:"changeLog"`
	PublishedBy int    `json:"uid"`
}

ConfigMetadata 用于记录某个配置的版本信息

type CustomRolePms

type CustomRolePms struct {
	db.PmsCustomRole
}

type DagExecFlow

type DagExecFlow struct {
	NodeId   int           `json:"nodeId"`
	Children []DagExecFlow `json:"children"`
}

DAG ...

type DatabendSystemClusters

type DatabendSystemClusters struct {
	Host    string `json:"host"`
	Name    string `json:"name"`
	Port    uint16 `json:"port"`
	Version string `json:"version"`
}

type DefaultRolePms

type DefaultRolePms struct {
	db.PmsDefaultRole
}

type DingTalkMarkdown

type DingTalkMarkdown struct {
	MsgType  string    `json:"msgtype"`
	At       *At       `json:"at"`
	Markdown *Markdown `json:"markdown"`
}

type DomainUids

type DomainUids map[string][]int // like {"ent__1":[uid1, uid2, ...], "*": [uids...]}  note, the key with value "*" means allDomain

type HiddenFieldCreate

type HiddenFieldCreate struct {
	Fields []string `json:"fields" binding:"required"`
}

type HighChart

type HighChart struct {
	Count    uint64 `json:"count"`
	Progress string `json:"progress"`
	From     int64  `json:"from"`
	To       int64  `json:"to"`
}

type HighCharts

type HighCharts struct {
	Histograms []*HighChart `json:"histograms"`
	Count      uint64       `json:"count"`
	Progress   string       `json:"progress"`
}

type IndexItem

type IndexItem struct {
	Field    string `json:"field" form:"field"`
	Alias    string `json:"alias" form:"alias"`
	Typ      int    `json:"typ" form:"typ"`
	RootName string `json:"rootName" form:"rootName"`
	HashTyp  int    `json:"hashTyp" form:"hashTyp"`
}

func (*IndexItem) Name

func (i *IndexItem) Name() string

type InfoItem

type InfoItem struct {
	Name string `json:"name"`
	Desc string `json:"desc"`
}

type InnerNodeRun

type InnerNodeRun struct {
	N  *db2.BigdataNode
	NC *db2.BigdataNodeContent
}

type IntegrationFlat

type IntegrationFlat struct {
	Typ      string `json:"typ"` // clickhouse mysql
	SourceId int    `json:"sourceId"`
	Cluster  string `json:"cluster"`
	Database string `json:"database"`
	Table    string `json:"table"`

	SourceFilter string `json:"sourceFilter"`

	// Deprecated
	TargetBefore string `json:"targetBefore"`
	// Deprecated
	TargetAfter string `json:"targetAfter"`

	TargetBeforeList []string `json:"targetBeforeList"`
	TargetAfterList  []string `json:"targetAfterList"`
}

IntegrationFlat integration offline sync step 1

type IntegrationMapping

type IntegrationMapping struct {
	Source     string `json:"source"`
	SourceType string `json:"sourceType"`
	Target     string `json:"target"`
	TargetType string `json:"targetType"`
}

IntegrationMapping integration offline sync step 2

type JaegerDependencyDataModel

type JaegerDependencyDataModel struct {
	Timestamp         time.Time
	Parent            string
	Child             string
	CallCount         int64
	ServerDurationP50 float64
	ServerDurationP90 float64
	ServerDurationP99 float64
	ClientDurationP50 float64
	ClientDurationP90 float64
	ClientDurationP99 float64
	ServerSuccessRate float64
	ClientSuccessRate float64
	Time              time.Time
}

type ListGroupItem

type ListGroupItem struct {
	Name string `json:"name"`
}

type ListUserItem

type ListUserItem struct {
	UID      uint     `json:"uid"`
	UserName string   `json:"user_name"`
	NickName string   `json:"nick_name"`
	Access   string   `json:"access"`
	Groups   []string `json:"groups"`
}

type Markdown

type Markdown struct {
	Title string `json:"title"`
	Text  string `json:"text"`
}

type MentionedList

type MentionedList struct {
	UserIdList []string `json:"userIdList"`
	MobileList []string `json:"mobileList"`
}
type MenuTree []MenuTreeItem
type MenuTreeItem struct {
	Name     string   `json:"name"`
	Path     string   `json:"path"`
	Icon     string   `json:"icon"`
	Children MenuTree `json:"children"`
}

type NodeHistoryItem

type NodeHistoryItem struct {
	UUID     string `json:"uuid"`
	Utime    int64  `json:"utime"`
	Uid      int    `json:"uid"`
	UserName string `json:"userName"`
	Nickname string `json:"nickname"`
}

type OperatorViewParams

type OperatorViewParams struct {
	Typ              int
	Tid              int
	Did              int
	TableName        string
	CustomTimeField  string
	Current          *db2.BaseView
	List             []*db2.BaseView
	Indexes          map[string]*db2.BaseIndex
	IsCreate         bool
	TimeField        string
	RawLogField      string
	IsKafkaTimestamp int
	Database         *db2.BaseDatabase
}

type Pagination

type Pagination struct {
	// Current 总记录数
	Current int `json:"current" form:"current"`
	// PageSize 每页记录数
	PageSize int `json:"pageSize" form:"pageSize"`
	// Total 总页数
	Total int64 `json:"total" form:"total"`
	// Sort 顺序
	Sort string `json:"sort"  form:"sort"`
}

func NewPagination

func NewPagination(current int, pageSize int) *Pagination

func (*Pagination) List

func (p *Pagination) List(db *gorm.DB, list interface{})

func (*Pagination) Valid

func (p *Pagination) Valid() error

type ReqAlarmConditionCreate

type ReqAlarmConditionCreate struct {
	SetOperatorTyp int `json:"typ" form:"typ"`                      // 0 when 1 and  2 or
	SetOperatorExp int `json:"exp" form:"exp"`                      // 0 avg 1 min 2 max 3 sum 4 count
	Cond           int `json:"cond" form:"cond"`                    // 0 above 1 below 2 outside range 3 within range
	Val1           int `json:"val1" form:"val1" binding:"required"` // 基准值/最小值
	Val2           int `json:"val2" form:"val2"`                    // 最大值
}

type ReqAlarmCreate

type ReqAlarmCreate struct {
	Name             string                    `json:"alarmName" form:"alarmName"` // 告警名称
	Desc             string                    `json:"desc" form:"desc"`           // 描述说明
	Interval         int                       `json:"interval" form:"interval"`   // 告警频率
	Unit             int                       `json:"unit" form:"unit"`           // 0 m 1 s 2 h 3 d 4 w 5 y
	Status           int                       `json:"status" form:"status"`
	AlertRule        string                    `json:"alertRule" form:"alertRule"` // prometheus alert rule
	View             string                    `json:"view" form:"view"`           // 数据转换视图
	NoDataOp         int                       `json:"noDataOp" form:"noDataOp"`
	Tags             map[string]string         `json:"tags" form:"tags"` //
	ChannelIds       []int                     `json:"channelIds" form:"channelIds"`
	Filters          []ReqAlarmFilterCreate    `json:"filters" form:"filters"`
	Conditions       []ReqAlarmConditionCreate `json:"conditions" form:"conditions"`
	Level            int                       `json:"level" form:"level"`
	DutyOfficers     []int                     `json:"dutyOfficers" form:"dutyOfficers"`
	IsDisableResolve int                       `json:"isDisableResolve" form:"isDisableResolve"`
}

func (*ReqAlarmCreate) ConvertV2

func (r *ReqAlarmCreate) ConvertV2()

type ReqAlarmFilterCreate

type ReqAlarmFilterCreate struct {
	Tid            int                       `json:"tid" form:"tid" binding:"required"`
	When           string                    `json:"when" form:"when" binding:"required"` // 执行条件
	SetOperatorTyp int                       `json:"typ" form:"typ"`                      // 0 default 1 INNER 2 LEFT OUTER 3 RIGHT OUTER 4 FULL OUTER 5 CROSS
	SetOperatorExp string                    `json:"exp" form:"exp"`                      // 操作
	Mode           int                       `json:"mode" form:"mode"`
	Conditions     []ReqAlarmConditionCreate `json:"conditions" form:"conditions"`
}

type ReqAlarmHistoryList

type ReqAlarmHistoryList struct {
	AlarmId   int `json:"alarmId" form:"alarmId"`
	StartTime int `json:"startTime" form:"startTime"`
	EndTime   int `json:"endTime" form:"endTime"` // 0 m 1 s 2 h 3 d 4 w 5 y
	db2.ReqPage
}

type ReqChangeAppGroup

type ReqChangeAppGroup struct {
	AppName   string `json:"app_name"`
	AppEnv    string `json:"app_env"`
	GroupName string `json:"group_name"`
}

type ReqChangeUserGroup

type ReqChangeUserGroup struct {
	UID    uint     `json:"uid"`
	Groups []string `json:"groups"`
}

type ReqComplete

type ReqComplete struct {
	Query string `form:"query" binding:"required"`
}

type ReqConfigMapInfo

type ReqConfigMapInfo struct {
	Key string `form:"key" binding:"required"`
}

ReqConfigMapInfo ..

type ReqCreateAgentStorage

type ReqCreateAgentStorage struct {
	Name       string `form:"name" binding:"required"`
	DatabaseId int    `form:"databaseId" binding:"required"`
}

type ReqCreateCluster

type ReqCreateCluster struct {
	Name        string `json:"clusterName"`
	Description string `json:"description"`
	Status      int    `json:"status"`
	ApiServer   string `json:"apiServer"`
	KubeConfig  string `json:"kubeConfig"`
}

type ReqCreateConfig

type ReqCreateConfig struct {
	Name                  string       `gorm:"column:name;type:varchar(64)" json:"configurationName" binding:"required"`
	Format                ConfigFormat `json:"format" binding:"required,oneof=yaml toml ini json conf"` // 格式后缀名(比如: toml, yaml)
	K8SConfigMapId        int          `form:"k8sConfigMapId"`
	K8SConfigMapName      string       `form:"k8sConfigMapName" binding:"required"`
	K8SConfigMapNamespace string       `form:"k8sConfigMapNameSpace" binding:"required"`
	ClusterId             int          `form:"clusterId" binding:"required"`
}

ReqCreateConfig ..

type ReqCreateConfigMap

type ReqCreateConfigMap struct {
	ConfigmapName string `form:"configmapName" binding:"required"`
	Namespace     string `form:"namespace" binding:"required"`
}

ReqCreateConfigMap ..

type ReqCreateCrontab

type ReqCreateCrontab struct {
	ReqUpdateCrontab
}

crontab struct

type ReqCreateFolder

type ReqCreateFolder struct {
	Iid       int `json:"iid" form:"iid" binding:"required"`
	Primary   int `json:"primary" form:"primary" binding:"required"`
	Secondary int `json:"secondary" form:"secondary"`

	ReqUpdateFolder
}

type ReqCreateIndex

type ReqCreateIndex struct {
	Tid  int         `json:"tid" form:"tid"`
	Data []IndexItem `json:"data"`
}

type ReqCreateInstance

type ReqCreateInstance struct {
	Datasource       string `json:"datasource" binding:"required"`
	Name             string `json:"name" binding:"required"`
	Dsn              string `json:"dsn"`
	RuleStoreType    int    `json:"ruleStoreType"`
	FilePath         string `json:"filePath"`
	Desc             string `json:"desc"`
	ClusterId        int    `json:"clusterId"`
	Namespace        string `json:"namespace"`
	Configmap        string `json:"configmap"`
	PrometheusTarget string `json:"prometheusTarget"`
}

type ReqCreateNode

type ReqCreateNode struct {
	Primary    int `json:"primary" form:"primary" binding:"required"`
	Secondary  int `json:"secondary" form:"secondary" binding:"required"`
	Tertiary   int `json:"tertiary" form:"tertiary"`
	Iid        int `json:"iid" form:"iid" binding:"required"`
	WorkflowId int `json:"workflowId" form:"workflowId"`
	SourceId   int `json:"sourceId" form:"sourceId"`
	ReqUpdateNode
}

ReqCreateNode Node

type ReqCreateSource

type ReqCreateSource struct {
	Iid int `json:"iid" form:"iid" binding:"required"`
	ReqUpdateSource
}

type ReqCreateStorageByTemplateEgo

type ReqCreateStorageByTemplateEgo struct {
	Brokers    string `form:"brokers" binding:"required"`
	DatabaseId int    `form:"databaseId" binding:"required"`

	TopicsApp           string `form:"topicsApp" binding:"required"`
	TopicsEgo           string `form:"topicsEgo" binding:"required"`
	TopicsIngressStdout string `form:"topicsIngressStdout" binding:"required"`
	TopicsIngressStderr string `form:"topicsIngressStderr" binding:"required"`
}

type ReqCreateStorageByTemplateILogtail

type ReqCreateStorageByTemplateILogtail struct {
	Brokers    string `form:"brokers" binding:"required"`
	DatabaseId int    `form:"databaseId" binding:"required"`
	Days       int    `form:"days" binding:"required"`
	Name       string `form:"name" binding:"required"`
	Topic      string `form:"topic" binding:"required"`
}

type ReqCreateWorkflow

type ReqCreateWorkflow struct {
	Iid int `json:"iid" form:"iid" binding:"required"`
	ReqUpdateSource
}

type ReqCrontabArg

type ReqCrontabArg struct {
	Key string `json:"key" form:"key"`
	Val string `json:"val" form:"val"`
}

crontab struct

type ReqDAG

type ReqDAG struct {
	BoardNodeList []ReqDagNode `json:"boardNodeList"`
	BoardEdges    []ReqDagEdge `json:"boardEdges"`
}

DAG ...

type ReqDagEdge

type ReqDagEdge struct {
	Source string `json:"source"`
	Target string `json:"target"`
}

DAG ...

type ReqDagNode

type ReqDagNode struct {
	Id int `json:"id"` // node id
}

DAG ...

type ReqDatabaseCreate

type ReqDatabaseCreate struct {
	Name    string `json:"databaseName" form:"databaseName" binding:"required"`
	Cluster string `json:"cluster" form:"cluster"`
	Desc    string `json:"desc" form:"desc"`
	Type    int    `json:"type" form:"type"`
}

type ReqDeletePmsRole

type ReqDeletePmsRole struct {
	db.PmsRole
}

type ReqDetailConfig

type ReqDetailConfig struct {
	ID uint `form:"id" binding:"required"`
}

ReqDetailConfig ..

type ReqDiffConfig

type ReqDiffConfig struct {
	ID        int `form:"id"`                           // 配置ID
	HistoryID int `form:"historyId" binding:"required"` // 版本ID
}

ReqDiffConfig ..

type ReqEnsureFuzzyDefaultRole

type ReqEnsureFuzzyDefaultRole struct {
	BelongType   string `json:"belong_type"`    // value in ["app", "configResource] currently
	ReferIdx     string `json:"refer_idx"`      // 所对应的belongType资源的id(如果belongTypes是"app") or name
	RoleNameLike string `json:"role_name_like"` // 角色模糊名称
	DomainType   string `json:"domain_type"`    // 角色所在domain类型 可为空
	DomainId     int    `json:"domain_id"`      // domainType不为空时, 对应的id; domainType为空时, 此处值为0
}

type ReqEventList

type ReqEventList struct {
	Source    string `json:"source" form:"source"`
	Operation string `json:"operation" form:"operation"`
	Uid       int    `json:"uid" form:"uid"`
	Pagination
}

type ReqGetAppPerm

type ReqGetAppPerm struct {
	GroupName     string `json:"group_name"`
	AppNameSearch string `json:"app_name_search"`
	PageSize      uint   `json:"size"`
	Page          uint   `json:"page"`
}

type ReqGetGroupAPIPerm

type ReqGetGroupAPIPerm struct {
	GroupName string `query:"group_name" valid:"required"`
}

type ReqGetGroupMenuPerm

type ReqGetGroupMenuPerm struct {
	GroupName string `query:"group_name"`
}

type ReqKafkaJSONMapping

type ReqKafkaJSONMapping struct {
	Data string `json:"data" form:"data"`
}

type ReqListConfig

type ReqListConfig struct {
	K8SConfigMapId        int    `form:"k8sConfigMapId"`
	K8SConfigMapName      string `form:"k8sConfigMapName"`
	K8SConfigMapNamespace string `form:"k8sConfigMapNameSpace"`
	ClusterId             int    `form:"clusterId"`
}

type ReqListNode

type ReqListNode struct {
	Iid        int `json:"iid" form:"iid"  binding:"required"`
	Primary    int `json:"primary" form:"primary" binding:"required"`
	Secondary  int `json:"secondary" form:"secondary"`
	FolderId   int `json:"folderId" form:"folderId"`
	WorkflowId int `json:"workflowId" form:"workflowId"`
}

type ReqListSource

type ReqListSource struct {
	Iid  int    `json:"iid" form:"iid" binding:"required"`
	Typ  int    `json:"typ" form:"typ"`
	Name string `json:"name" form:"name"`
}

type ReqListSourceColumn

type ReqListSourceColumn struct {
	Database string `json:"database" form:"database" binding:"required"`
	Table    string `json:"table" form:"table" binding:"required"`
}

type ReqListSourceTable

type ReqListSourceTable struct {
	Database string `json:"database" form:"database" binding:"required"`
}

type ReqListUser

type ReqListUser struct {
	GroupName string `query:"group_name"`
	Search    string `query:"search"`
	Page      uint   `query:"page"`
	PageSize  uint   `query:"page_size"`
}

type ReqListWorkflow

type ReqListWorkflow struct {
	Iid int `json:"iid" form:"iid" binding:"required"`
}

type ReqNewPmsRole

type ReqNewPmsRole struct {
	db.PmsRole
}

type ReqNodeHistoryList

type ReqNodeHistoryList struct {
	db2.ReqPage

	IsExcludeCrontabResult int `json:"isExcludeCrontabResult" form:"isExcludeCrontabResult"`
}

type ReqNodeResultList

type ReqNodeResultList struct {
	db2.ReqPage
}

type ReqNodeRunOpenAPI

type ReqNodeRunOpenAPI struct {
	Token string `json:"token" form:"token" binding:"required"`
}

type ReqNodeRunResult

type ReqNodeRunResult struct {
	ExcelProcess string `json:"excelProcess" form:"excelProcess"`
}

crontab struct

type ReqPermission

type ReqPermission struct {
	UserId      int      `json:"userId"`                      // request userId
	ObjectType  string   `json:"objectType" valid:"required"` // the type of ObjectIdx. its value must be a valid PermittedPrefix
	ObjectIdx   string   `json:"objectIdx"`                   // referId(e.g. aid) or other NameStr(e.g. configResourceName, url etc.)
	SubResource string   `json:"subResource"`                 // the subResource of target Object(Type+Idx). If target Obj has no subResource, please set it to "*"
	Acts        []string `json:"acts"`                        // require(or want) actions. i.e. the key of PermittedActMap
	DomainType  string   `json:"domainType"`                  // env or ent. i.e. the keys of PermittedDomPrefixMap
	DomainId    string   `json:"domainId"`                    // envId or entId based on DomainType respectively
}

type ReqPmsCommonInfo

type ReqPmsCommonInfo struct {
	Iid int `json:"iid" form:"iid"` // request instance id
}

type ReqPmsRoles

type ReqPmsRoles struct {
	// RoleType       int    `form:"roleType"`
	Name           string `form:"name"`
	BelongResource string `form:"belongResource"`
	ResourceId     int    `form:"resourceId"` // 0: means req default pmsRoles
}

type ReqPublishConfig

type ReqPublishConfig struct {
	ID      int     `json:"id"`                         // 配置ID
	Version *string `json:"version" binding:"required"` // 版本号
}

ReqPublishConfig ..

type ReqQuery

type ReqQuery struct {
	Tid           int      `json:"tid" form:"tid"`
	Database      string   `form:"database"`
	Table         string   `form:"table"`
	DatabaseTable string   `form:"databaseTable"`
	Field         string   `form:"field"`
	Query         string   `form:"query"`
	TimeField     string   `form:"timeField"`
	TimeFieldType int      `form:"timeFieldType"`
	ST            int64    `form:"st"`
	ET            int64    `form:"et"`
	Page          uint32   `form:"page"`
	PageSize      uint32   `form:"pageSize"`
	AlarmMode     int      `form:"alarmMode"`
	Filters       []string `form:"filters[]"`
	GroupByCond   string   `form:"groupByCond"`
	IsQueryCount  int      `form:"isQueryCount"` // 是否请求日志总数 0 不请求 1 请求
	Date          string   `form:"date"`
	K8SContainer  []string `form:"k8sContainer"`
	Dir           string   `json:"dir"`
	Path          string   `form:"path" json:"path"`
	Interval      int64    `json:"interval"`
}

type ReqSetGroupAPIPerm

type ReqSetGroupAPIPerm struct {
	GroupName string        `json:"group_name"`
	APIList   []APIListItem `json:"api_list"`
}

type ReqSetGroupAppPerm

type ReqSetGroupAppPerm struct {
	GroupName string   `json:"group_name" valid:"required"`
	AppName   string   `json:"app_name" valid:"required"`
	Env       []string `json:"env"`
	Action    []string `json:"action"`
}

type ReqSetGroupMenuPerm

type ReqSetGroupMenuPerm struct {
	GroupName string   `json:"group_name"`
	Menu      []string `json:"permission"`
}

type ReqStorageCreate

type ReqStorageCreate struct {
	TableName               string       `form:"tableName" binding:"required"`
	Typ                     int          `form:"typ" binding:"required"` // 1 string 2 float
	Days                    int          `form:"days" binding:"required"`
	Brokers                 string       `form:"brokers" binding:"required"`
	Topics                  string       `form:"topics" binding:"required"`
	Consumers               int          `form:"consumers" binding:"required"`
	KafkaSkipBrokenMessages int          `form:"kafkaSkipBrokenMessages"`
	Desc                    string       `form:"desc"`
	Source                  string       `form:"source" binding:"required"` // Raw JSON data
	DatabaseId              int          `form:"databaseId" binding:"required"`
	TimeField               string       `form:"timeField" binding:"required"`
	TimeFieldParent         string       `form:"timeFieldParent"`
	RawLogField             string       `form:"rawLogField"`
	RawLogFieldParent       string       `form:"rawLogFieldParent"`
	SourceMapping           mapping.List `form:"-"`
	CreateType              int          `form:"createType"`
}

func ReqStorageCreateUnmarshal

func ReqStorageCreateUnmarshal(res string) ReqStorageCreate

func (*ReqStorageCreate) GetRawLogField

func (r *ReqStorageCreate) GetRawLogField() string

func (*ReqStorageCreate) IsRawLogFieldString

func (r *ReqStorageCreate) IsRawLogFieldString() bool

IsRawLogFieldString 判断 raw log 字段是否是 string 类型

func (*ReqStorageCreate) JSON

func (r *ReqStorageCreate) JSON() string

func (*ReqStorageCreate) Mapping2Fields

func (r *ReqStorageCreate) Mapping2Fields(rawLogFieldParent string) string

func (*ReqStorageCreate) Mapping2String

func (r *ReqStorageCreate) Mapping2String(withType bool, rawLogFieldParent string) string

func (*ReqStorageCreate) SelectFields

func (r *ReqStorageCreate) SelectFields() string

type ReqStorageGetTraceGraph

type ReqStorageGetTraceGraph struct {
	StartTime int `form:"startTime"`
	EndTime   int `form:"endTime"`
}

type ReqStorageUpdate

type ReqStorageUpdate struct {
	MergeTreeTTL            int    `form:"mergeTreeTTL"`
	KafkaBrokers            string `form:"kafkaBrokers"`
	KafkaTopic              string `form:"kafkaTopic"`
	KafkaConsumerNum        int    `form:"kafkaConsumerNum"` // min 1 max 8
	KafkaSkipBrokenMessages int    `form:"kafkaSkipBrokenMessages"`
	Desc                    string `form:"desc"`
	V3TableType             int    `form:"v3TableType"`
}

type ReqStorageUpdateTraceInfo

type ReqStorageUpdateTraceInfo struct {
	TraceTableId int `form:"traceTableId"`
}

type ReqStructuralTransfer

type ReqStructuralTransfer struct {
	Source  string   `json:"source" form:"source"`
	Target  string   `json:"target" form:"target"`
	Columns []Column `json:"columns" form:"columns"`
}

type ReqSyncConfig

type ReqSyncConfig struct {
	K8SConfigMapId        int    `form:"k8sConfigMapId"`
	K8SConfigMapName      string `form:"k8sConfigMapName" binding:"required"`
	K8SConfigMapNamespace string `form:"k8sConfigMapNameSpace" binding:"required"`
	ClusterId             int    `form:"clusterId" binding:"required"`
}

ReqSyncConfig ..

type ReqTableCreate

type ReqTableCreate struct {
	TableName               string `form:"tableName" binding:"required"`
	Typ                     int    `form:"typ" binding:"required"`
	Days                    int    `form:"days" binding:"required"`
	Brokers                 string `form:"brokers" binding:"required"`
	Topics                  string `form:"topics" binding:"required"`
	Consumers               int    `form:"consumers" binding:"required"`
	KafkaSkipBrokenMessages int    `form:"kafkaSkipBrokenMessages"`
	Desc                    string `form:"desc"`
}

type ReqTableCreateExist

type ReqTableCreateExist struct {
	DatabaseName  string `form:"databaseName" json:"databaseName" binding:"required"`
	TableName     string `form:"tableName" json:"tableName" binding:"required"`
	TimeField     string `form:"timeField" json:"timeField"`
	TimeFieldType int    `form:"timeFieldType" json:"timeFieldType"`
	Cluster       string `form:"cluster" json:"cluster"`
	Desc          string `form:"desc" json:"desc"`
}

type ReqTableCreateExistBatch

type ReqTableCreateExistBatch struct {
	TableList []ReqTableCreateExist `form:"tableList" json:"tableList"`
}

type ReqTableDependencies

type ReqTableDependencies struct {
	DatabaseName string `json:"databaseName" form:"databaseName" binding:"required"`
	TableName    string `json:"tableName" form:"tableName" binding:"required"`
}

type ReqTableId

type ReqTableId struct {
	Instance   string `form:"instance" binding:"required"`
	Database   string `form:"database" binding:"required"`
	Table      string `form:"table" binding:"required"`
	Datasource string `form:"datasource" binding:"required"`
}

type ReqTableUpdate

type ReqTableUpdate struct {
	Desc string `form:"desc"`
}

type ReqTemplateClusterNoReplica

type ReqTemplateClusterNoReplica struct {
	Dsn                 string `json:"dsn" binding:"required"`
	K8sClusterName      string `json:"k8sClusterName" binding:"required"`
	Brokers             string `json:"brokers" binding:"required"`
	InstanceClusterName string `json:"instanceClusterName" binding:"required"`
}

type ReqTemplateStandalone

type ReqTemplateStandalone struct {
	Dsn         string `json:"dsn" binding:"required"`
	ClusterName string `json:"clusterName" binding:"required"`
	Brokers     string `json:"brokers" binding:"required"`
}

type ReqTestInstance

type ReqTestInstance struct {
	Datasource string `json:"datasource" binding:"required"`
	Dsn        string `json:"dsn" binding:"required"`
}

type ReqUpdateConfig

type ReqUpdateConfig struct {
	ID      int    `json:"id"` // the id of configuration
	Message string `json:"message" binding:"required"`
	Content string `json:"content" binding:"required"`
}

ReqUpdateConfig ..

type ReqUpdateCrontab

type ReqUpdateCrontab struct {
	Desc          string          `json:"desc" form:"desc"`
	DutyUid       int             `json:"dutyUid" form:"dutyUid" required:"true"`
	Cron          string          `json:"cron" form:"cron" required:"true"`
	Typ           int             `json:"typ" form:"typ"`
	Args          []ReqCrontabArg `json:"args" form:"args"`
	IsRetry       int             `json:"isRetry" form:"isRetry"` // isRetry: 0 no 1 yes
	RetryTimes    int             `json:"retryTimes" form:"retryTimes"`
	RetryInterval int             `json:"retryInterval" form:"retryInterval"` // retryInterval: the unit is in seconds, 100 means 100s
	ChannelIds    []int           `json:"channelIds" form:"channelIds"`
}

crontab struct

type ReqUpdateFolder

type ReqUpdateFolder struct {
	Name       string `json:"name" form:"name" binding:"required"`
	Desc       string `json:"desc" form:"desc"`
	ParentId   int    `json:"parentId" form:"parentId"`
	WorkflowId int    `json:"workflowId" form:"workflowId"`
}

type ReqUpdateGroup

type ReqUpdateGroup struct {
	OriginalName string `json:"name"`
	CurrentName  string `json:"current_name"`
}

type ReqUpdateNode

type ReqUpdateNode struct {
	FolderId int    `json:"folderId" form:"folderId"`
	Name     string `json:"name" form:"name"`
	Desc     string `json:"desc" form:"desc"`
	Content  string `json:"content" form:"content"`
	SourceId int    `json:"sourceId" form:"sourceId"`
	Tertiary int    `json:"tertiary" form:"tertiary"`
}

type ReqUpdatePmsRole

type ReqUpdatePmsRole struct {
	db.PmsRole
}

type ReqUpdateSource

type ReqUpdateSource struct {
	Name     string `json:"name" form:"name" binding:"required"`
	Desc     string `json:"desc" form:"desc"`
	URL      string `json:"url" form:"url"`
	UserName string `json:"username" form:"username"`
	Password string `json:"password" form:"password"`
	Typ      int    `json:"typ" form:"typ"`
}

type ReqUpdateWorkflow

type ReqUpdateWorkflow struct {
	Name string `json:"name" form:"name" binding:"required"`
	Desc string `json:"desc" form:"desc"`
}

type ReqUserCreate

type ReqUserCreate struct {
	Username string `json:"username" form:"username"` // 登陆账号
	Nickname string `json:"nickname" form:"nickname"` // 显示用户名
}

type ReqUserList

type ReqUserList struct {
	Username string `json:"username" form:"username"`
	db2.ReqPage
}

type ReqViewCreate

type ReqViewCreate struct {
	Name             string `json:"viewName"`
	IsUseDefaultTime int    `json:"isUseDefaultTime"`
	Key              string `json:"key"`
	Format           string `json:"format"`
}

type ReqViewList

type ReqViewList struct {
	ID   int    `json:"id"`
	Name string `json:"viewName"`
}

type ReqWorkerDashboard

type ReqWorkerDashboard struct {
	Start      int64 `json:"start" form:"start"`
	End        int64 `json:"end" form:"end"`
	Iid        int   `json:"iid" form:"iid"`
	IsInCharge int   `json:"isInCharge" form:"isInCharge"`
}

ReqWorkerDashboard Request start and end time

type ReqWorkerList

type ReqWorkerList struct {
	Start    int    `json:"start" form:"start"`
	End      int    `json:"end" form:"end"`
	NodeName string `json:"nodeName" form:"nodeName"`
	Tertiary int    `json:"tertiary" form:"tertiary"` // ClickHouse 10; MySQL 11; OfflineSync 20
	Iid      int    `json:"iid" form:"iid"`
	Status   int    `json:"status" form:"status"` // 0 未知;1 成功;2 失败
	Pagination
}

type ResPmsCommonInfo

type ResPmsCommonInfo struct {
	RulesInfo                  []InfoItem     `json:"rules_info"`
	PrefixesInfo               []InfoItem     `json:"prefixes_info"`
	AllActsInfo                []InfoItem     `json:"all_acts_info"`
	NormalActsInfo             []InfoItem     `json:"normal_acts_info"`
	AppSubResourcesInfo        []InfoItem     `json:"app_subResources_info"`
	ConfigRsrcSubResourcesInfo []InfoItem     `json:"configRsrc_subResources_info"`
	DomainCascader             []CascaderItem `json:"domainCascader"`
}

type ResourceItem

type ResourceItem struct {
	Name string `json:"name"`
	Desc string `json:"desc"`
}

type RespAgentChartsSearch

type RespAgentChartsSearch struct {
	Data          map[int64]int64 `json:"data"`
	MinOffset     int64           `json:"minOffset"`
	MaxOffset     int64           `json:"maxOffset"`
	K8sClientType string          `json:"k8sClientType"`
}

type RespAgentSearch

type RespAgentSearch struct {
	Data          []RespAgentSearchItem `json:"data"`
	K8sClientType string                `json:"k8sClientType"`
}

type RespAgentSearchItem

type RespAgentSearchItem struct {
	Line string                 `json:"line"`
	Ext  map[string]interface{} `json:"ext"`
}

type RespAlarmHistoryList

type RespAlarmHistoryList struct {
	Total int64               `json:"total"`
	Succ  int64               `json:"succ"`
	List  []*db2.AlarmHistory `json:"list"`
}

type RespAlarmInfo

type RespAlarmInfo struct {
	Filters     []RespAlarmInfoFilter           `json:"filters"`
	RelatedList []*db2.RespAlarmListRelatedInfo `json:"relatedList"`

	Ctime int64 `json:"ctime"`
	Utime int64 `json:"utime"`

	db2.Alarm

	Uid              int    `gorm:"-" json:"uid"`
	OaId             int64  `gorm:"column:oa_id;type:bigint(20);NOT NULL" json:"oaId"`                                // oa_id
	Username         string `gorm:"column:username;type:varchar(128);NOT NULL;index:uix_user,unique" json:"username"` // 用户名
	Nickname         string `gorm:"column:nickname;type:varchar(128);NOT NULL;index:uix_user,unique" json:"nickname"` // 昵称
	Secret           string `gorm:"column:secret;type:varchar(256);NOT NULL" json:"secret"`                           // 实例名称
	Phone            string `gorm:"column:phone;type:varchar(64);NOT NULL" json:"phone"`                              // phone
	Email            string `gorm:"column:email;type:varchar(64);NOT NULL" json:"email"`                              // email
	Avatar           string `gorm:"column:avatar;type:varchar(256);NOT NULL" json:"avatar"`                           // avatar
	Hash             string `gorm:"column:hash;type:varchar(256);NOT NULL" json:"hash"`                               // hash
	WebUrl           string `gorm:"column:web_url;type:varchar(256);NOT NULL" json:"webUrl"`                          // webUrl
	Oauth            string `gorm:"column:oauth;type:varchar(256);NOT NULL" json:"oauth"`                             // oauth
	State            string `gorm:"column:state;type:varchar(256);NOT NULL" json:"state"`                             // state
	OauthId          string `gorm:"column:oauth_id;type:varchar(256);NOT NULL" json:"oauthId"`                        // oauthId
	Password         string `gorm:"column:password;type:varchar(256);NOT NULL" json:"password"`                       // password
	CurrentAuthority string `gorm:"column:current_authority;type:varchar(256);NOT NULL" json:"currentAuthority"`      // currentAuthority
	Access           string `gorm:"column:access;type:varchar(256);NOT NULL" json:"access"`                           // access

	// Deprecated:
	Table db2.BaseTable `json:"table"`
	// Deprecated:
	Instance db2.BaseInstance `json:"instance"`
	// Deprecated: Conditions
	Conditions []*db2.AlarmCondition `json:"conditions"`
}

type RespAlarmInfoFilter

type RespAlarmInfoFilter struct {
	*db2.AlarmFilter
	TableName  string                `json:"tableName"`
	Conditions []*db2.AlarmCondition `json:"conditions"`
}

type RespAlarmList

type RespAlarmList struct {
	*db2.Alarm
	RelatedList []*db2.RespAlarmListRelatedInfo `json:"relatedList"`

	// Deprecated:
	TableName string `json:"tableName"`
	// Deprecated:
	TableDesc string `json:"tableDesc"`
	// Deprecated:
	Tid int `json:"tid"`
	// Deprecated:
	DatabaseName string `json:"databaseName"`
	// Deprecated:
	DatabaseDesc string `json:"databaseDesc"`
	// Deprecated:
	Did int `json:"did"`
	// Deprecated:
	InstanceName string `json:"instanceName"`
	// Deprecated:
	InstanceDesc string `json:"instanceDesc"`
	// Deprecated:
	Iid int `json:"iid"`
}

type RespChart

type RespChart struct {
}

type RespColumn

type RespColumn struct {
	Name     string `json:"name"`
	TypeDesc string `json:"typeDesc"`
	Type     int    `json:"type"`
}

type RespComplete

type RespComplete struct {
	Logs       []map[string]interface{} `json:"logs"`
	IsNeedSort bool                     `json:"isNeedSort"`
	SortRule   []string                 `json:"sortRule"`
}

type RespConfigmap

type RespConfigmap struct {
	Name string `json:"configmapName"`
}

type RespCreateNode

type RespCreateNode struct {
	Id      int    `json:"id"`
	Name    string `json:"name"`
	Desc    string `json:"desc"`
	Content string `json:"content"`
	LockUid int    `json:"lockUid"`
	LockAt  int64  `json:"lockAt"`
}

type RespDatabase

type RespDatabase struct {
	DatabaseName   string `json:"databaseName"`
	InstanceName   string `json:"instanceName"`
	DatasourceType string `json:"datasourceType"`
	InstanceId     int    `json:"instanceId"`
}

type RespDatabaseItem

type RespDatabaseItem struct {
	Id             int      `json:"id"`   // id
	Iid            int      `json:"iid"`  // 实例 id
	Name           string   `json:"name"` // 数据库名称
	Uid            int      `json:"uid"`  // 操作人
	DatasourceType string   `json:"datasourceType"`
	InstanceName   string   `json:"instanceName"`
	InstanceDesc   string   `json:"instanceDesc"`
	Mode           int      `json:"mode"`
	Clusters       []string `json:"clusters"`
	Cluster        string   `json:"cluster"`
	Desc           string   `json:"desc"`
}

type RespDatabaseSelfBuilt

type RespDatabaseSelfBuilt struct {
	Name   string                 `json:"name"`
	Tables []*RespTablesSelfBuilt `json:"tables"`
}

type RespDatabaseSimple

type RespDatabaseSimple struct {
	Id           int               `json:"id"`
	Iid          int               `json:"iid"`
	DatabaseName string            `json:"databaseName"`
	IsCreateByCV int               `json:"isCreateByCV"`
	Desc         string            `json:"desc"`
	Cluster      string            `json:"cluster"`
	Tables       []RespTableSimple `json:"tables"`
}

instance list filter with pms

type RespDetailConfig

type RespDetailConfig struct {
	ID              int      `json:"id"` // ConfigurationHistory.ID
	ConfigmapId     int      `json:"k8sConfigmapId"`
	Name            string   `json:"name"`
	Content         string   `json:"content"`
	Format          string   `json:"format"` // Yaml/Toml
	EnvId           int      `json:"envId"`  // 环境id
	ZoneId          int      `json:"zoneId"`
	Ctime           int64    `json:"ctime"`
	Utime           int64    `json:"utime"`
	PublishTime     int64    `json:"ptime"`           // 未发布/发布时间
	CurrentEditUser *db.User `json:"currentEditUser"` // 当前正在编辑的用户名
}

RespDetailConfig Contains configuration content

type RespDiffConfig

type RespDiffConfig struct {
	Origin   *RespDetailConfig `json:"origin,omitempty"`
	Modified RespDetailConfig  `json:"modified"`
}

RespDiffConfig ..

type RespDomainCascader

type RespDomainCascader []CascaderItem

type RespGetAppPerm

type RespGetAppPerm struct {
	List       []AppPermItem `json:"list"`
	Pagination Pagination    `json:"pagination"`
}

type RespGetGroupAPIPerm

type RespGetGroupAPIPerm []APIPermItem

type RespGetMenuPerm

type RespGetMenuPerm []string

type RespHistoryConfigItem

type RespHistoryConfigItem struct {
	ID              int    `json:"id"`
	UID             int    `json:"uid"` // 发布人ID
	UserName        string `json:"username"`
	ChangeLog       string `json:"changeLog"`
	ConfigurationID int    `json:"configurationId"`
	Version         string `json:"version"` // 发布到Juno Proxy的版本号
	Ctime           int64  `json:"ctime"`
}

type RespIndexItem

type RespIndexItem struct {
	IndexName string  `json:"indexName"`
	Count     uint64  `json:"count"`
	Percent   float64 `json:"percent"`
}

type RespInfoFolder

type RespInfoFolder struct {
	db2.BigdataFolder
	UserName string `json:"userName"`
	NickName string `json:"nickName"`
}

type RespInfoNode

type RespInfoNode struct {
	Id              int    `json:"id"`
	Name            string `json:"name"`
	Desc            string `json:"desc"`
	Content         string `json:"content"`
	LockUid         int    `json:"lockUid"`
	LockAt          int64  `json:"lockAt"`
	Username        string `json:"username"`
	Nickname        string `json:"nickname"`
	Status          int    `json:"status"`
	PreviousContent string `json:"previousContent"`
	Result          string `json:"result"`
}

type RespInstance

type RespInstance struct {
	Id          int      `json:"id"`
	Name        string   `json:"name"`
	Clusters    []string `json:"clusters"`
	ClusterInfo []string `json:"clusterInfo"`
	Desc        string   `json:"desc"`
	Mode        int      `json:"mode"`
	Error       string   `json:"error"`
}

type RespInstanceSimple

type RespInstanceSimple struct {
	Id           int                  `json:"id"`
	InstanceName string               `json:"instanceName"`
	Desc         string               `json:"desc"`
	Databases    []RespDatabaseSimple `json:"databases"`
}

instance list filter with pms

type RespJaegerDependencyDataModel

type RespJaegerDependencyDataModel struct {
	Parent            string  `json:"parent"`
	Child             string  `json:"child"`
	CallCount         int64   `json:"callCount"`
	ServerDurationP50 float64 `json:"serverDurationP50"`
	ServerDurationP90 float64 `json:"serverDurationP90"`
	ServerDurationP99 float64 `json:"serverDurationP99"`
	ClientDurationP50 float64 `json:"clientDurationP50"`
	ClientDurationP90 float64 `json:"clientDurationP90"`
	ClientDurationP99 float64 `json:"clientDurationP99"`
	ServerSuccessRate float64 `json:"serverSuccessRate"`
	ClientSuccessRate float64 `json:"clientSuccessRate"`
}

type RespListAppGroup

type RespListAppGroup []ListGroupItem

type RespListConfig

type RespListConfig []RespListConfigItem

RespListConfig ..

type RespListConfigItem

type RespListConfigItem struct {
	ID          int    `json:"id"`
	Name        string `json:"name"`
	Format      string `json:"format"`         // Yaml/Toml
	K8SCmId     int    `json:"k8sConfigmapId"` // 环境id
	Ctime       int64  `json:"ctime"`
	Utime       int64  `json:"utime"`
	PublishTime int64  `json:"publishTime"`
}

RespListConfigItem Does not contain configuration content to prevent configuration form being too long

type RespListFolder

type RespListFolder struct {
	Id        int                `json:"id"`
	Name      string             `json:"name"`
	Desc      string             `json:"desc"`
	Primary   int                `json:"primary"`
	Secondary int                `json:"secondary"`
	ParentId  int                `json:"parentId"`
	Children  []RespListFolder   `json:"children"`
	Nodes     []*db2.BigdataNode `json:"nodes"`
}

type RespListNode

type RespListNode struct {
	FolderId int    `json:"folderId"`
	Name     string `json:"name"`
	Desc     string `json:"desc"`
	Uid      int    `json:"uid"`
	UserName string `json:"userName"`
}

type RespListUser

type RespListUser struct {
	List       []ListUserItem `json:"list"`
	Pagination Pagination     `json:"pagination"`
}

type RespListUserGroup

type RespListUserGroup []ListGroupItem

type RespNamespaceConfigmaps

type RespNamespaceConfigmaps struct {
	Namespace  string          `json:"namespace"`
	Configmaps []RespConfigmap `json:"configmaps"`
}

type RespNodeHistoryList

type RespNodeHistoryList struct {
	Total int64             `json:"total"`
	List  []NodeHistoryItem `json:"list"`
}

type RespNodeResult

type RespNodeResult struct {
	ID           int    `json:"id"`
	Ctime        int64  `json:"ctime"`
	NodeId       int    `json:"nodeId"`
	Content      string `json:"content,omitempty"`
	Result       string `json:"result,omitempty"`
	Cost         int64  `json:"cost,omitempty"`
	ExcelProcess string `json:"excelProcess,omitempty"`
	Status       int    `json:"status"`
	RespUserSimpleInfo
}

type RespNodeResultList

type RespNodeResultList struct {
	Total int64            `json:"total"`
	List  []RespNodeResult `json:"list"`
}

type RespQuery

type RespQuery struct {
	Limited       uint32                   `json:"limited"`
	Keys          []*db2.BaseIndex         `json:"keys"`
	ShowKeys      []string                 `json:"showKeys"`
	Count         uint64                   `json:"count"`
	Terms         [][]string               `json:"terms"`
	HiddenFields  []string                 `json:"hiddenFields"`
	DefaultFields []string                 `json:"defaultFields"`
	Logs          []map[string]interface{} `json:"logs"`
	Query         string                   `json:"query"`
	Cost          int64                    `json:"cost"`
	Where         string                   `json:"where"`
	IsTrace       int                      `json:"isTrace"`
}

type RespRunNode

type RespRunNode struct {
	Result string `json:"result"`
	Status int    `json:"status"`
}

type RespStorageAnalysisFields

type RespStorageAnalysisFields struct {
	BaseFields []StorageAnalysisField `json:"baseFields"`
	LogFields  []StorageAnalysisField `json:"logFields"`
}

type RespTableDependencies

type RespTableDependencies struct {
	Utime int64           `json:"utime"`
	Data  []RespTableDeps `json:"data"`
}

type RespTableDeps

type RespTableDeps struct {
	Database   string   `json:"database"`
	Table      string   `json:"table"`
	Engine     string   `json:"engine"`
	TotalRows  uint64   `json:"totalRows"`
	TotalBytes uint64   `json:"totalBytes"`
	Deps       []string `json:"deps"`
	ShardNum   uint32   `json:"shardNum"`
	ReplicaNum uint32   `json:"replicaNum"`
}

func (*RespTableDeps) Name

func (r *RespTableDeps) Name() string

type RespTableDetail

type RespTableDetail struct {
	Did                     int    `json:"did"`     // 数据库 id
	Name                    string `json:"name"`    // table
	Typ                     int    `json:"typ"`     // table 类型 1 app 2 ego 3 ingress
	Days                    int    `json:"days"`    // 数据过期时间
	Brokers                 string `json:"brokers"` // kafka broker
	Topic                   string `json:"topic"`   // kafka topic
	Uid                     int    `json:"uid"`     // 操作人
	Desc                    string `json:"desc"`
	ConsumerNum             int    `json:"consumerNum"`
	KafkaSkipBrokenMessages int    `json:"kafkaSkipBrokenMessages"`
	SQLContent              struct {
		Keys []string          `json:"keys"`
		Data map[string]string `json:"data"`
	} `json:"sqlContent"`
	Database    RespDatabaseItem `json:"database"`
	CreateType  int              `json:"createType"`
	TimeField   string           `json:"timeField"`
	RawLogField string           `json:"rawLogField"`
	Ctime       int64            `json:"ctime"`
	Utime       int64            `json:"utime"`

	TraceTableId int `json:"traceTableId"`
	V3TableType  int `json:"v3TableType"`

	IsNotSupAnalysisField int `json:"isNotSupAnalysisField"`
}

type RespTableSimple

type RespTableSimple struct {
	Id              int    `json:"id"`
	Did             int    `json:"did"`
	TableName       string `json:"tableName"`
	CreateType      int    `json:"createType"`
	Desc            string `json:"desc"`
	V3TableType     int    `json:"v3TableType"`
	RelTraceTableId int    `json:"relTraceTableId"`
}

instance list filter with pms

type RespTablesSelfBuilt

type RespTablesSelfBuilt struct {
	Name string `json:"name"`
}

type RespUserCreate

type RespUserCreate struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type RespUserSimpleInfo

type RespUserSimpleInfo struct {
	Uid      int    `json:"uid"`
	Username string `json:"username"`
	Nickname string `json:"nickname"`
	Email    string `json:"email"`
	Avatar   string `json:"avatar"`
	Phone    string `json:"phone"`
}

func (*RespUserSimpleInfo) Gen

func (r *RespUserSimpleInfo) Gen(u db.User)

type RespUserSimpleList

type RespUserSimpleList struct {
	Total int64                `json:"total"`
	List  []RespUserSimpleInfo `json:"list"`
}

type RespWorkerDashboard

type RespWorkerDashboard struct {
	NodeFailed    int              `json:"nodeFailed"`    // node status
	NodeSuccess   int              `json:"nodeSuccess"`   // node status
	NodeUnknown   int              `json:"nodeUnknown"`   // node status
	WorkerFailed  int              `json:"workerFailed"`  // Execution status of each periodic schedule
	WorkerSuccess int              `json:"workerSuccess"` // Execution status of each periodic schedule
	WorkerUnknown int              `json:"workerUnknown"` // Execution status of each periodic schedule
	Flows         []WorkerStatsRow `json:"flows"`         // Execution trend chart
}

type RespWorkerList

type RespWorkerList struct {
	Total int64           `json:"total"`
	List  []RespWorkerRow `json:"list"`
}

type RespWorkerRow

type RespWorkerRow struct {
	NodeName  string `json:"nodeName"`
	Status    int    `json:"status"` // unknown 0; success 1; failed 2
	Tertiary  int    `json:"tertiary"`
	Crontab   string `json:"crontab"`
	StartTime int64  `json:"startTime"`
	EndTime   int64  `json:"endTime"`
	Iid       int    `json:"iid"`
	ID        int    `json:"id"`
	NodeId    int    `json:"nodeId"`
	Cost      int64  `json:"cost"`

	ChargePerson RespUserSimpleInfo `json:"chargePerson"`
}

type RoleGrantInfoFilter

type RoleGrantInfoFilter struct {
	ResourceType    string `form:"resourceType" valid:"required" json:"resourceType"` // app and etc.
	ResourceId      int    `form:"resourceId" valid:"required" json:"resourceId"`     // aid and etc.
	GrantObjectType string `json:"grantObjectType" form:"grantObjectType"`            // user and etc.
	DomainType      string `json:"domainType" form:"domainType"`
	DomainId        int    `json:"domainId" form:"domainId"`
	RoleType        int    `json:"roleType" form:"roleType"` // used to filter results, can be omitted
}

type RoleItem

type RoleItem struct {
	BelongType string          `json:"belong_type"` // value in PermittedPrefixMap
	ReferId    int             `json:"refer_id"`    // 所对应的belongType资源的id; 非0时, referGroup为空
	ReferGroup string          `json:"refer_group"` // 所对应的group名; 非空时, referId 为0
	RoleName   string          `json:"role_name"`   // 角色名称
	RoleDesc   string          `json:"role_desc"`   // 角色描述
	PmsDetails []RolePmsDetail `json:"pms_details"`
	DomainType string          `json:"domain_type"` // 角色所在domain类型 可为空
	DomainId   int             `json:"domain_id"`   // domainType不为空时, 对应的id; domainType为空时, 此处值为0
}

type RolePmsDetail

type RolePmsDetail struct {
	SubResources []string `json:"sub_resources"`
	Acts         []string `json:"acts"`
}

type RootUsers

type RootUsers struct {
	RootUids []int `json:"root_uids"`
}

type RunNodeResult

type RunNodeResult struct {
	Logs           []map[string]interface{} `json:"logs"`
	InvolvedSQLs   map[string]string        `json:"involvedSQLs"`
	Message        string                   `json:"message"`
	DagFailedNodes map[int]string           `json:"dagFailedNodes"`
}

type StorageAnalysisField

type StorageAnalysisField struct {
	Id         int    `json:"id"`
	Tid        int    `json:"tid"`
	Field      string `json:"field"`
	RootName   string `json:"rootName"`
	Typ        int    `json:"typ"`
	HashTyp    int    `json:"hashTyp"`
	Alias      string `json:"alias"`
	Ctime      int64  `json:"ctime"`
	Utime      int64  `json:"utime"`
	OrderField string `json:"orderField"`
}

type SyncContent

type SyncContent struct {
	Source  IntegrationFlat      `json:"source"`
	Target  IntegrationFlat      `json:"target"`
	Mapping []IntegrationMapping `json:"mapping"`
}

func (*SyncContent) Cluster

func (s *SyncContent) Cluster() string

type SystemTables

type SystemTables struct {
	Table             string   `json:"table"`
	Engine            string   `json:"engine"`
	Database          string   `json:"database"`
	DownDatabaseTable []string `json:"downDatabaseTable"`
	CreateTableQuery  string   `json:"createTableQuery"`
	TotalRows         uint64   `json:"totalRows"`
	TotalBytes        uint64   `json:"totalBytes"`
}

func (*SystemTables) Name

func (r *SystemTables) Name() string

type TableRolesAssignmentInfo

type TableRolesAssignmentInfo struct {
	AppId     int               `json:"app_id"`
	RolesInfo []AppRoleInfoItem `json:"roles_info"`
}

type WeComMarkdown

type WeComMarkdown struct {
	MsgType       string         `json:"msgtype"`
	MentionedList *MentionedList `json:"mentionedList"`
	Markdown      *Markdown      `json:"markdown"`
}

type WorkerStats

type WorkerStats struct {
	Iid  int
	Uid  int
	Data map[int64]WorkerStatsRow
}

type WorkerStatsRow

type WorkerStatsRow struct {
	Timestamp int64 `json:"timestamp"`
	Unknown   int   `json:"unknown"`
	Failed    int   `json:"failed"`
	Success   int   `json:"success"`
}

Jump to

Keyboard shortcuts

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