view

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigFormatToml       ConfigFormat = "toml"
	ConfigFormatYaml                    = "yaml"
	ConfigFormatJson                    = "json"
	ConfigFormatXml                     = "xml"
	ConfigFormatProperties              = "properties"
	ConfigFormatIni                     = "ini"
	ConfigFormatConf                    = "conf"
)
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 Alert

type Alert struct {
	Labels      map[string]string `json:"labels"`
	Annotations map[string]string `json:"annotations"`
	StartsAt    time.Time         `json:"startsAt"`
	EndsAt      time.Time         `json:"endsAt"`
}

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 ConfigFormat

type ConfigFormat string

ConfigFormat ..

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 added in v0.3.2

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

DAG ...

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 added in v0.3.1

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"`
}

type InfoItem

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

type InnerNodeRun added in v0.3.1

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

type IntegrationFlat added in v0.3.1

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"`

	TargetBefore string `json:"targetBefore"`
	TargetAfter  string `json:"targetAfter"`
}

IntegrationFlat integration offline sync step 1

type IntegrationMapping added in v0.3.1

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 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 MenuTree []MenuTreeItem
type MenuTreeItem struct {
	Name     string   `json:"name"`
	Path     string   `json:"path"`
	Icon     string   `json:"icon"`
	Children MenuTree `json:"children"`
}

type NodeHistoryItem added in v0.3.1

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

type Notification

type Notification struct {
	Version           string            `json:"version"`
	GroupKey          string            `json:"groupKey"`
	Status            string            `json:"status"`
	Receiver          string            `json:"receiver"`
	GroupLabels       map[string]string `json:"groupLabels"`
	CommonLabels      map[string]string `json:"commonLabels"`
	CommonAnnotations map[string]string `json:"commonAnnotations"`
	ExternalURL       string            `json:"externalURL"`
	Alerts            []Alert           `json:"alerts"`
}

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"`
	Mode       int                       `json:"mode" form:"mode"`
	Level      int                       `json:"level" form:"level"`
}

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"`
}

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
	db.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 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 added in v0.3.2

type ReqCreateCrontab struct {
	ReqUpdateCrontab
}

crontab struct

type ReqCreateFolder added in v0.3.1

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" binding:"required"`
	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"`
	Mode             int        `json:"mode"`
	ReplicaStatus    int        `json:"replicaStatus"`
	Clusters         db.Strings `json:"clusters"`
}

type ReqCreateNode added in v0.3.1

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 added in v0.3.1

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

type ReqCreateWorkflow added in v0.3.1

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

type ReqCrontabArg added in v0.3.2

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

crontab struct

type ReqDAG added in v0.3.2

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

DAG ...

type ReqDagEdge added in v0.3.2

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

DAG ...

type ReqDagNode added in v0.3.2

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

DAG ...

type ReqDatabaseCreate

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

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 ReqListConfig

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

type ReqListNode added in v0.3.1

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 added in v0.3.1

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 added in v0.3.1

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

type ReqListSourceTable added in v0.3.1

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 added in v0.3.1

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

type ReqNewPmsRole

type ReqNewPmsRole struct {
	db.PmsRole
}

type ReqNodeHistoryList added in v0.3.1

type ReqNodeHistoryList struct {
	db.ReqPage

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

type ReqNodeResultList added in v0.3.2

type ReqNodeResultList struct {
	db.ReqPage
}

type ReqNodeRunOpenAPI added in v0.3.2

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

type ReqNodeRunResult added in v0.3.2

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"`
}

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 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"`
	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"`
	Desc          string `form:"desc" json:"desc"`
}

type ReqTableCreateExistBatch

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

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 added in v0.3.1

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 added in v0.3.1

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 {
	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 added in v0.3.2

type ReqUpdateCrontab struct {
	Desc          string          `json:"desc" form:"desc"`
	DutyUid       int             `json:"dutyUid" form:"dutyUid"`
	Cron          string          `json:"cron" form:"cron"`
	Typ           int             `json:"typ" form:"typ"`
	Args          []ReqCrontabArg `json:"args" form:"args"`
	IsRetry       int             `json:"isRetry" form:"isRetry"`
	RetryTimes    int             `json:"retryTimes" form:"retryTimes"`
	RetryInterval int             `json:"retryInterval" form:"retryInterval"`
}

crontab struct

type ReqUpdateFolder added in v0.3.1

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 added in v0.3.1

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 added in v0.3.1

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 added in v0.3.1

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

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 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 RespAlarmHistoryList

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

type RespAlarmInfo

type RespAlarmInfo struct {
	Filters    []*db.AlarmFilter    `json:"filters" form:"filters"`
	Conditions []*db.AlarmCondition `json:"conditions" form:"conditions"`
	Ctime      int64                `json:"ctime"`
	Utime      int64                `json:"utime"`
	db.Alarm
	db.User
	Table    db.BaseTable    `json:"table"`
	Instance db.BaseInstance `json:"instance"`
}

type RespAlarmList

type RespAlarmList struct {
	*db.Alarm
	TableName    string `json:"tableName"`
	TableDesc    string `json:"tableDesc"`
	Tid          int    `json:"tid"`
	DatabaseName string `json:"databaseName"`
	DatabaseDesc string `json:"databaseDesc"`
	Did          int    `json:"did"`
	InstanceName string `json:"instanceName"`
	InstanceDesc string `json:"instanceDesc"`
	Iid          int    `json:"iid"`
}

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"`
}

type RespConfigmap

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

type RespCreateNode added in v0.3.1

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 added in v0.3.2

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 added in v0.3.1

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

type RespInfoNode added in v0.3.1

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 RespInstanceSimple added in v0.3.2

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 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 added in v0.3.1

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     []*db.BigdataNode `json:"nodes"`
}

type RespListNode added in v0.3.1

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 added in v0.3.1

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

type RespNodeResult added in v0.3.2

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"`
	RespUserSimpleInfo
}

type RespNodeResultList added in v0.3.2

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

type RespQuery

type RespQuery struct {
	Limited       uint32                   `json:"limited"`
	Keys          []*db.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"`
}

type RespRunNode added in v0.3.1

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

type RespTableDeps added in v0.3.1

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"`
}

func (*RespTableDeps) Name added in v0.3.2

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"`    //
	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"`
	Ctime      int64            `json:"ctime"`
	Utime      int64            `json:"utime"`
}

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"`
}

instance list filter with pms

type RespTablesSelfBuilt

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

type RespUserSimpleInfo added in v0.3.2

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

func (*RespUserSimpleInfo) Gen added in v0.3.2

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

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 added in v0.3.1

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 SyncContent added in v0.3.1

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

func (*SyncContent) Cluster added in v0.3.1

func (s *SyncContent) Cluster() string

type SystemTable added in v0.3.2

type SystemTable 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"`
}

type TableRolesAssignmentInfo

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

Jump to

Keyboard shortcuts

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