apistructs

package
v1.0.0-RC Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: AGPL-3.0 Imports: 30 Imported by: 36

README

这个 pkg 下是各个组件对外 API 的类型定义

结构体命名

  • request 和 response 的类型结构体名字统一为

    • <Resource><Action>[Version]Request

      e.g. ApplicationCreateRequest

    • <Resource><Action>[Version]Response

      e.g. ApplicationCreateResponse

  • 事件(event)结构体命名为 <EventName><Version>Event

请求参数在URL的Query中

请求参数在 url 的 query 中,则结构体定义如下:

type WebhookListRequest  struct {
    OrgID     string `query:"orgID"`
    ProjectID string `query:"projectID"`
}

type WebhookListRequest struct {
    OrgID     string `query:"orgID"`
    ProjectID string `query:"projectID"`
}

请求参数在URL的Path中

type WebhookInspectRequest struct {
    ID string `path`
}

Documentation

Overview

Package apistructs api request/response结构体定义

Package apistructs 自动化运行脚本相关

UnifiedFileTree 统一目录树协议

Index

Constants

View Source
const (
	AddonCategoryDataBase               = "存储"
	AddonCategoryMessage                = "消息"
	AddonCategorySearch                 = "搜索"
	AddonCategoryDistributedCooperation = "分布式写作"
	AddonCategoryCustom                 = "自定义"
	AddonCategoryMicroService           = "微服务治理"
	AddonCategoryPlatformDice           = "微服务治理"
	AddonCategoryPlatformCluster        = "微服务治理"
	AddonCategoryPlatformProject        = "微服务治理"
)
View Source
const (
	//INSIDE 内部依赖addon
	INSIDE string = "Y"
	//NOT_INSIDE 非内部依赖addon
	NOT_INSIDE string = "N"
)

addon insideAddon标记

View Source
const (
	// PlatformServiceTypeBasic 基础addon
	PlatformServiceTypeBasic int = 0
	// PlatformServiceTypeMicro 微服务
	PlatformServiceTypeMicro int = 1
	// PlatformServiceTypeAlibity 能力
	PlatformServiceTypeAlibity int = 2
)

addon insideAddon标记

View Source
const (
	//AddonDeleted addon逻辑删除,是
	AddonDeleted string = "Y"
	//AddonNotDeleted addon逻辑删除,否
	AddonNotDeleted string = "N"
)

addon 删除标记

View Source
const (
	AddonGetResourcePath               string = "/dice/resources"
	RuntimeUpMaxWaitTime               int64  = 15 * 60
	AddonMysqlMasterKey                string = "master"
	AddonMysqlSlaveKey                 string = "slave"
	AddonMysqlPasswordKey              string = "password"
	AddonESDefaultUser                 string = "elastic"
	AddonESPasswordKey                 string = "es-password"
	AddonRedisPasswordKey              string = "redis-password"
	AddonMysqlDefaultPort              string = "3306"
	AddonMysqlUser                     string = "mysql"
	AddonMysqlUserRoot                 string = "root"
	AddonMysqlInitURL                  string = "/mysql/init"
	AddonMysqlcheckStatusURL           string = "/mysql/check"
	AddonMysqlExecURL                  string = "/mysql/exec"
	AddonMysqlExecFileURL              string = "/mysql/exec_file"
	AddonMysqlJdbcPrefix               string = "jdbc:mysql://"
	AddonMysqlMasterGrantBackupSqls    string = "GRANT REPLICATION SLAVE ON *.* to 'backup'@'%' identified by '${MYSQL_ROOT_PASSWORD}';"
	AddonMysqlCreateMysqlUserSqls      string = "CREATE USER 'mysql'@'%' IDENTIFIED by '${MYSQL_ROOT_PASSWORD}';"
	AddonMysqlGrantMysqlUserSqls       string = "GRANT ALL PRIVILEGES ON *.* TO 'mysql'@'%' WITH GRANT OPTION;"
	AddonMysqlGrantSelectMysqlUserSqls string = "GRANT SELECT ON *.* TO 'mysql'@'%' WITH GRANT OPTION;"
	AddonMysqlFlushSqls                string = "flush privileges;"
	AddonMysqlSlaveChangeMasterSqls    string = "" /* 151-byte string literal not displayed */
	AddonMysqlSlaveResetSlaveSqls      string = "reset slave;"
	AddonMysqlSlaveStartSlaveSqls      string = "start slave;"
	AddonMysqlHostName                 string = "MYSQL_HOST"
	AddonMysqlPortName                 string = "MYSQL_PORT"
	AddonMysqlSlaveHostName            string = "MYSQL_SLAVE_HOST"
	AddonMysqlSlavePortName            string = "MYSQL_SLAVE_PORT"
	AddonMysqlUserName                 string = "MYSQL_USERNAME"
	AddonMysqlPasswordName             string = "MYSQL_PASSWORD"
	AddonPasswordHasEncripy            string = "ADDON_HAS_ENCRIPY"
	AddonCanalHostName                 string = "CANAL_HOST"
	AddonCanalPortName                 string = "CANAL_PORT"
	AddonCanalDefaultPort              string = "11111"
	AddonEsHostName                    string = "ELASTICSEARCH_HOST"
	AddonEsPortName                    string = "ELASTICSEARCH_PORT"
	AddonEsUserName                    string = "ELASTICSEARCH_USER"
	AddonEsPasswordName                string = "ELASTICSEARCH_PASSWORD"
	AddonEsDefaultPort                 string = "9200"
	AddonEsDefaultTcpPort              string = "9300"
	AddonEsTCPPortName                 string = "ELASTICSEARCH_TCP_PORT"
	AddonKafkaHostName                 string = "KAFKA_HOST"
	AddonKafkaManager                  string = "manager"
	AddonKafkaPortName                 string = "KAFKA_PORT"
	AddonRocketNameSrvPrefix           string = "namesrv"
	AddonRocketNameSrvDefaultPort      string = "9876"
	AddonRocketConsoleDefaultPort      string = "8080"
	AddonRocketConsulPrefix            string = "console"
	AddonRocketBrokerPrefix            string = "broker"
	AddonRocketNameSrvHost             string = "ROCKETMQ_NAMESRV_HOST"
	AddonRocketNameSrvPort             string = "ROCKETMQ_NAMESRV_PORT"
	AddonConsulHostName                string = "CONSUL_HOST"
	AddonConsulPortName                string = "CONSUL_PORT"
	AddonConsulDefaultPort             string = "8500"
	AddonConsulDNSPortName             string = "CONSUL_DNS_PORT"
	AddonConsulDefaulDNStPort          string = "8600"
	AddonConsulConsole                 string = "CONSUL_CONSOLE"
	AddonCustomCategory                string = "custom"
	AddonZKHostName                    string = "ZOOKEEPER_HOST"
	AddonZKPortName                    string = "ZOOKEEPER_PORT"
	AddonZKDubboName                   string = "ZOOKEEPER_DUBBO"
	AddonZKDubboHostListName           string = "ZOOKEEPER_DUBBO_HOSTS"
	AddonZKHostListName                string = "ZOOKEEPER_HOSTS"
	AddonZKDefaultPort                 string = "2181"
	AddonKafkaZkHost                   string = "zk_hosts"
	AddonRedisHostName                 string = "REDIS_HOST"
	AddonRedisPortName                 string = "REDIS_PORT"
	AddonRedisPasswordName             string = "REDIS_PASSWORD"
	AddonRedisSentinelsName            string = "REDIS_SENTINELS"
	AddonRedisMasterName               string = "MASTER_NAME"
	AddonMonitorDefaultVersion         string = "3.6"
	AddonStrategyParsingAddonsKey      string = "parsingAddons"
	AddonRabbitmqHostName              string = "RABBIT_HOST"
	AddonRabbitmqPortName              string = "RABBIT_PORT"
	AddonRabbitmqPasswordKey           string = "rabbitmq-password"
	AddonRabbitmqDefaultPort           string = "5672"
	AddonKmsKey                        string = "kms_key"
)

Addon通用配置

View Source
const (
	AddonScheduleSoldierAddr    string = "SOLDIER_ADDR"
	AddonClusterType            string = "DICE_CLUSTER_TYPE"
	AddonMainClusterDefaultName string = "kubernetes"
	AddonRootDomain             string = "DICE_ROOT_DOMAIN"
	AddonMountPoint             string = "DICE_STORAGE_MOUNTPOINT"
)
View Source
const (
	AddonDefaultPlan  string = "basic"
	AddonBasic        string = "basic"
	AddonProfessional string = "professional"
	AddonUltimate     string = "ultimate"
)

Addon默认规格

View Source
const (
	DiceShareScope        string = "DICE"
	OrgShareScope         string = "ORG"
	ClusterShareScope     string = "CLUSTER"
	ProjectShareScope     string = "PROJECT"
	ApplicationShareScope string = "APPLICATION"
)

addon 共享级别

View Source
const (
	KafkaManagerMem          int     = 512
	KafkaManagerCPU          float64 = 0.1
	KafakaDefaultPort        string  = "9092"
	KafakaManagerDefaultPort string  = "9000"
)

addon默认信息

View Source
const (
	RedisDefaultPort         string = "6379"
	RedisSentinelDefaultPort string = "26379"
	RedisMasterNamePrefix    string = "redis-master"
	RedisSlaveNamePrefix     string = "redis-slave"
	RedisSentinelNamePrefix  string = "redis-sentinel"
	RedisSentinelQuorum      string = "2"
	RedisSentinelDownAfter   string = "12000"
	RedisSentinelFailover    string = "12000"
	RedisSentinelSyncs       string = "1"
	RedisDefaultMasterName   string = "mymaster"
)

redis默认配置

View Source
const (
	AbilityAddon string = "ability"
	BasicAddon   string = "middleware"
	MicroAddon   string = "microservice"
)

Addon 类别

View Source
const (
	AddCustomAddon     string = "ADD_CUSTOM_ADDON"
	UpdateCustomAddon  string = "UPDATE_CUSTOM_ADDON"
	DeleteCustomAddon  string = "DELETE_CUSTOM_ADDON"
	CUSTOM_TYPE_CLOUD  string = "cloud"
	CUSTOM_TYPE_CUSTOM string = "custom"
)
View Source
const (
	AddonBuildFromUI  int = 1
	AddonBuildFromYml int = 0
)

addon prebuild buildfrom

View Source
const (
	AddonPrebuildNotDeleted     int = 0
	AddonPrebuildDiceYmlDeleted int = 1
	AddonPrebuildUIDeleted      int = 2
)

addon prebuild 删除状态

View Source
const (
	AddonNotDiffEnv uint8 = iota
	AddonDiffEnv
)
View Source
const (
	WORKSPACE_PROD    = "PROD"
	WORKSPACE_STAGING = "STAGING"
	WORKSPACE_TEST    = "TEST"
	WORKSPACE_DEV     = "DEV"
)
View Source
const (
	// AddonZookeeper zookeeper
	AddonZookeeper = "terminus-zookeeper"
	// AddonApacheZookeeper real-zookeeper
	AddonApacheZookeeper = "apache-zookeeper"
	// AddonRoost 注册中心
	AddonRoost = "terminus-roost"
	// AddonZKProxy 注册中心
	AddonZKProxy = "terminus-zkproxy"
	// AddonMySQL mysql
	AddonMySQL = "mysql"
	// AddonRedis redis
	AddonRedis = "redis"
	//AddonES elasticsearch
	AddonES = "terminus-elasticsearch"
	// AddonRocketMQ rocketmq
	AddonRocketMQ = "rocketmq"
	// AddonRabbitMQ rabbitmq
	AddonRabbitMQ = "rabbitmq"
	// AddonConsul consul
	AddonConsul = "consul"
	// AddonKafka kafka
	AddonKafka = "kafka"
	// AddonCanal canal
	AddonCanal = "canal"
	// AddonMonitor monitor
	AddonMonitor = "monitor"
	// AddonApiGateway api-gateway
	AddonApiGateway = "api-gateway"
	// AddonKong kong
	AddonKong = "kong"
	// AddonDiscovery discovery-addon
	AddonDiscovery = "discovery"
	// AddonConfigCenter terminus-configcenter
	AddonConfigCenter = "terminus-configcenter"
	// AddonNewConfigCenter configcenter
	AddonNewConfigCenter = "configcenter"
	//AddonTerminusRoost 注册中心
	AddonTerminusRoost = "terminus-roost"
	// AddonMicroService micro-service
	AddonMicroService = "micro-service"
	// AddonServiceMesh service-mesh
	AddonServiceMesh = "service-mesh"
	// AddonLogExporter log-exporter
	AddonLogExporter = "log-exporter"
	// alicloud-rds
	AddonCloudRds = "alicloud-rds"
	// alicloud-ons
	AddonCloudOns = "alicloud-ons"
	// alicloud-redis
	AddonCloudRedis = "alicloud-redis"
	// alicloud-oss
	AddonCloudOss = "alicloud-oss"
	// alicloud-gateway
	AddonCloudGateway = "alicloud-gateway"
)
View Source
const (
	CreateAPIAssetSourceAction       = "action"
	CreateAPIAssetSourceDesignCenter = "design_center"
)
View Source
const (
	PumpTypeHeartBeat              = "heart_beat"
	PumpTypeRequestAPIDocContent   = "request_api_doc_content"
	PumpTypeResponseAPIDocContent  = "response_api_doc_content"
	PumpTypeRequestAutoSaveAPIDoc  = "request_auth_save_api_doc"
	PumpTypeResponseAutoSaveAPIDoc = "response_auto_save_api_doc"
	PumpTypeRequestCommitAPIDoc    = "request_commit_api_doc"
	PumpTypeResponseCommitAPIDoc   = "response_commit_api_doc"
)
View Source
const (
	AutoTestFileTreeNodeMetaKeyPipelineYml   = "pipelineYml"
	AutoTestFileTreeNodeMetaKeyHistoryID     = "historyID"
	AutoTestFileTreeNodeMetaKeySnippetAction = "snippetAction"
	AutoTestFileTreeNodeMetaKeyRunParams     = "runParams"
	AutoTestFileTreeNodeMetaKeyExtra         = "extra"
)
View Source
const (
	StepTypeWait         StepAPIType = "WAIT"
	StepTypeAPI          StepAPIType = "API"
	StepTypeScene        StepAPIType = "SCENE"
	StepTypeCustomScript StepAPIType = "CUSTOM"
	StepTypeConfigSheet  StepAPIType = "CONFIGSHEET"
	AutotestType                     = "AUTOTESTTYPE"
	AutotestSceneStep                = "STEP"
	AutotestSceneSet                 = "SCENESET"
	AutotestScene                    = "SCENE"
)
View Source
const (
	DCOS    string = "dcos"
	EDAS    string = "edas"
	K8S     string = "k8s"
	DCOS_OP string = "dc/os"
)

集群类型

View Source
const (
	StatelessLabel string = "stateless-service"
	StatefulLabel  string = "stateful-service"
)

平台机器标

View Source
const (
	EdgeOperationChangePage  = "changePage"
	EdgeOperationChangeRadio = "changeViewType"
	EdgeOperationClick       = "click"
	EdgeOperationSubmit      = "submit"
	EdgeOperationCgCluster   = "clusterChange"
	EdgeOperationDelete      = "delete"
	EdgeOperationAdd         = "add"
	EdgeOperationUpdate      = "update"
	EdgeOperationViewDetail  = "viewDetail"
	EdgeOperationOffline     = "offline"
	EdgeOperationRestart     = "restart"
	EdgeOperationFilter      = "filter"
	EdgeOperationAddSite     = "addSite"
	EdgeOperationAddCluster  = "addCluster"
	EdgeOperationAddApp      = "addApp"
	EdgeDefaultPageNo        = 1
	EdgeDefaultPageSize      = 20
	EdgeListValueTypeID      = "id"
	EdgeListValueTypeName    = "name"
)
View Source
const (
	EdgeDefaultMatchPattern   = "^[a-z0-9-]*$"
	EdgeDefaultRegexpError    = "可输入小写字母、数字或中划线"
	EdgeDefaultNameMaxLength  = 50
	EdgeDefaultValueMaxLength = 100
	EdgeDefaultLagerLength    = 2048
)
View Source
const (
	GitPushEvent         = "git_push"
	GitCreateMREvent     = "git_create_mr"
	GitCloseMREvent      = "git_close_mr"
	GitMergeMREvent      = "git_merge_mr"
	GitUpdateMREvent     = "git_update_mr"
	GitCommentMREvent    = "git_comment_mr"
	CheckRunEvent        = "check-run"
	GitDeleteBranchEvent = "git_delete_branch"
	GitDeleteTagEvent    = "git_delete_tag"
)
View Source
const (
	CheckRunStatusCompleted  CheckRunStatus = "completed"
	CheckRunStatusInProgress CheckRunStatus = "progress"

	CheckRunResultSuccess   CheckRunResult = "success"
	CheckRunResultFailure   CheckRunResult = "failure"
	CheckRunResultCancelled CheckRunResult = "cancelled"
	CheckRunResultTimeout   CheckRunResult = "timeout"
)
View Source
const (
	AT_KEY_AUTH   = "key-auth"
	AT_OAUTH2     = "oauth2"
	AT_SIGN_AUTH  = "sign-auth"
	AT_HMAC_AUTH  = "hmac-auth"
	AT_ALIYUN_APP = "aliyun-app"
)

AuthType

View Source
const (
	ACL      = "acl"
	ACL_NONE = ""
	ACL_ON   = "on"
	ACL_OFF  = "off"
)

AclType

View Source
const (
	OPENAPI_SCENE = "openapi"
	WEBAPI_SCENE  = "webapi"
	UNITY_SCENE   = "unity"
)

Scene

View Source
const (
	InstanceStatusStarting  string = "Starting" // 已启动,但未收到健康检查事件,瞬态
	InstanceStatusRunning   string = "Running"
	InstanceStatusHealthy   string = "Healthy"
	InstanceStatusUnHealthy string = "UnHealthy" // 已启动但收到未通过健康检查事件

	InstanceStatusDead     string = "Dead"     // TODO Finished 等下面状态后续可以去除,暂未兼容保留
	InstanceStatusFinished string = "Finished" // 已完成,退出码为0
	InstanceStatusFailed   string = "Failed"   // 已退出,退出码非0
	InstanceStatusKilled   string = "Killed"   // 已被杀
	InstanceStatusStopped  string = "Stopped"  // 已停止,Scheduler与DCOS断连期间事件丢失,后续补偿时,需将Healthy置为Stopped
	InstanceStatusUnknown  string = "Unknown"
	InstanceStatusOOM      string = "OOM"
)

实例状态合集

View Source
const (
	Minute int64 = 1
	Hour   int64 = 60 * Minute
	Day    int64 = 8 * Hour
	Week   int64 = 5 * Day
)
View Source
const (
	LabelOrgID   = "orgID"
	LabelOrgName = "orgName"

	LabelProjectID   = "projectID"
	LabelProjectName = "projectName"

	LabelTestPlanID = "testPlanID"

	LabelAppID   = "appID"
	LabelAppName = "appName"

	LabelDiceWorkspace = "diceWorkspace"

	LabelBranch       = "branch"
	LabelCommit       = "commit"
	LabelCommitDetail = "commitDetail"

	LabelPipelineYmlSource       = "pipelineYmlSource"
	LabelPipelineType            = "pipelineType"
	LabelPipelineTriggerMode     = "pipelineTriggerMode"
	LabelPipelineCronTriggerTime = "pipelineCronTriggerTime"
	LabelPipelineCronID          = "pipelineCronID"
	LabelPipelineCronCompensated = "cronCompensated"

	LabelBindPipelineQueueID             = "__bind_queue_id"
	LabelBindPipelineQueueCustomPriority = "__bind_queue_custom_priority"

	LabelUserID = "userID"

	// ---------------------- snippet some global labels
	// action
	LabelActionVersion = "actionVersion"
	LabelActionJson    = "actionJson"

	// dice
	LabelDiceSnippetScopeID   = "scopeID"
	LabelChooseSnippetVersion = "chooseVersion"
	// snippet
	LabelSnippetScope     = "snippet_scope"
	LabelActionEnv        = "action_env"
	DiceApplicationId     = "DICE_APPLICATION_ID"
	DiceApplicationName   = "DICE_APPLICATION_NAME"
	DiceWorkspaceEnv      = "DICE_WORKSPACE"
	GittarBranchEnv       = "GITTAR_BRANCH"
	LabelGittarYmlPath    = "gittarYmlPath"    // app snippetConfig label in order to specify the address of yml to address
	LabelAutotestExecType = "autotestExecType" // 新版自动化测试的snippet的执行类型
	LabelSceneSetID       = "sceneSetID"       // 新版自动化测试的场景集的 id
	LabelSceneID          = "sceneID"          // 新版自动化测试的场景的 id
	LabelSpaceID          = "spaceID"          // 空间 id
	// FDP
	LabelFdpWorkflowID          = "CDP_WF_ID"
	LabelFdpWorkflowName        = "CDP_WF_NAME"
	LabelFdpWorkflowProcessType = "CDP_WF_PROCESS_TYPE"
	LabelFdpWorkflowRuntype     = "CDP_WF_RUNTYPE"
)
View Source
const (
	// MigrationStatusInit migration初始化
	MigrationStatusInit string = "INIT"
	// MigrationStatusPending migration等待
	MigrationStatusPending string = "PENDING"
	// MigrationStatusRunning migration running
	MigrationStatusRunning string = "RUNNING"
	// MigrationStatusFail migration 失败
	MigrationStatusFail string = "FAIL"
	// MigrationStatusFinish migration 完成
	MigrationStatusFinish string = "FINISH"
	// MigrationStatusDeleted migration 删除
	MigrationStatusDeleted string = "DELETE"
)
View Source
const (
	CloudResourceSourceAddon    string = "addon"
	CloudResourceSourceResource string = "resource"
)
View Source
const (
	AutoScaleUserID     = "1110"
	AutoScaleLockPrefix = "/autoscale/lock"
)
View Source
const (
	PrePaidChargeType  = "PrePaid"
	PostPaidChargeType = "PostPaid"
)
View Source
const (
	EdgeStandardNum = 7
	EdgeSmallNum    = 3
	EdgeTestNum     = 1
	EcsSpec         = "ecs.sn2ne.2xlarge"
	EcsSystemDisk   = "System Disk: cloud_ssd, 40G"
	EcsDataDisk     = "Data Disk: cloud_ssd, 200G"

	SlbSpec = "slb.s2.medium"

	NatSpec          = "Small"
	InboundBandwidth = "Inbound Bandwidth: 10M"
	OutBandwidth     = "Outbound Bandwidth: 100M"

	NasSpec = "1TB"
)
View Source
const (
	OrgResource                string = "org"
	ResourceInfoResource       string = "resourceInfo"
	ProjectResource            string = "project"
	ProjectPublicResource      string = "project-public"
	AppResource                string = "app"
	AppPublicResource          string = "app-public"
	MemberResource             string = "member"
	CloudAccountResource       string = "cloudaccount"
	CloudResourceResource      string = "cloudresource"
	UserManageResource         string = "usermanage" // 用户管理
	ClusterResource            string = "cluster"
	EdgeSiteResource           string = "edgesite"
	HostResource               string = "host"
	NotifyResource             string = "notify"
	TicketResource             string = "ticket"
	IterationResource          string = "iteration"
	IssueRequirementResource   string = "issue-requirement"
	IssueTaskResource          string = "issue-task"
	IssueBugResource           string = "issue-bug"
	IssueTicketResource        string = "issue-ticket"
	IssueEpicResource          string = "issue-epic"
	IssueTypeResource          string = "issue-type"
	IssueStateResource         string = "issue-state"
	IssueImportResource        string = "issue-import"
	IssuePanelResource         string = "issue-panel"
	PublisherResource          string = "publisher"
	PmpResource                string = "pmp"
	NoticeResource             string = "notice"
	CertificateResource        string = "certificate"
	ApproveResource            string = "approve"
	QuoteCertificateResource   string = "quote-certificate"
	LibReferenceResource       string = "libReference"
	ConfigResource             string = "config"
	TestPlanResource           string = "testplan"
	TestPlanV2Resource         string = "testplanV2"
	TestPlanUsecaseRelResource string = "testplanCaseRel"
	TestSpaceResource          string = "autotestSpace"
	PipelineResource           string = "pipeline"
	NormalBranchResource       string = "normalBranch"
	ProtectedBranchResource    string = "protectedBranch"
	AuditResource              string = "audit"
	ProjectFunctionResource    string = "projectFunction"
	NotifyConfigResource       string = "notify-config"
	AutotestSceneResource      string = "autotest-scene"
	SceneSetResource           string = "sceneset"
	CustomAddonResource        string = "customAddon"
)

权限资源集

View Source
const (
	CreateAction  string = "CREATE"
	UpdateAction  string = "UPDATE"
	DeleteAction  string = "DELETE"
	GetAction     string = "GET"
	ReadAction    string = "READ"
	ListAction    string = "LIST"
	OperateAction string = "OPERATE"
	OtherAction   string = "OTHER"
)

权限操作集

View Source
const (
	DefaultPipelineYmlName = "pipeline.yml"

	//用作PipelinePageListRequest order by 的表字段名称
	PipelinePageListRequestIdColumn = "id"
)
View Source
const (
	EnvOpenapiTokenForActionBootstrap = "DICE_OPENAPI_TOKEN_FOR_ACTION_BOOTSTRAP"
	EnvOpenapiToken                   = "DICE_OPENAPI_TOKEN"
)
View Source
const (
	ActionCallbackTypeLink             = "link"
	ActionCallbackRuntimeID            = "runtimeID"
	ActionCallbackOperatorID           = "operatorID"
	ActionCallbackReleaseID            = "releaseID"
	ActionCallbackPublisherID          = "publisherID"
	ActionCallbackPublishItemID        = "publishItemID"
	ActionCallbackPublishItemVersionID = "publishItemVersionID"
	ActionCallbackQaID                 = "qaID"
)
View Source
const (
	TemplateVersionV1 = TemplateVersion(1)
	TemplateVersionV2 = TemplateVersion(2)
)
View Source
const (
	SnippetActionSourceType = "action"

	ActionTypeAPITest      = "api-test"
	ActionTypeSnippet      = "snippet"
	ActionTypeCustomScript = "custom-script"

	SnippetSourceLocal = "local"
)
View Source
const (
	PipelineParamStringType = "string"
	PipelineParamIntType    = "int"
	PipelineParamBoolType   = "boolean"
)
View Source
const (
	//EraseSuccess 擦除成功
	EraseSuccess string = "success"
	//EraseFailure 擦除失败
	EraseFailure string = "failure"
	// Erasing 擦除中
	Erasing string = "erasing"

	PublishItemTypeMobile  = "MOBILE"
	PublishItemTypeLIBRARY = "LIBRARY"
)
View Source
const (
	RunnerTaskStatusPending  = "pending"
	RunnerTaskStatusRunning  = "running"
	RunnerTaskStatusSuccess  = "success"
	RunnerTaskStatusFailed   = "failed"
	RunnerTaskStatusCanceled = "canceled"
)
View Source
const (
	RuntimeStatusHealthy     = "Healthy"
	RuntimeStatusUnHealthy   = "UnHealthy"
	RuntimeStatusProgressing = "Progressing"
	RuntimeStatusInit        = "Init"
	RuntimeStatusUnknown     = "Unknown" // It should be not exist

	ServiceStatusHealthy   = "Healthy"   // 运行中,预期实例数与实际实例数相等,且都通过健康检查
	ServiceStatusUnHealthy = "UnHealthy" // 预期实例数与实际实例数不相等,或者至少一个副本的健康检查未收到或未通过
	ServiceStatusUnknown   = "Unknown"

	RuntimeEventTypeTotal = "total"
)
View Source
const (
	// MaxOrgNum 最大企业数量限制
	MaxOrgNum uint64 = 5
	// MaxProjectNum 最大项目数量限制
	MaxProjectNum uint64 = 5
	// MaxAppNum 最大应用数量限制
	MaxAppNum uint64 = 5
)

最大scope数量限制

View Source
const (
	HostSearchType      = "host"
	ContainerSearchType = "container"
	ServiceSearchType   = "service"
	ComponentSearchType = "component"
	AddonSearchType     = "addon"
)

TODO 搜索重构后,此文件可删除 搜索类型

View Source
const (
	// LabelMatchTags 表示需要匹配的标签
	LabelMatchTags = "MATCH_TAGS"
	// LabelExcludeTags 标签不去匹配的标签
	LabelExcludeTags = "EXCLUDE_TAGS"
	// LabelPack 标识打包类型
	LabelPack = "PACK"
	// LabelJobKind 标示 job 类型,目前大数据使用
	LabelJobKind = "JOB_KIND"
)
View Source
const (
	// TagAny 标识any标签
	TagAny = "any"
	// TagLocked 标识locked标签,不允许新的任务调度上来
	TagLocked = "locked"
	// TagPlatform 标识platform标签,只允许平台组件调度
	TagPlatform = "platform"
	// TagPack 标识pack标签,打包任务
	TagPack = "pack"
	// TagJob 标示job标签
	TagJob = "job"
	// TagServiceStateless 标识service-stateless标签,允许无状态服务调度
	TagServiceStateless = "service-stateless"
	// TagServiceStateful 标识service-stateful标签,允许有状态服务调度
	TagServiceStateful = "service-stateful"
	// TagProjectPrefix 标识project-,项目标签的前缀
	TagProjectPrefix = "project-" // is a prefix, dynamic tag, e.g. project-41
	// TagWorkspacePrefix 标识workspace-,工作区标签的前缀
	TagWorkspacePrefix = "workspace-"
	// TagBigdata 标识bigdata标签
	TagBigdata = "bigdata"
	// TagLocationPrefix location 前缀
	TagLocationPrefix = "location-"
	// TagLocationOnly location 独占
	TagLocationOnly = "locationonly"
)
View Source
const (
	// UNFULFILLEDROLE 指节点角色不满足, 如都是 slave_public 的机器
	UNFULFILLEDROLE = "UnfulfilledRole"
	// UNFULFILLEDCONSTRAINT 指约束条件不满足
	UNFULFILLEDCONSTRAINT = "UnfulfilledConstraint"
	// INSUFFICIENTCPUS 指 CPU 资源不足
	INSUFFICIENTCPUS = "InsufficientCpus"
	// INSUFFICIENTMEMORY 指 MEMORY 资源不足
	INSUFFICIENTMEMORY = "InsufficientMemory"
	// INSUFFICIENTDISK 指磁盘资源不足
	INSUFFICIENTDISK = "InsufficientDisk"
	// INSUFFICIENTPORTS 指端口资源不足
	INSUFFICIENTPORTS = "InsufficientPorts"
)
View Source
const (
	// 测试集、用例是否回收
	RecycledYes bool = true
	RecycledNo  bool = false
)
View Source
const (
	FileTreeScopeAutoTest            = "project-autotest-testcase"
	FileTreeScopeAutoTestPlan        = "project-autotest-testplan"
	FileTreeScopeAutoTestConfigSheet = "project-autotest-configsheet"
	FileTreeScopeProjectApp          = "project-app"
	FileTreeScopeProject             = "project"
)

各个系统的 fileTree scope 名称

View Source
const (
	GB = 1 << 30
	MB = 1 << 20
)
View Source
const (
	// LocalVolumeStr LocalVolume 的 string 表示
	LocalVolumeStr = "localvolume"
	// NasVolumeStr NasVolume 的 string 表示
	NasVolumeStr = "nasvolume"
	// LocalVolumeHex 本地盘的hex编码表示,用于作为 VolumeID 的 prefix
	// LocalVolumeHex = hex.EncodeToString([]byte("local"))
	LocalVolumeHex = "6c6f63616c"
	// NasVolumeHex nas盘的hex编码表示,用于作为 VolumeID 的 prefix
	// NasVolumeHex = hex.EncodeToString([]byte("nas"))
	NasVolumeHex = "6e6173"
)
View Source
const (
	AddNodesEssSource = "ess-autoscale"
)
View Source
const (
	ClusterStatusOffline string = "offline"
)
View Source
const DefaultDomain string = ".default.svc.cluster.local"

DefaultDomain 默认域名

View Source
const (
	DeleteEssNodesCronPrefix = "ops-delete-ess-nodes-cron"
)
View Source
const DicehubExtensionsMenu = "dicehub.extensions.menu"
View Source
const (
	// HealthCheckDuration 最小健康检查时间,单位为秒
	HealthCheckDuration int = 420
)
View Source
const MaxSetDescLen = 512
View Source
const MaxSetNameLen = 191
View Source
const (
	MetadataTypeDiceFile = "DiceFile"
)
View Source
const (
	// MigrationResourceKey release出来的migration信息key,作用于服务的release->resource信息中
	MigrationResourceKey string = "dice-migration"
)
View Source
const (
	MySQLDefaultUser string = "root"
)

mysql相关配置

View Source
const PipelineAppConfigNameSpacePreFix = "pipeline-secrets-app"
View Source
const PipelinePreCheckResultContextKey = "precheck_result"
View Source
const (
	PipelineReportEventMetaKey = "event"
)
View Source
const PlatformLabelPrefix string = "dice"

PlatformLabelPrefix Dice 平台标前缀

View Source
const (
	ProjectScopeType = "project"
)
View Source
const RootPinode = "0"
View Source
const SECRECT_PLACEHOLDER = "******"
View Source
const (
	ScaleModeScheduler = "scheduler"
)
View Source
const SceneAutotestExecType = "scene"
View Source
const SceneSetsAutotestExecType = "sceneSets"
View Source
const (
	ServiceDiscoveryKindProxy = "PROXY"
)
View Source
const SupportID string = "2020"

答疑用户的固定 ID

View Source
const (
	TerraformEcyKey = "terraform@terminus@dice@20200224"
)
View Source
const (
	TicketUserQA string = "qa"
)

工单虚拟用户

View Source
const (
	UnlimitedSLAName = "无限制 SLA"
)

Variables

View Source
var (
	IssueRequirementStates = []IssueState{IssueStateOpen, IssueStateWorking, IssueStateTesting,
		IssueStateDone} // DONE 为唯一终态
	IssueTaskStates = []IssueState{IssueStateOpen, IssueStateWorking,
		IssueStateDone} // DONE 为唯一终态
	IssueBugStates = []IssueState{IssueStateOpen, IssueStateResolved, IssueStateReopen, IssueStateWontfix, IssueStateDup,
		IssueStateClosed} // CLOSED 为唯一终态
	IssueTicketStates = []IssueState{IssueStateOpen, IssueStateResolved, IssueStateReopen, IssueStateWontfix, IssueStateDup,
		IssueStateClosed} // CLOSED 为唯一终态
	IssueEpicStates = []IssueState{IssueStateOpen, IssueStateWorking,
		IssueStateDone} // DONE 为唯一终态
)
View Source
var (
	CollectorLogPushStreamStdout = "stdout"
	CollectorLogPushStreamStderr = "stderr"
)
View Source
var (
	PipelineCmsConfigDefaultOperationsForKV        = PipelineCmsConfigOperations{CanDownload: false, CanEdit: true, CanDelete: true}
	PipelineCmsConfigDefaultOperationsForDiceFiles = PipelineCmsConfigOperations{CanDownload: true, CanEdit: true, CanDelete: true}
)
View Source
var (
	PipelineQueueDefaultPriority         int64 = 10
	PipelineQueueDefaultScheduleStrategy       = ScheduleStrategyInsidePipelineQueueOfFIFO
	PipelineQueueDefaultMode                   = PipelineQueueModeLoose
	PipelineQueueDefaultConcurrency      int64 = 1
)
View Source
var (
	TestCaseFromManual TestCaseFrom = "人工"

	TestCasePriorityP0 TestCasePriority = "P0"
	TestCasePriorityP1 TestCasePriority = "P1"
	TestCasePriorityP2 TestCasePriority = "P2"
	TestCasePriorityP3 TestCasePriority = "P3"
)
View Source
var CategoryTypes = map[string][]string{
	"action": {
		"source_code_management",
		"build_management",
		"deploy_management",
		"version_management",
		"test_management",
		"data_management",
		"custom_task",
	},
	"addon": {
		"database",
		"distributed_cooperation",
		"search",
		"message",
		"content_management",
		"security",
		"traffic_load",
		"monitoring&logging",
		"content",
		"image_processing",
		"document_processing",
		"sound_processing",
		"custom",
		"general_ability",
		"new_retail",
		"srm",
		"solution",
	},
}
View Source
var (
	EdgeDefaultRegexp = fmt.Sprintf("/%v/", EdgeDefaultMatchPattern)
)
View Source
var ErrJobIsRunning = errors.New("job is running")
View Source
var EventTypeTempMap = map[string]UCTemplateInfo{
	"LOGIN":             {TemplateName: LoginTemplate, Result: SuccessfulResult},
	"LOG_OUT":           {TemplateName: LogoutTemplate, Result: SuccessfulResult},
	"UPDATE_PASSWORD":   {TemplateName: UpdatePasswordTemplate, Result: SuccessfulResult},
	"SIGN_UP":           {TemplateName: RegisterUserTemplate, Result: SuccessfulResult},
	"CREATE_USER":       {TemplateName: CreateUserTemplate, Result: SuccessfulResult},
	"DISABLE":           {TemplateName: DisableUserTemplate, Result: SuccessfulResult},
	"ENABLE":            {TemplateName: EnableUserTemplate, Result: SuccessfulResult},
	"FREEZE":            {TemplateName: FreezeUserTemplate, Result: SuccessfulResult},
	"UN_FREEZE":         {TemplateName: UnfreezeUserTemplate, Result: SuccessfulResult},
	"DESTROY":           {TemplateName: DestroyUserTemplate, Result: SuccessfulResult},
	"UPDATE_LOGIN_TYPE": {TemplateName: UpdateUserLoginTypeTemplateName, Result: SuccessfulResult},
	"RESET_MOBILE":      {TemplateName: UpdateUserTelTemplate, Result: SuccessfulResult},
	"RESET_EMAIL":       {TemplateName: UpdateUserMailTemplate, Result: SuccessfulResult},
	"BIND_EMAIL":        {TemplateName: UpdateUserMailTemplate, Result: SuccessfulResult},
	"UN_BIND_EMAIL":     {TemplateName: UpdateUserMailTemplate, Result: SuccessfulResult},
	"TEMP_LOCK":         {TemplateName: FreezedSinceLoginFailedTemplateName, Result: SuccessfulResult},
	"WRONG_PASSWORD":    {TemplateName: LoginTemplate, Result: FailureResult, ErrorMsg: "Wrong PassWord"},
}

EventTypeTempMap uc事件模版对应的模版名

View Source
var IssueTemplate = map[string]map[IssueStreamType]string{
	"zh": {
		ISTCreate:               `该事件由 {{.UserName}} 创建`,
		ISTComment:              `{{.Comment}}`,
		ISTRelateMR:             `mrInfo: {{.MRInfo}}`,
		ISTAssign:               `该事件分派给 "{{.UserName}}" 处理`,
		ISTTransferState:        `该事件状态自 "{{.CurrentState}}" 迁移至 "{{.NewState}}"`,
		ISTChangeTitle:          `该事件标题自 "{{.CurrentTitle}}" 更新为 "{{.NewTitle}}"`,
		ISTChangePlanStartedAt:  `该事件计划开始时间自 "{{.CurrentPlanStartedAt}}" 调整为 "{{.NewPlanStartedAt}}"`,
		ISTChangePlanFinishedAt: `该事件计划结束时间自 "{{.CurrentPlanFinishedAt}}" 调整为 "{{.NewPlanFinishedAt}}"`,
		ISTChangeAssignee:       `该事件处理人由 "{{.CurrentAssignee}}" 变更为 "{{.NewAssignee}}"`,
		ISTChangeIteration:      `该事件迭代由 "{{.CurrentIteration}}" 变更为 "{{.NewIteration}}"`,
		ISTChangeManHour:        `该事件工时信息由【预估时间:{{.CurrentEstimateTime}},已用时间:{{.CurrentElapsedTime}},剩余时间:{{.CurrentRemainingTime}},开始时间:{{.CurrentStartTime}},工作内容:{{.CurrentWorkContent}}】变更为【预估时间:{{.NewEstimateTime}},已用时间:{{.NewElapsedTime}},剩余时间:{{.NewRemainingTime}},开始时间:{{.NewStartTime}},工作内容:{{.NewWorkContent}}】`,
		ISTChangeOwner:          `该事件责任人由 "{{.CurrentOwner}}" 变更为 "{{.NewOwner}}"`,
		ISTChangeTaskType:       `该事件任务类型由 "{{.CurrentStage}}" 变更为 "{{.NewStage}}"`,
		ISTChangeBugStage:       `该事件引入源由 "{{.CurrentStage}}" 变更为 "{{.NewStage}}"`,
		ISTChangePriority:       `该事件优先级由 "{{.CurrentPriority}}" 变更为 "{{.NewPriority}}"`,
		ISTChangeComplexity:     `该事件复杂度由 "{{.CurrentComplexity}}" 变更为 "{{.NewComplexity}}"`,
		ISTChangeSeverity:       `该事件严重程度由 "{{.CurrentSeverity}}" 变更为 "{{.NewSeverity}}"`,
		ISTChangeContent:        `该事件内容发生变更`,
		ISTChangeLabel:          `该事件标签发生变更`,
	},
	`en`: {
		ISTCreate:               `{{.UserName}} created`,
		ISTComment:              `{{.Comment}}`,
		ISTRelateMR:             `mrInfo: {{.MRInfo}}`,
		ISTAssign:               `assigned to "{{.UserName}}"`,
		ISTTransferState:        `transfer state from "{{.CurrentState}}" to "{{.NewState}}"`,
		ISTChangeTitle:          `change title "{{.CurrentTitle}}" to "{{.NewTitle}}"`,
		ISTChangePlanStartedAt:  `adjust Planned Start Time from "{{.CurrentPlanStartedAt}}" to "{{.NewPlanStartedAt}}"`,
		ISTChangePlanFinishedAt: `adjust Planned Finished Time from "{{.CurrentPlanFinishedAt}}" to "{{.NewPlanFinishedAt}}"`,
		ISTChangeAssignee:       `adjust Assignee from "{{.CurrentAssignee}}" to "{{.NewAssignee}}"`,
		ISTChangeIteration:      `adjust Iteration from "{{.CurrentIteration}}" to "{{.NewIteration}}"`,
		ISTChangeManHour:        `adjust man-hour from【EstimateTime: {{.CurrentEstimateTime}}, ElapsedTime: {{.CurrentElapsedTime}}, RemainingTime: {{.CurrentRemainingTime}}, StartTime: {{.CurrentStartTime}}, WorkContent: {{.CurrentWorkContent}}】to【EstimateTime: {{.NewEstimateTime}}, ElapsedTime: {{.NewElapsedTime}}, RemainingTime: {{.NewRemainingTime}}, StartTime: {{.NewStartTime}}, WorkContent: {{.NewWorkContent}}】`,
	},
}

IssueTemplate issue 事件模板, key 为 language

View Source
var PipelineTaskDefaultLoopStrategy = LoopStrategy{
	MaxTimes:        10,
	DeclineRatio:    2,
	DeclineLimitSec: 60,
	IntervalSec:     2,
}
View Source
var SonarMetricKeys = map[int64]*SonarMetricKey{}

Functions

func CodeUserID

func CodeUserID(userID string) string

CodeUserID 给userID打码

func DecodeUserID

func DecodeUserID(code string) (string, error)

DecodeUserID 给userID解码

func GetIssueStreamTemplate

func GetIssueStreamTemplate(locale string, ist IssueStreamType) (string, error)

GetIssueStreamTemplate 获取事件流模板

func GetOperationalValue

func GetOperationalValue(operational string) string

func ValidateAPIAssetID

func ValidateAPIAssetID(id string) error

APIAssetID 格式校验

Types

type APIAccessesModel

type APIAccessesModel struct {
	BaseModel

	OrgID           uint64         `json:"orgID"`
	AssetID         string         `json:"assetID"`
	AssetName       string         `json:"assetName"`
	SwaggerVersion  string         `json:"swaggerVersion"`
	Major           uint64         `json:"major"`
	Minor           uint64         `json:"minor"`
	ProjectID       uint64         `json:"projectID,omitempty"`
	Workspace       string         `json:"envType"`
	EndpointID      string         `json:"endpointID"`
	Authentication  Authentication `json:"authentication"`
	Authorization   Authorization  `json:"authorization"`
	AddonInstanceID string         `json:"addonInstanceID"`
	BindDomain      string         `json:"bindDomain"`
	ProjectName     string         `json:"projectName"`
	DefaultSLAID    *uint64        `json:"defaultSLAID"`
}

func (APIAccessesModel) TableName

func (m APIAccessesModel) TableName() string

type APIAssert

type APIAssert struct {
	Arg      string `json:"arg"`
	Operator string `json:"operator"`
	Value    string `json:"value"`
}

APIAssert API测试的断言信息

type APIAssetCreateRequest

type APIAssetCreateRequest struct {
	AssetID   string `json:"assetID"`
	AssetName string `json:"assetName"`
	Desc      string `json:"desc"`
	Source    string `json:"source"`

	Versions []APIAssetVersionCreateRequest `json:"versions"`

	OrgID     uint64 `json:"orgID"`
	ProjectID uint64 `json:"projectID,omitempty"`
	AppID     uint64 `json:"appID,omitempty"`

	IdentityInfo
}

type APIAssetDeleteRequest

type APIAssetDeleteRequest struct {
	OrgID   uint64
	AssetID string

	IdentityInfo
}

type APIAssetGetResponse

type APIAssetGetResponse struct {
	Header
	Data *APIAssetsModel `json:"data"`
}

type APIAssetID

type APIAssetID string

type APIAssetPagingResponse

type APIAssetPagingResponse struct {
	Total   uint64               `json:"total"`
	List    []*PagingAssetRspObj `json:"list"`
	UserIDs []string             `json:"userIDs"`
}

type APIAssetVersionCreateRequest

type APIAssetVersionCreateRequest struct {
	OrgID      uint64 `json:"orgID"`
	APIAssetID string `json:"apiAssetID"`
	Major      uint64 `json:"major"` // 可以不指定,默认版本为 1.0.0,之后依次增加小版本
	Minor      uint64 `json:"minor"`
	Patch      uint64 `json:"patch"`
	Desc       string `json:"desc"`

	SpecProtocol     APISpecProtocol `json:"specProtocol"`
	SpecDiceFileUUID string          `json:"specDiceFileUUID,omitempty"` // specDiceFileUUID -> spec
	Spec             string          `json:"spec"`
	Inode            string          `json:"inode,omitempty"`

	Instances []APIAssetVersionInstanceCreateRequest `json:"instances,omitempty"`

	IdentityInfo

	Source      string `json:"source"`      // local, action, design_center
	AppID       uint64 `json:"appID"`       // 如果 source == design_center, appID 为设计中心文档所在应用
	Branch      string `json:"branch"`      // 如果 source == design_center, branch 为设计中心文档所在分支
	ServiceName string `json:"serviceName"` // 如果 source = design_center, serviceName 为文档表述的服务的名称
}

type APIAssetVersionInstanceCreateRequest

type APIAssetVersionInstanceCreateRequest struct {
	Name string `json:"name"`

	// 实例类型,必填
	InstanceType APIInstanceType `json:"instanceType"`

	// 关联一个 Runtime Service
	RuntimeID   uint64 `json:"runtimeID,omitempty"`
	ServiceName string `json:"serviceName,omitempty"`

	// 关联 API Gateway EndpointID
	EndpointID string `json:"endpointID,omitempty"`

	// URL 为用户直接输入
	URL string `json:"url,omitempty"`

	AssetID   string `json:"-"`
	VersionID uint64 `json:"-"`

	IdentityInfo
}

type APIAssetVersionSpecsModel

type APIAssetVersionSpecsModel struct {
	BaseModel

	OrgID        uint64 `json:"orgID"`
	AssetID      string `json:"assetID"`
	VersionID    uint64 `json:"versionID"`
	SpecProtocol string `json:"specProtocol"`
	Spec         string `json:"spec"` // spec 文本
}

API 的 Spec 文本

func (APIAssetVersionSpecsModel) TableName

func (m APIAssetVersionSpecsModel) TableName() string

type APIAssetVersionsModel

type APIAssetVersionsModel struct {
	BaseModel

	OrgID          uint64          `json:"orgID"`
	AssetID        string          `json:"assetID"`
	AssetName      string          `json:"assetName"`
	Major          uint64          `json:"major"`
	Minor          uint64          `json:"minor"`
	Patch          uint64          `json:"patch"`
	Desc           string          `json:"desc"`
	SpecProtocol   APISpecProtocol `json:"specProtocol"`
	SwaggerVersion string          `json:"swaggerVersion"`
	Deprecated     bool            `json:"deprecated"`

	Source      string `json:"source"`      // local, action, design_center
	AppID       uint64 `json:"appID"`       // 如果 source == design_center, appID 为设计中心文档所在应用
	Branch      string `json:"branch"`      // 如果 source == design_center, branch 为设计中心文档所在分支
	ServiceName string `json:"serviceName"` // 如果 source = design_center, serviceName 为文档表述的服务的名称
}

API 资料版本

func (APIAssetVersionsModel) TableName

func (m APIAssetVersionsModel) TableName() string

type APIAssetsModel

type APIAssetsModel struct {
	BaseModel

	OrgID        uint64  `json:"orgID"`
	AssetID      string  `json:"assetID"`
	AssetName    string  `json:"assetName"`
	Desc         string  `json:"desc"`
	ProjectID    *uint64 `json:"projectID,omitempty"`
	ProjectName  *string `json:"projectName"`
	AppID        *uint64 `json:"appID,omitempty"`
	AppName      *string `json:"appName"`
	Public       bool    `json:"public"`
	CurVersionID uint64  `json:"curVersionID"`
	CurMajor     int     `json:"curMajor"`
	CurMinor     int     `json:"curMinor"`
	CurPatch     int     `json:"curPatch"`
}

APIAsset API 资料

func (APIAssetsModel) TableName

func (m APIAssetsModel) TableName() string

type APIBody

type APIBody struct {
	Type    APIBodyType `json:"type"`
	Content interface{} `json:"content"`
}

APIBody API测试的Body

type APIBodyType

type APIBodyType string
var (
	APIBodyTypeNone                          APIBodyType = "none"
	APIBodyTypeText                          APIBodyType = "" // non corresponding Content-Type
	APIBodyTypeTextPlain                     APIBodyType = "text/plain"
	APIBodyTypeApplicationJSON               APIBodyType = "application/json"
	APIBodyTypeApplicationJSON2              APIBodyType = "JSON(application/json)"
	APIBodyTypeApplicationXWWWFormUrlencoded APIBodyType = "application/x-www-form-urlencoded"
)

func (APIBodyType) String

func (t APIBodyType) String() string

type APIDocCreateNodeReq

type APIDocCreateNodeReq struct {
	OrgID     uint64
	Identity  *IdentityInfo
	URIParams *FileTreeDetailURI
	Body      *APIDocCreateUpdateNodeBody
}

type APIDocCreateUpdateNodeBody

type APIDocCreateUpdateNodeBody struct {
	Type   NodeType        `json:"type"`
	Pinode string          `json:"pinode"`
	Name   string          `json:"name"`
	Meta   json.RawMessage `json:"meta,omitempty"`
}

type APIDocDeleteNodeReq

type APIDocDeleteNodeReq struct {
	OrgID     uint64
	Identity  *IdentityInfo
	URIParams *FileTreeDetailURI
}

type APIDocListChildrenReq

type APIDocListChildrenReq struct {
	OrgID       uint64
	Identity    *IdentityInfo
	URIParams   *FileTreeDetailURI
	QueryParams *FileTreeQueryParameters
}

子节点列表

type APIDocLockModel

type APIDocLockModel struct {
	ID            uint64    `json:"id"`
	CreatedAt     time.Time `json:"createAt"`
	UpdatedAt     time.Time `json:"updatedAt"`
	SessionID     string    `json:"sessionID"`
	IsLocked      bool      `json:"isLocked"`
	ExpiredAt     time.Time `json:"expiredAt"`
	ApplicationID uint64    `json:"applicationID"`
	BranchName    string    `json:"branchName"`
	DocName       string    `json:"docName"`
	CreatorID     string    `json:"creatorID"`
	UpdaterID     string    `json:"updaterID"`
}

func (APIDocLockModel) TableName

func (m APIDocLockModel) TableName() string

type APIDocMeta

type APIDocMeta struct {
	Lock     *APIDocMetaLock      `json:"lock,omitempty"`
	Asset    *APIDocMetaAssetInfo `json:"asset"`
	Tree     *GittarTreeRspData   `json:"tree,omitempty"`
	Blob     *GittarBlobRspData   `json:"blob,omitempty"`
	ReadOnly bool                 `json:"readOnly"`
	Valid    bool                 `json:"valid"`
	Error    string               `json:"error,omitempty"`
}

type APIDocMetaAssetInfo

type APIDocMetaAssetInfo struct {
	AssetName string `json:"assetName"`
	AssetID   string `json:"assetID"`
	Major     uint64 `json:"major"`
	Minor     uint64 `json:"minor"`
	Patch     uint64 `json:"patch"`
}

type APIDocMetaLock

type APIDocMetaLock struct {
	Locked   bool   `json:"locked"`
	UserID   string `json:"userID"`
	NickName string `json:"nickName"`
}

type APIDocMvCpNodeReq

type APIDocMvCpNodeReq struct {
	OrgID     uint64
	Identity  *IdentityInfo
	URIParams *FileTreeActionURI
	Body      *APIDocMvCpNodeReqBody
}

type APIDocMvCpNodeReqBody

type APIDocMvCpNodeReqBody struct {
	Pinode string `json:"pinode"`
}

type APIDocNodeDetailReq

type APIDocNodeDetailReq struct {
	OrgID     uint64
	Identity  *IdentityInfo
	URIParams *FileTreeDetailURI
}

type APIDocTmpContentModel

type APIDocTmpContentModel struct {
	ID            uint64    `json:"id"`
	CreatedAt     time.Time `json:"createAt"`
	UpdatedAt     time.Time `json:"updatedAt"`
	ApplicationID uint64    `json:"applicationID"`
	BranchName    string    `json:"branchName"`
	DocName       string    `json:"docName"`
	Content       string    `json:"content"`
	CreatorID     string    `json:"creatorID"`
	UpdaterID     string    `json:"updaterID"`
}

func (APIDocTmpContentModel) TableName

func (m APIDocTmpContentModel) TableName() string

type APIDocUpdateNodeReq

type APIDocUpdateNodeReq struct {
	OrgID     uint64
	Identity  *IdentityInfo
	URIParams *FileTreeDetailURI
	Body      *RenameAPIDocBody
}

type APIHeader

type APIHeader struct {
	Key   string `json:"key"`
	Value string `json:"value"`
	Desc  string `json:"desc"`
}

APIHeader API测试请求头

type APIInfo

type APIInfo struct {
	ID        string        `json:"id"`
	Name      string        `json:"name"`
	URL       string        `json:"url"`
	Method    string        `json:"method"`
	Headers   []APIHeader   `json:"headers"`
	Params    []APIParam    `json:"params"`
	Body      APIBody       `json:"body"`
	OutParams []APIOutParam `json:"outParams"`
	Asserts   [][]APIAssert `json:"asserts"`
}

APIInfo API测试详细信息

type APIInfoV2

type APIInfoV2 struct {
	ID        string        `json:"id"`
	Name      string        `json:"name"`
	URL       string        `json:"url"`
	Method    string        `json:"method"`
	Headers   []APIHeader   `json:"headers"`
	Params    []APIParam    `json:"params"`
	Body      APIBody       `json:"body"`
	OutParams []APIOutParam `json:"out_params"`
	Asserts   []APIAssert   `json:"asserts"`
}

type APIInstanceType

type APIInstanceType string

APIInstanceType API 实例类型

const (
	APIInstanceTypeGateway APIInstanceType = "gateway"
	APIInstanceTypeService APIInstanceType = "service"
	APIInstanceTypeOther   APIInstanceType = "other"
)

func (APIInstanceType) Valid

func (t APIInstanceType) Valid() bool

type APIOAS3FragmentModel

type APIOAS3FragmentModel struct {
	ID        uint64    `json:"id"`
	CreatedAt time.Time `json:"createdAt" gorm:"created_at"`
	UpdatedAt time.Time `json:"updatedAt" gorm:"updated_at"`
	IndexID   uint64    `json:"indexID" gorm:"index_id"`
	VersionID uint64    `json:"versionID" gorm:"version_id"`
	Operation string    `json:"operation"`
}

func (APIOAS3FragmentModel) TableName

func (m APIOAS3FragmentModel) TableName() string

type APIOAS3IndexModel

type APIOAS3IndexModel struct {
	ID          uint64    `json:"id"`
	CreatedAt   time.Time `json:"createdAt" gorm:"created_at"`
	UpdatedAt   time.Time `json:"updatedAt" gorm:"updated_at"`
	AssetID     string    `json:"assetID" gorm:"asset_id"`
	AssetName   string    `json:"assetName" gorm:"asset_name"`
	InfoVersion string    `json:"infoVersion" gorm:"info_version"`
	VersionID   uint64    `json:"versionID" gorm:"version_id"`
	Path        string    `json:"path"`
	Method      string    `json:"method"`
	OperationID string    `json:"operationID" gorm:"operation_id"`
	Description string    `json:"description"`
}

func (APIOAS3IndexModel) TableName

func (m APIOAS3IndexModel) TableName() string

type APIOperation

type APIOperation struct {
	ID        uint64 `json:"id"`                         // 接口 primary key, 全局唯一
	AssetID   string `json:"assetID" yaml:"assetID"`     // required
	AssetName string `json:"assetName" yaml:"assetName"` // 集市名(文档名)
	Version   string `json:"version" yaml:"version"`     // required
	Path      string `json:"path" yaml:"path"`           // required
	Method    string `json:"method" yaml:"method"`       // required

	// Optional description. Should use CommonMark syntax.
	Description string `json:"description" yaml:"description"`

	// Optional operation ID.
	OperationID string `json:"operationId" yaml:"operationId"`

	// Optional Headers
	Headers []*Parameter `json:"headers"`

	// Optional parameters.
	Parameters []*Parameter `json:"parameters" yaml:"parameters"`

	// Optional body parameter.
	RequestBodyDescription string         `json:"requestBodyDescription"`
	RequestBodyRequired    bool           `json:"requestBodyRequired"`
	RequestBody            []*RequestBody `json:"requestBody" yaml:"requestBody"`

	// Responses.
	// 其中 key 为 http status code
	Responses []*Response `json:"responses" yaml:"responses"` // Required
}

type APIOperationSummary

type APIOperationSummary struct {
	ID          uint64 `json:"id"`          // 接口 primary key, 全局唯一
	AssetID     string `json:"assetID"`     // required 集市 id
	AssetName   string `json:"assetName"`   // required 集市名(文档名)
	Version     string `json:"version"`     // required 版本
	Path        string `json:"path"`        // required 路径
	Method      string `json:"method"`      // required http 方法
	OperationID string `json:"operationID"` // 接口名称
}

APIOperationSummary 接口摘要信息, 作为搜索结果列表的 item 其中 AssetID + Version + Path + Method 能确定唯一的一篇文档

type APIOutParam

type APIOutParam struct {
	Key        string            `json:"key"`
	Source     APIOutParamSource `json:"source"`
	Expression string            `json:"expression,omitempty"`
	MatchIndex string            `json:"matchIndex,omitempty"`
}

APIOutParam API 测试的出参信息

type APIOutParamSource

type APIOutParamSource string

APIOutParamSource 出参来源

var (
	APIOutParamSourceStatus              APIOutParamSource = "status"
	APIOutParamSourceBodyJson            APIOutParamSource = "body:json"
	APIOutParamSourceBodyJsonJQ          APIOutParamSource = "body:json:jq"
	APIOutParamSourceBodyJsonJsonPath    APIOutParamSource = "body:json:jsonpath"
	APIOutParamSourceBodyJsonJacksonPath APIOutParamSource = "body:json:jackson"
	APIOutParamSourceBodyText            APIOutParamSource = "body:text"
	APIOutParamSourceHeader              APIOutParamSource = "header"
)

func (APIOutParamSource) String

func (source APIOutParamSource) String() string

type APIParam

type APIParam struct {
	Key   string `json:"key"`
	Value string `json:"value"`
	Desc  string `json:"desc"`
}

APIParam API测试参数

type APIRequestInfo

type APIRequestInfo struct {
	URL     string      `json:"url"`
	Method  string      `json:"method"`
	Headers http.Header `json:"headers"`
	Params  url.Values  `json:"params"`
	Body    APIBody     `json:"body"`
}

APIRequestInfo API 实际请求信息

type APIResp

type APIResp struct {
	Status  int                 `json:"status"`
	Headers map[string][]string `json:"headers"`
	Body    []byte              `json:"-"`
	BodyStr string              `json:"body"`
}

APIResp API测试的返回结果

type APISpecJSON

type APISpecJSON map[string]interface{}

APISpecJSON API Spec JSON

type APISpecProtocol

type APISpecProtocol string

APISpecProtocol API Spec 格式

const (
	APISpecProtocolOAS2Yaml APISpecProtocol = "oas2-yaml"
	APISpecProtocolOAS2Json APISpecProtocol = "oas2-json"
	APISpecProtocolOAS3Yaml APISpecProtocol = "oas3-yaml"
	APISpecProtocolOAS3Json APISpecProtocol = "oas3-json"
	APISpecProtocolRaml     APISpecProtocol = "raml"
)

func (APISpecProtocol) Valid

func (p APISpecProtocol) Valid() bool

type APITestEnvCreateRequest

type APITestEnvCreateRequest struct {
	APITestEnvData
}

APITestEnvCreateRequest 创建API测试环境变量信息请求体

type APITestEnvCreateResponse

type APITestEnvCreateResponse struct {
	Header
	Data *APITestEnvData `json:"data"`
}

APITestEnvCreateResponse 创建API测试环境变量信息的响应

type APITestEnvData

type APITestEnvData struct {
	ID      int64                          `json:"id"`
	EnvID   int64                          `json:"envID"`
	EnvType APITestEnvType                 `json:"envType"`
	Name    string                         `json:"name"`
	Domain  string                         `json:"domain"`
	Header  map[string]string              `json:"header"`
	Global  map[string]*APITestEnvVariable `json:"global"`
}

APITestEnvData API 测试环境变量数据信息

type APITestEnvDeleteResponse

type APITestEnvDeleteResponse struct {
	Header
	Data *APITestEnvData `json:"data"`
}

APITestEnvDeleteResponse 删除API测试环境信息响应

type APITestEnvGetResponse

type APITestEnvGetResponse struct {
	Header
	Data *APITestEnvData `json:"data"`
}

APITestEnvResponse API测试环境变量信息响应

type APITestEnvListResponse

type APITestEnvListResponse struct {
	Header
	Data []*APITestEnvData `json:"data"`
}

APITestEnvListResponse 获取API测试环境变量信息列表响应

type APITestEnvType

type APITestEnvType string
const (
	ProjectEnv APITestEnvType = "project"
	UsecaseEnv APITestEnvType = "usecase"
)

API 测试环境变量类型

type APITestEnvUpdateRequest

type APITestEnvUpdateRequest struct {
	APITestEnvData
}

APITestEnvUpdateRequest 更新API测试环境变量信息请求体

type APITestEnvUpdateResponse

type APITestEnvUpdateResponse struct {
	Header
	Data int64 `json:"data"`
}

APITestEnvUpdateResponse 更新API测试环境变量信息的响应

type APITestEnvVariable

type APITestEnvVariable struct {
	Value string `json:"value"`
	Type  string `json:"type"`
	Desc  string `json:"desc,omitempty"`
}

APITestEnvVariable API 测试环境变量值信息

type APITestFront

type APITestFront struct {
	APIInfo
}

APITestFront 组件化前端认的api test结构体

type APITestReq

type APITestReq struct {
	ClientID     string       `json:"clientID"`
	ClientSecret string       `json:"clientSecret"`
	APIs         []*ProxyAPIs `json:"apis"`
}

type APITestsAssertData

type APITestsAssertData struct {
	Arg         string      `json:"arg"`
	Operator    string      `json:"operator"`
	Value       string      `json:"value"`
	Success     bool        `json:"success"`
	ActualValue interface{} `json:"actualValue"`
	ErrorInfo   string      `json:"errorInfo"`
}

APITestsAssertResult 断言结果详情数据

type APITestsAssertResult

type APITestsAssertResult struct {
	Success bool                  `json:"success"`
	Result  []*APITestsAssertData `json:"result"`
}

APITestsAssertResult 断言结果详情

type APITestsAttemptRequest

type APITestsAttemptRequest struct {
	ProjectTestEnvID int64      `json:"projectTestEnvID"`
	UsecaseTestEnvID int64      `json:"usecaseTestEnvID"`
	APIs             []*APIInfo `json:"apis"`
}

APITestsAttemptRequest 尝试执行API测试的请求

type APITestsAttemptResponse

type APITestsAttemptResponse struct {
	Header
	Data []*APITestsAttemptResponseData `json:"data"`
}

APITestsAttemptResponse 尝试执行api测试的响应

type APITestsAttemptResponseData

type APITestsAttemptResponseData struct {
	Request  *APIRequestInfo       `json:"request"`
	Response *APIResp              `json:"response"`
	Asserts  *APITestsAssertResult `json:"asserts"`
}

APITestsAttemptResponseData 尝试执行api测试的响应结果数据

type APITestsStatisticRequest

type APITestsStatisticRequest struct {
	UsecaseIDs []uint64 `json:"usecaseIDs"`
}

APITestsStatisticRequest API 测试结果统计请求

type APITestsStatisticResponse

type APITestsStatisticResponse struct {
	Header
	Data *APITestsStatisticResponseData `json:"data"`
}

APITestsStatisticResponse API 测试结果统计响应

type APITestsStatisticResponseData

type APITestsStatisticResponseData struct {
	Total       uint64 `json:"total"`
	Passed      uint64 `json:"passed"`
	PassPercent string `json:"passPercent"`
}

APITestsStatisticResponseData API 测试结果统计响应数据

type AbnormalHostUsageListRequest

type AbnormalHostUsageListRequest struct {
	Cluster string `query:"cluster"`
}

AbnormalHostUsageListRequest 异常主机资源使用列表请求

type AbnormalHostUsageListResponse

type AbnormalHostUsageListResponse struct {
	Header
	Data []HostUsageDTO `json:"data"`
}

AbnormalHostUsageListResponse 列举异常宿主机资源使用情况

type AccessibleAPI

type AccessibleAPI struct {
	Path   string `json:"path"`
	Method string `json:"method"`
	Schema string `json:"schema"`
}

type ActionCache

type ActionCache struct {
	// 缓存生成的 key 或者是用户指定的 key
	// 用户指定的话 需要 {{basePath}}/路径/{{endPath}} 来自定义 key
	// 用户没有指定 key 有一定的生成规则, 具体生成规则看 prepare.go 的 setActionCacheStorageAndBinds 方法
	Key  string `yaml:"key,omitempty"`
	Path string `yaml:"path,omitempty"` // 指定那个目录被缓存, 只能是由 / 开始的绝对路径
}

type ActionCallback

type ActionCallback struct {
	// show in stdout
	Metadata Metadata `json:"metadata"`

	Errors []ErrorResponse `json:"errors"`

	// machine stat
	MachineStat *PipelineTaskMachineStat `json:"machineStat,omitempty"`

	// behind
	PipelineID     uint64 `json:"pipelineID"`
	PipelineTaskID uint64 `json:"pipelineTaskID"`
}

type ActionConcurrency

type ActionConcurrency struct {
	Enable bool                 `json:"enable" yaml:"enable"`
	V1     *ActionConcurrencyV1 `json:"v1" yaml:"v1"`
}

type ActionConcurrencyV1

type ActionConcurrencyV1 struct {
	Default  ActionConcurrencyV1Item            `json:"default" yaml:"default"`
	Clusters map[string]ActionConcurrencyV1Item `json:"clusters" yaml:"clusters"`
}

type ActionConcurrencyV1Item

type ActionConcurrencyV1Item struct {
	Max int `json:"max" yaml:"max"`
}

type ActionCreateRequest

type ActionCreateRequest struct {
	// action名
	Name string `json:"name"`

	// action版本
	Version string `json:"version" `

	// spec yml 内容
	SpecSrc string `json:"specSrc" `

	// 源action镜像地址
	ImageSrc string `json:"imageSrc"`
}

type ActionCreateResponse

type ActionCreateResponse struct {
	Header
	Data *ActionItem `json:"data"`
}

type ActionDetailResponse

type ActionDetailResponse struct {
	Header
	Data interface{} `json:"data"`
}

detail

type ActionItem

type ActionItem struct {
	Name      string    `json:"name"`
	Type      string    `json:"type"`
	Version   string    `json:"version"`
	SpecSrc   string    `json:"specSrc"`
	Spec      string    `json:"spec"`
	ImageSrc  string    `json:"imageSrc"`
	Image     string    `json:"image"`
	IsDefault int       `json:"isDefault"`
	Desc      string    `json:"desc"`
	CreatedAt time.Time `json:"createdAt"`
}

type ActionListResponse

type ActionListResponse struct {
	Header
	Data interface{} `json:"data"`
}

list

type ActionQueryResponse

type ActionQueryResponse struct {
	Header
	Data []*ActionItem `json:"data"`
}

type ActionSetStatusResponse

type ActionSetStatusResponse struct {
	Header
}

type ActionSpec

type ActionSpec struct {
	Spec           `yaml:",inline"`
	Concurrency    *ActionConcurrency    `json:"concurrency" yaml:"concurrency"`
	Params         []ActionSpecParam     `json:"params" yaml:"params"`
	FormProps      []FormPropItem        `json:"formProps" yaml:"formProps"`
	AccessibleAPIs []AccessibleAPI       `json:"accessibleAPIs" yaml:"accessibleAPIs"`
	Outputs        []ActionSpecOutput    `json:"outputs" yaml:"outputs"`
	Loop           *PipelineTaskLoop     `json:"loop" yaml:"loop"`
	Priority       *PipelineTaskPriority `json:"priority" yaml:"priority"`
}

type ActionSpecOutput

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

type ActionSpecParam

type ActionSpecParam struct {
	Name     string            `json:"name" yaml:"name"`
	Required bool              `json:"required" yaml:"required"`
	Default  interface{}       `json:"default" yaml:"default"`
	Desc     string            `json:"desc" yaml:"desc"`
	Type     string            `json:"type" yaml:"type"`
	Struct   []ActionSpecParam `json:"struct" yaml:"struct"`
}

type ActiveKey

type ActiveKey string
const (
	ActiveKeyfileConfig  ActiveKey = "fileConfig"
	ActiveKeyFileExecute ActiveKey = "fileExecute"
)

func (ActiveKey) String

func (a ActiveKey) String() string

type ActivitiyListRequest

type ActivitiyListRequest struct {
	OrgID         int64  `query:"orgId"`
	ProjectID     int64  `query:"projectId"`
	ApplicationID int64  `query:"applicationId"`
	RuntimeID     int64  `query:"runtimeId"`
	UserID        string `query:"userId"`

	// default 1
	PageNo int `query:"pageNo"`

	// default 20
	PageSize int `query:"pageSize"`
}

ActivitiyListRequest GET /api/activities 活动查询请求结构

type ActivityDTO

type ActivityDTO struct {
	ID            int64       `json:"id"`
	OrgID         int64       `json:"orgId"`
	ProjectID     int64       `json:"projectId"`
	ApplicationID int64       `json:"applicationId"`
	RuntimeID     int64       `json:"runtimeId"`
	UserID        string      `json:"userId"`
	Type          string      `json:"type"`
	Action        string      `json:"action"`
	Desc          string      `json:"desc"`
	Context       interface{} `json:"context"`
	CreatedAt     time.Time   `json:"createdAt"`
}

ActivityDTO 活动结构

type ActivityListResponse

type ActivityListResponse struct {
	Header
	Data ActivityListResponseData `json:"data"`
}

ActivityListResponse GET api/activities 活动查询响应结构

type ActivityListResponseData

type ActivityListResponseData struct {
	Total int           `json:"total"`
	List  []ActivityDTO `json:"list"`
}

ActivityListResponse 活动列表返回结构

type AddNodesData

type AddNodesData struct {
	RecordID uint64 `json:"recordID"`
}

type AddNodesRequest

type AddNodesRequest struct {
	ClusterName     string   `json:"clusterName"`
	OrgID           uint64   `json:"orgID"`
	Hosts           []string `json:"hosts"`
	Labels          []string `json:"labels"`
	Port            int      `json:"port"`
	User            string   `json:"user"`
	Password        string   `json:"password"`
	SudoHasPassword string   `json:"sudoHasPassword"`
	// optional
	DataDiskDevice string `json:"dataDiskDevice"`
	// optional
	Source string `json:"source"`
	Detail string `json:"detail"`
}

type AddNodesResponse

type AddNodesResponse struct {
	Header
	Data AddNodesData `json:"data"`
}

type AddOnUsageFetchResponse

type AddOnUsageFetchResponse struct {
	Header
	Data []AddOnUsageFetchResponseData `json:"data"`
}

type AddOnUsageFetchResponseData

type AddOnUsageFetchResponseData struct {
	ID          string  `json:"id"` // addon实例ID
	Name        string  `json:"name"`
	Project     string  `json:"project"`
	SharedLevel string  `json:"sharedLevel"`
	Workspace   string  `json:"workspace"`
	Instance    int     `json:"instance"` // addon实例对应容器数
	Memory      float64 `json:"memory"`   // 分配的内存大小单位(MB)
	Disk        float64 `json:"disk"`     // 分配的磁盘大小单位(MB)
	CPU         float64 `json:"cpu"`
}

AddOnUsageFetchResponseData 中间件资源分配

type AddonAvailableRequest

type AddonAvailableRequest struct {
	// 项目Id
	ProjectID string `query:"projectId"`
	// 环境, 可选值: DEV/TEST/STAGING/PROD
	Workspace string `query:"workspace"`
}

AddonAvailableRequest dice.yml编辑时可选 addon 实例列表请求

type AddonAvailableResponse

type AddonAvailableResponse struct {
	Header
	Data []AddonFetchResponseData `json:"data"`
}

AddonAvailableResponse dice.yml编辑时可选 addon 实例列表响应

type AddonCommonStringResponse

type AddonCommonStringResponse struct {
	Header
	Data string `json:"data"`
}

AddonCommonStringResponse 通用返回String response

type AddonConfigCallBackItemResponse

type AddonConfigCallBackItemResponse struct {
	Name  string      `json:"name"`
	Value interface{} `json:"value"`
}

AddonConfigCallBackItemResponse addon配置回调小项

type AddonConfigCallBackResponse

type AddonConfigCallBackResponse struct {
	Config    []AddonConfigCallBackItemResponse `json:"config"`
	Label     map[string]string                 `json:"label"`
	Version   string                            `json:"version"`
	Source    string                            `json:"source"`
	RuntimeId string                            `json:"runtimeId"`
}

AddonConfigCallBackResponse addon配置回调

type AddonConfigData

type AddonConfigData struct {
	AddonID    string            `json:"addonID"`
	AddonName  string            `json:"addonName"`
	Config     map[string]string `json:"config"`
	CPU        float64           `json:"cpu"`
	Mem        uint64            `json:"mem"`
	Nodes      int               `json:"nodes"`
	CreateTime time.Time         `json:"createTime"`
	UpdateTime time.Time         `json:"updateTime"`
}

type AddonConfigRequest

type AddonConfigRequest struct {
	AddonID string `json:"addonID"`
}

addon config request

type AddonConfigRes

type AddonConfigRes struct {
	// addon实例名称
	Name string `json:"name"`

	// addon名称
	Engine string `json:"engine"`

	//创建时间
	CreateAt string `json:"createAt"`

	// 更新时间
	UpdateAt string `json:"updateAt"`

	// logo图片
	LogoURL string `json:"logoUrl"`

	// addon状态
	Status string `json:"status"`

	// 环境变量信息
	Config map[string]interface{} `json:"config"`

	// Label label信息
	Label map[string]string `json:"label"`

	//
	InstanceInfo map[string]interface{} `json:"instanceInfo"`

	// 文档信息
	DocInfo map[string]interface{} `json:"docInfo"`

	// addon被引用信息
	ReferenceInfo []AddonReferenceRes `json:"referenceInfo"`

	// addon被引用数
	AttachCount int `json:"attachCount"`

	// addon类型
	Type string `json:"type"`
}

AddonConfigRes addon环境变量信息

type AddonConfigResponse

type AddonConfigResponse struct {
	Header
	Data *AddonConfigData `json:"data"`
}

type AddonConfigUpdateRequest

type AddonConfigUpdateRequest struct {
	AddonOpsBaseRequest

	// 更新配置信息,覆盖更新
	Config map[string]string `json:"config"`
}

addon config update request

type AddonConfigUpdateResponse

type AddonConfigUpdateResponse Header

type AddonCreateCallBackResponse

type AddonCreateCallBackResponse struct {
	IsSuccess bool              `json:"isSuccess"`
	Options   map[string]string `json:"options"`
}

AddonCreateCallBackResponse addon创建回调

type AddonCreateItem

type AddonCreateItem struct {
	// addon实例名称
	Name string `json:"name"`
	// addon名称
	Type string `json:"type"`
	// addon规格
	Plan string `json:"plan"`
	// 环境变量配置
	Configs map[string]string `json:"config,omitempty"`
	// 额外恶心
	Options map[string]string `json:"options,omitempty"`
	// action
	Actions map[string]string `json:"actions,omitempty"`
}

AddonCreateItem addon创建接口耽搁addon信息

type AddonCreateOptions

type AddonCreateOptions struct {
	// 企业ID
	OrgID string `json:"orgId"`

	// 企业名称
	OrgName string `json:"orgName"`

	//项目ID
	ProjectID string `json:"projectId"`

	//项目名称
	ProjectName string `json:"projectName"`

	// 应用ID
	ApplicationID string `json:"applicationId"`

	// 应用名称
	ApplicationName string `json:"applicationName"`

	// 所属环境
	Workspace string `json:"workspace"`

	// 所属环境
	Env string `json:"env"`

	// 分支名称
	RuntimeID string `json:"runtimeId"`

	// 分支名称
	RuntimeName string `json:"runtimeName"`

	// 发布ID
	DeploymentID string `json:"deploymentId,string"`

	// 日志类型
	LogSource string `json:"logSource"`

	// 集群名称
	ClusterName string `json:"clusterName"`
}

AddonCreateOptions 申请 Addon 扩展选项

type AddonCreateRequest

type AddonCreateRequest struct {
	// 集群
	ClusterName string `json:"clusterName"`

	// 企业ID
	OrgID uint64 `json:"orgId,string"`

	// 项目ID
	ProjectID uint64 `json:"projectId,string"`

	// 应用ID
	ApplicationID uint64 `json:"applicationId,string"`

	// 所属环境
	Workspace string `json:"workspace"`

	// 分支名称
	RuntimeName string `json:"runtimeName"`

	// runtimeId
	RuntimeID uint64 `json:"runtimeId,string"`

	// 操作人
	Operator string `json:"operatorId"`

	Addons []AddonCreateItem `json:"addons"`

	// 补充信息
	Options AddonCreateOptions `json:"options,omitempty"`
}

AddonCreateRequest 申请 Addon 请求

type AddonCreateResponse

type AddonCreateResponse struct {
	Header
}

AddonCreateResponse 申请 Addon 相应

type AddonDeleteRequest

type AddonDeleteRequest struct {
	RuntimeID uint64 `json:"-" path:"runtimeID"`
}

AddonDeleteRequest 删除 Addon 请求

type AddonDeleteResponse

type AddonDeleteResponse struct {
	Header
}

AddonDeleteResponse 删除 Addon 相应

type AddonDependsRelation

type AddonDependsRelation struct {
	// ParentDepends 父依赖
	ParentDepends *AddonDependsRelation
	// ChildDepends 子依赖
	ChildDepends *[]AddonDependsRelation
	// AddonName addon名称
	AddonName string
	// Plan addon规格
	Plan string
	// Version addon版本
	Version string
	// InstanceName 实例名称
	InstanceName string
}

AddonDependsRelation addon依赖信息

type AddonDirectCreateRequest

type AddonDirectCreateRequest struct {
	// 集群
	ClusterName string `json:"clusterName"`

	// 企业ID
	OrgID uint64 `json:"orgId"`

	// 项目ID
	ProjectID uint64 `json:"projectId"`

	// 应用ID
	ApplicationID uint64 `json:"applicationId"`

	// 所属环境
	Workspace string `json:"workspace"`

	// 操作人
	Operator string `json:"operatorId"`

	// CLUSTER | PROJECT
	ShareScope string `json:"shareScope"`

	Addons diceyml.AddOns `json:"addons"`
}

type AddonDirectDeleteRequest

type AddonDirectDeleteRequest struct {
	OrgID    uint64 `json:"orgId"`
	Operator string `json:"operatorId"`
	ID       string `json:"id"`
}

type AddonExtension

type AddonExtension struct {
	Type        string                 `json:"type"`
	Name        string                 `json:"name"`
	Desc        string                 `json:"desc"`
	DisplayName string                 `json:"displayName"`
	Category    string                 `json:"category"`
	LogoUrl     string                 `json:"logoUrl"`
	ImageURLs   []string               `json:"imageUrls"`
	Strategy    map[string]interface{} `json:"strategy"`
	// Version 版本信息
	Version string `json:"version"`
	// 主分类信息
	SubCategory string `json:"subCategory"`
	// Domain addon 服务地址 (仅针对服务部署类型,默认该服务为addon详情介绍页)
	Domain string `json:"domain"`
	// Requires addon 配置要求,目前支持以下三种属性,某项配置不允许,不传即可
	Requires []string `json:"requires"`
	// ConfigVars 返回内容配置约定,根据不同服务属性来返回对应的内容
	ConfigVars []string `json:"configVars"`
	// Envs 添加非第三方addon需要的环境变量
	Envs []string `json:"envs"`
	// Plan addon 支持规格 (仅针对服务部署类型),根据能力自身的标准来制定,规格名称可以自行指定,比如basic(基础版)、professional(专业版)、ultimate(旗舰版)
	Plan map[string]AddonPlanItem `json:"plan"`
	// ShareScopes 共享级别,PROJECT、CLUSTER、DICE(未来会下掉)
	ShareScopes []string `json:"shareScope"`
	// Similar 同类addon,如mysql对应rds
	Similar []string `json:"similar"`
}

AddonExtension addon extension对象信息

type AddonExtensionResponse

type AddonExtensionResponse struct {
	Header
	Data []Extension `json:"data"`
}

AddonExtensionResponse dice.yml编辑时可选 extension 实例列表响应

type AddonFetchResponse

type AddonFetchResponse struct {
	Header
	Data AddonFetchResponseData `json:"data"`
}

AddonFetchResponse 获取addon详情

type AddonFetchResponseData

type AddonFetchResponseData struct {
	ID string `json:"instanceId"` // routingInstanceID
	// addon实例名称
	Name string `json:"name"`
	// addon标签
	Tag string `json:"tag"`
	// AddonName addon 名称,eg: mysql, kafka
	AddonName string `json:"addonName"`
	// AddonDisplayName addon 显示名称
	AddonDisplayName string `json:"displayName"`
	// Desc addon desc
	Desc string `json:"desc"`
	// LogoURL addon logo
	LogoURL string `json:"logoUrl"`
	// Plan addon 规格, basic/professional, etc
	Plan string `json:"plan"`
	// Version addon 版本
	Version string `json:"version"`
	// Category addon 类别: 微服务/数据库/配置中心,etc
	Category string `json:"category"`
	// Config addon 使用配置, eg: 地址/端口/账号
	Config map[string]interface{} `json:"config"`
	// ShareScope 共享级别, eg: 项目共享/企业共享/集群共享/dice共享
	ShareScope string `json:"shareScope"`
	// Cluster 集群名称
	Cluster string `json:"cluster,omitempty"`
	// OrgID 企业 id
	OrgID uint64 `json:"orgId"`
	// ProjectID 项目 id
	ProjectID uint64 `json:"projectId"`
	// ProjectName 项目名称
	ProjectName string `json:"projectName"`
	// Workspace, DEV/TEST/STAGING/PROD
	Workspace string `json:"workspace"`
	// Status addon 状态
	Status string `json:"status"`
	// RealInstanceID addon 真实实例Id
	RealInstanceID string `json:"realInstanceId"`
	// Reference addon 引用计数
	Reference int `json:"reference"`
	// AttachCount 引用数量
	AttachCount int `json:"attachCount"`
	// Platform 是否为微服务
	Platform bool `json:"platform"`
	// PlatformServiceType 平台服务类型,0:非平台服务,1:微服务,2:平台组件
	PlatformServiceType int `json:"platformServiceType"`
	// CanDel 是否可删除
	CanDel bool `json:"canDel"`
	// Terminus Key 监控 addon 跳转使用
	TerminusKey string `json:"terminusKey,omitempty"` // TODO 暂时前端根据此字段做跳转,后续应想办法去除
	// ConsoleUrl addon跳转界面
	ConsoleUrl string `json:"consoleUrl"` //
	// CreatedAt 创建时间
	CreatedAt time.Time `json:"createdAt"`
	// UpdatedAt 更新时间
	UpdatedAt time.Time `json:"updatedAt"`
	// RecordID cloud addon信息
	RecordID int `json:"recordId"`
	// CustomAddonType cloud addon信息
	CustomAddonType string `json:"customAddonType"`
	// TenantOwner addon 租户owner的 instancerouting id
	TenantOwner string `json:"tenantOwner"`
}

AddonFetchResponseData addon详情信息

type AddonHandlerCreateItem

type AddonHandlerCreateItem struct {
	// InstanceName addon实例名称
	InstanceName string `json:"name"`
	// AddonName addon名称
	AddonName string `json:"type"`
	// Plan addon规格
	Plan string `json:"plan"`
	// Tag 标签
	Tag string `json:"tag"`
	// ClusterName 集群名称
	ClusterName string `json:"az"`
	// Workspace 所属环境
	Workspace string `json:"env"`
	// OrgID 企业ID
	OrgID string `json:"orgId"`
	// ProjectID 项目ID
	ProjectID string `json:"projectId"`
	// ApplicationID应用ID
	ApplicationID string `json:"applicationId"`
	// OperatorID 用户ID
	OperatorID string `json:"operatorId"`
	// Config 环境变量配置
	Config map[string]string `json:"config"`
	// Options 额外信息配置
	Options map[string]string `json:"options"`
	// RuntimeID runtimeID
	RuntimeID string `json:"runtimeId"`
	// RuntimeName runtime名称
	RuntimeName string `json:"runtimeName"`
	// InsideAddon 是否为内部依赖addon,N:否,Y:是
	InsideAddon string `json:"insideAddon"`
	// ShareScope 是否为内部依赖addon,N:否,Y:是
	ShareScope string `json:"shareScope"`
}

AddonHandlerCreateItem 请求AttachAndCreate方法参数

type AddonInstanceRes

type AddonInstanceRes struct {
	InstanceID     string                 `json:"instanceId" desc:"addon实例ID"`
	AddonName      string                 `json:"addonName" desc:"addon名称"`
	Name           string                 `json:"name" desc:"addon实例名称"`
	Plan           string                 `json:"plan" desc:"addon规格"`
	PlanCnName     string                 `json:"planCnName" desc:"addon规格中文"`
	Category       string                 `json:"category" desc:"addon分类"`
	Version        string                 `json:"version" desc:"addon版本"`
	ProjectID      string                 `json:"projectId" desc:"项目ID"`
	OrgID          string                 `json:"orgId" desc:"企业ID"`
	Env            string                 `json:"env" desc:"所在环境"`
	Status         string                 `json:"status" desc:"addon实例状态"`
	ShareScope     string                 `json:"shareScope" desc:"共享级别"`
	LogoURL        string                 `json:"logoUrl" desc:"logo图片"`
	IconURL        string                 `json:"iconUrl" desc:"icon图片"`
	Cluster        string                 `json:"clusterName"  desc:"集群"`
	CreateTime     string                 `json:"createTime" desc:"创建时间"`
	UpdateTime     string                 `json:"updateTime" desc:"更新时间"`
	AttachCount    int                    `json:"attachCount" desc:"addon被引用计数"`
	IsPlatform     bool                   `json:"isPlatform" desc:"是否平台服务"`
	RealInstanceID string                 `json:"realInstanceId" desc:"addon实例真实ID"`
	Config         map[string]interface{} `json:"config" desc:"addon环境变量"`
}

AddonInstanceRes addon实例变量信息

type AddonListRequest

type AddonListRequest struct {
	Type  string `query:"type"`  // 可选值: addon/category/workbench/org/project/app/runtime, etc
	Value string `query:"value"` // 可选值: <addonName>/<categoryName>/workbench/<orgId>/<projectId>/<appId>/<runtimeId>
}

AddonListRequest addon 列表请求

type AddonListResponse

type AddonListResponse struct {
	Header
	Data []AddonFetchResponseData `json:"data"`
}

AddonListResponse addon 列表响应

type AddonNameResponse

type AddonNameResponse struct {
	Header
	// key 为 projectID
	Data []AddonNameResultItem `json:"data"`
}

AddonNameResponse 通过addon name获取信息返回

type AddonNameResultItem

type AddonNameResultItem struct {
	InstanceID string                 `json:"instanceId"`
	Config     map[string]interface{} `json:"config"`
	Status     string                 `json:"status"`
}

AddonNameResultItem 通过addon name获取信息返回

type AddonOpsBaseRequest

type AddonOpsBaseRequest struct {
	ClusterName string `json:"clusterName"`
	ProjectName string `json:"projectName"`
	ProjectID   string `json:"projectID"`
	AddonID     string `json:"addonID"`
	AddonName   string `json:"addonName"`
}

addon base request

type AddonPlanItem

type AddonPlanItem struct {
	// CPU cpu大小
	CPU float64 `json:"cpu"`
	// Mem 内存大小
	Mem int `json:"mem"`
	// Nodes 节点数量
	Nodes int `json:"nodes"`
	// 内部组件依赖信息,如果有,则用内部组件的信息
	InsideMoudle map[string]AddonPlanItem `json:"inside"`
	// Offerings 规格特征说明
	Offerings []string `json:"offerings"`
}

AddonPlanItem 规格信息详细描述

type AddonPlanRes

type AddonPlanRes struct {
	// 规格信息
	Plan string `json:"plan"`
	// 规格信息中文说明
	PlanCnName string `json:"planCnName"`
}

AddonPlanRes addon规格信息返回res

type AddonPrebuildOverlayReq

type AddonPrebuildOverlayReq struct {
	To   string `json:"to"`
	Type string `json:"type"`
}

AddonPrebuildOverlayReq addon prebuild overlay request body,rds覆盖mysql

type AddonPrebuildReq

type AddonPrebuildReq struct {
	Name       string            `json:"name"`
	Plan       string            `json:"plan"`
	Type       string            `json:"type"`
	InstanceID string            `json:"instanceId"`
	Config     map[string]string `json:"config"`
	Options    map[string]string `json:"options"`
	Actions    map[string]string `json:"actions"`
}

AddonPrebuildReq addon prebuild request body

type AddonProviderDataResp

type AddonProviderDataResp struct {
	// UUID 唯一ID
	UUID string `json:"id"`
	// Config 配置信息
	Config map[string]interface{} `json:"config"`
	// Label 配置信息
	Label map[string]string `json:"label"`
	// CreateAt 创建时间
	CreateAt string `json:"createAt"`
	// UpdateAt 更新时间
	UpdateAt string `json:"updateAt"`
}

AddonProviderDataResp provider addon 返回

type AddonProviderDeleteResponse

type AddonProviderDeleteResponse struct {
	Header
	Data bool `json:"data"`
}

AddonProviderDeleteResponse 删除 provider Addon 相应

type AddonProviderRequest

type AddonProviderRequest struct {
	// Callback 回调地址
	Callback string `json:"callback"`
	// Uuid 唯一ID
	UUID string `json:"uuid"`
	// Name 名称
	Name string `json:"name"`
	// Plan 规格
	Plan string `json:"plan"`
	// ClusterName 集群名称
	ClusterName string `json:"az"`
	// Options 额外信息
	Options map[string]string `json:"options"`
}

AddonProviderRequest 请求addon provider的requestBody

type AddonProviderResponse

type AddonProviderResponse struct {
	Header
	Data AddonProviderDataResp `json:"data"`
}

AddonProviderResponse 请求addon provider的responseBody

type AddonReferenceInfo

type AddonReferenceInfo struct {
	OrgID       uint64 `json:"orgId"`
	ProjectID   uint64 `json:"projectId"`
	ProjectName string `json:"projectName"`
	AppID       uint64 `json:"applicationId"`
	AppName     string `json:"applicationName"`
	RuntimeID   uint64 `json:"runtimeId"`
	RuntimeName string `json:"runtimeName"`
}

ReferenceInfo 引用信息

type AddonReferenceRes

type AddonReferenceRes struct {
	// 引用组成名称
	Name string `json:"name"`

	// 企业Id
	OrgID string `json:"orgId"`

	// 项目ID
	ProjectID string `json:"projectId"`

	// 应用ID
	ApplicationID string `json:"applicationId"`

	// runtimeID
	RuntimeID string `json:"runtimeId"`

	// 引用时间
	AttachTime string `json:"attachTime"`
}

AddonReferenceRes addon被引用信息

type AddonReferencesResponse

type AddonReferencesResponse struct {
	Header
	Data []AddonReferenceInfo `json:"data"`
}

AddonReferencesResponse addon 引用列表

type AddonRes

type AddonRes struct {
	// addonId
	ID string `json:"id"`

	// addon名称
	Name string `json:"name"`

	// addon展示名称
	DisplayName string `json:"display_name"`

	// addon描述信息
	Description string `json:"description"`

	// addon分类
	CategoryName string `json:"categoryName"`

	// addon所属类别
	SubCategory string `json:"subCategory"`

	// logo图片
	LogoURL string `json:"logoUrl"`

	// icon图片
	IconURL string `json:"iconUrl"`

	// addon共享级别
	ShareScope string `json:"shareScope"`

	// addon实例Id
	InstanceID string `json:"instanceId"`

	// addon实例名称
	InstanceName string `json:"instanceName"`

	// 规格
	Plan string `json:"plan"`

	// 是否需要创建
	NeedCreate int `json:"needCreate"`

	// VARS信息
	Vars []string `json:"vars"`

	// ENVS信息
	Envs []string `json:"envs"`

	// 版本信息
	Versions []string `json:"versions"`

	// 规格信息列表
	Plans []AddonPlanRes `json:"plans"`
}

AddonRes addon信息

type AddonScaleRequest

type AddonScaleRequest struct {
	AddonOpsBaseRequest
	// CPU cpu大小
	CPU float64 `json:"cpu"`
	// Mem 内存大小
	Mem uint64 `json:"mem"`
	// Nodes 节点数量
	Nodes int `json:"nodes"`
}

addon scale request

type AddonScaleResponse

type AddonScaleResponse Header

type AddonStatus

type AddonStatus string

AddonStatus addon 状态

const (
	// AddonPending 待发布
	AddonPending AddonStatus = "PENDING"
	// AddonAttaching 启动中
	AddonAttaching AddonStatus = "ATTACHING"
	// AddonAttached 运行中
	AddonAttached AddonStatus = "ATTACHED"
	// AddonAttachFail 启动失败
	AddonAttachFail AddonStatus = "ATTACHFAILED"
	// AddonDetaching 删除中
	AddonDetaching AddonStatus = "DETACHING"
	// AddonDetached 已删除
	AddonDetached AddonStatus = "DETACHED"
	// AddonOffline 未启动
	AddonOffline AddonStatus = "OFFLINE"
	// AddonUpgrade 已升级
	AddonUpgrade AddonStatus = "UPGRADE"
	// AddonRollback 已回滚
	AddonRollback AddonStatus = "ROLLBACK"
	// AddonUnknown 未知
	AddonUnknown AddonStatus = "UNKNOWN"
)

type AddonStatusRequest

type AddonStatusRequest struct {
	RuntimeID uint64 `json:"-" path:"runtimeID"`
}

AddonStatusRequest 查询 Addon 状态请求

type AddonStatusResponse

type AddonStatusResponse struct {
	Header
	Data int `json:"data"`
}

AddonStatusResponse 查询 Addon 状态响应

type AddonStrategy

type AddonStrategy struct {
	// SupportClusterType 支持发布的集群(如:k8s,dcos,edas)
	SupportClusterType []string `json:"supportClusterType"`
	// IsPlatform 是否微服务
	IsPlatform bool `json:"isPlatform"`
	// FrontDisplay 是否前端展示。true:展示
	FrontDisplay bool `json:"frontDisplay"`
	// MenuDisplay 是否展示菜单,true:展示
	MenuDisplay bool `json:"menuDisplay"`
	// DiffEnv 是否区分环境,true:区分
	DiffEnv bool `json:"diffEnv"`
	// CanRegister 是否要注册,1:是,0:不是
	CanRegister bool `json:"canRegister"`
}

AddonStrategy addon策略

type AddonTenantCreateRequest

type AddonTenantCreateRequest struct {
	AddonInstanceRoutingID string `json:"addonInstanceRoutingId"`
	Name                   string `json:"name"`

	// 对于 Mysql
	// databases: db1,db2,...   ; 该tenant用户有权限操作的db, db若不存在则创建
	Configs map[string]string `json:"configs"`
}

type AddonTenantCreateResponse

type AddonTenantCreateResponse struct {
	Header
}

type AddonType

type AddonType string

AddonType Addon 类型

type Alert

type Alert struct {
	ID           uint64                 `json:"id"`
	Name         string                 `json:"name"`
	AlertScope   string                 `json:"alertScope"`
	AlertScopeID string                 `json:"alertScopeId"`
	Enable       bool                   `json:"enable"`
	Attributes   map[string]interface{} `json:"attributes"`
	CreateTime   int64                  `json:"createTime"`
	UpdateTime   int64                  `json:"updateTime"`
}

Alert 告警结构体

type AllContainers

type AllContainers struct {
	Runs          []Container `json:"runs,omitempty"`
	CompletedRuns []Container `json:"completedRuns,omitempty"`
}

AllContainers 所有容器,包含运行中 & 已退出容器

type AllGroupResponse

type AllGroupResponse struct {
	Header
	Data []AllGroups `json:"data"`
}

type AllGroups

type AllGroups struct {
	Name  string `json:"name"`
	Value int64  `json:"value"`
	Type  string `json:"type"`
}

type AllTemplatesResponse

type AllTemplatesResponse struct {
	Header
	Data []*TemplateRes `json:"data"`
}

type AndroidCertificateAutoDTO

type AndroidCertificateAutoDTO struct {
	Name            string                        `json:"name"`
	OU              string                        `json:"ou"`
	Org             string                        `json:"org"`
	City            string                        `json:"city"`
	Province        string                        `json:"province"`
	State           string                        `json:"state"`
	DebugKeyStore   AndroidCertificateKeyStoreDTO `json:"debugKeyStore"`
	ReleaseKeyStore AndroidCertificateKeyStoreDTO `json:"releaseKeyStore"`
}

AndroidCertificateAutoDTO Android Auto create DTO

type AndroidCertificateDTO

type AndroidCertificateDTO struct {
	IsManualCreate bool                        `json:"manualCreate"`
	ManualInfo     AndroidCertificateManualDTO `json:"manualInfo"`
	AutoInfo       AndroidCertificateAutoDTO   `json:"autoInfo"`
}

AndroidCertificateDTO IOS 证书信息

type AndroidCertificateKeyDTO

type AndroidCertificateKeyDTO struct {
	DebugKeyStoreFile    string `json:"debugKeyStoreFile,omitempty"`
	DebugKeyStoreAlias   string `json:"debugKeyStoreAlias,omitempty"`
	DebugKeyPassword     string `json:"debugKeyPassword,omitempty"`
	DebugStorePassword   string `json:"debugStorePassword,omitempty"`
	ReleaseKeyStoreFile  string `json:"releaseKeyStoreFile,omitempty"`
	ReleaseKeyStoreAlias string `json:"releaseKeyStoreAlias,omitempty"`
	ReleaseKeyPassword   string `json:"releaseKeyPassword,omitempty"`
	ReleaseStorePassword string `json:"releaseStorePassword,omitempty"`
}

AndroidCertificateKeyDTO Android 证书 k-v

type AndroidCertificateKeyStoreDTO

type AndroidCertificateKeyStoreDTO struct {
	Alias         string `json:"alias"`
	KeyPassword   string `json:"keyPassword"`
	StorePassword string `json:"storePassword"`
}

AndroidCertificateKeyStoreDTO Android KeyStore DTO

type AndroidCertificateManualDTO

type AndroidCertificateManualDTO struct {
	DebugKeyStore   AndroidCertificateManualKeyStoreDTO `json:"debugKeyStore"`
	ReleaseKeyStore AndroidCertificateManualKeyStoreDTO `json:"releaseKeyStore"`
}

AndroidCertificateManualDTO Android Manual DTO

type AndroidCertificateManualKeyStoreDTO

type AndroidCertificateManualKeyStoreDTO struct {
	CertificateFileDTO
	AndroidCertificateKeyStoreDTO
}

AndroidCertificateManualKeyStoreDTO Android Manual KeyStore DTO

type ApiGatewayBuyInfo

type ApiGatewayBuyInfo struct {
	ApiGatewayInfo
	CreateCloudResourceChargeInfo
	Spec        string `json:"spec"`
	HttpsPolicy string `json:"httpsPolicy"`
}

type ApiGatewayInfo

type ApiGatewayInfo struct {
	ID   string `json:"instanceID"`
	Name string `json:"name"`
}

type ApiGatewayVpcGrantRequest

type ApiGatewayVpcGrantRequest struct {
	*CreateCloudResourceBaseInfo
	ApiGatewayBuyInfo
	Slb     PrivateSlbBuyInfo `json:"slb"`
	AddonID string            `json:"addonID"`
}

func (ApiGatewayVpcGrantRequest) GetAddonID

func (req ApiGatewayVpcGrantRequest) GetAddonID() string

func (ApiGatewayVpcGrantRequest) GetInstanceName

func (req ApiGatewayVpcGrantRequest) GetInstanceName() string

type ApiTestCancelRequest

type ApiTestCancelRequest struct {
	PipelineID uint64 `json:"pipelineId"`
}

ApiTestCancelRequest 测试计划取消请求

type ApiTestCancelResponse

type ApiTestCancelResponse struct {
	Header
	Data string `json:"data"`
}

ApiTestCancelResponse 测试计划取消响应

type ApiTestInfo

type ApiTestInfo struct {
	ApiID        int64         `json:"apiID"`
	UsecaseID    int64         `json:"usecaseID"`
	UsecaseOrder int64         `json:"usecaseOrder"`
	ProjectID    int64         `json:"projectID"`
	Status       ApiTestStatus `json:"status"`
	ApiInfo      string        `json:"apiInfo"`
	ApiRequest   string        `json:"apiRequest"`
	ApiResponse  string        `json:"apiResponse"`
	AssertResult string        `json:"assertResult"`
}

ApiTestInfo api测试的信息

type ApiTestStatus

type ApiTestStatus string
const (
	ApiTestCreated ApiTestStatus = "Created"
	ApiTestRunning ApiTestStatus = "Running"
	ApiTestPassed  ApiTestStatus = "Passed"
	ApiTestFailed  ApiTestStatus = "Failed"
)

Api测试对应的状态

type ApiTestsActionRequest

type ApiTestsActionRequest struct {
	Header
	ProjectID        int64    `json:"projectID"`
	ProjectTestEnvID int64    `json:"projectTestEnvID"`
	TestPlanID       int64    `json:"testPlanID"`
	UsecaseIDs       []uint64 `json:"usecaseIDs"`
}

ApiTestsActionRequest 执行api测试的请求

type ApiTestsActionResponse

type ApiTestsActionResponse struct {
	Header
	Data uint64 `json:"data"`
}

ApiTestsActionResponse 执行api测试的响应

type ApiTestsCreateRequest

type ApiTestsCreateRequest struct {
	ApiTestInfo
}

ApiTestsCreateRequest 创建api测试信息请求体

type ApiTestsCreateResponse

type ApiTestsCreateResponse struct {
	Header
	Data interface{} `json:"data"`
}

ApiTestsCreateResponse 创建api测试信息的响应

type ApiTestsDeleteResponse

type ApiTestsDeleteResponse struct {
	Header
	Data string `json:"data"`
}

ApiTestsDeleteResponse 删除api测试信息响应

type ApiTestsGetResponse

type ApiTestsGetResponse struct {
	Header
	Data *ApiTestInfo `json:"data"`
}

ApiTestInfoResponse 获取api测试信息响应

type ApiTestsListResponse

type ApiTestsListResponse struct {
	Header
	Data []*ApiTestInfo `json:"data"`
}

ApiTestsListResponse 获取api测试信息列表响应

type ApiTestsUpdateRequest

type ApiTestsUpdateRequest struct {
	ApiTestInfo
	IsResult bool `json:"isResult"`
}

ApiTestsUpdateRequest 更新api测试信息请求体

type ApiTestsUpdateResponse

type ApiTestsUpdateResponse struct {
	Header
	Data interface{} `json:"data"`
}

ApiTestsUpdateResponse 更新api测试信息的响应

type AppCertificateListRequest

type AppCertificateListRequest struct {
	AppID uint64 `query:"appId"`

	// 对 AppCertificate 名进行like查询
	Status   string `query:"status"`
	PageNo   int    `query:"pageNo"`
	PageSize int    `query:"pageSize"`
}

AppCertificateListRequest GET /api/certificates/actions/list-application-quotes 获取应用引用证书列表请求

type AppPublishItemRelation

type AppPublishItemRelation struct {
	Env             string   `json:"env"`
	OrgID           int64    `json:"-"`
	AppID           int64    `json:"appId"`
	PublishItemID   int64    `json:"publishItemId"`
	PublishItemName string   `json:"publishItemName"`
	PublisherID     int64    `json:"publisherId"`
	PublisherName   string   `json:"publisherName"`
	PublishItemNs   []string `json:"publishItemNs"` // 同步 nexus 配置至 pipeline cm
	AK              string   `json:"ak"`
	AI              string   `json:"ai"`
}

type AppStoreResponse

type AppStoreResponse struct {
	ResultCount int64             `json:"resultCount"`
	Results     []AppStoreResults `json:"results"`
}

AppStoreResponse 通过bundleId搜索app store里的链接返回

type AppStoreResults

type AppStoreResults struct {
	TrackViewURL string `json:"trackViewUrl"`
}

AppStoreResults 通过bundleId搜索app store里的链接数据

type AppWorkspaceReleasesGetRequest

type AppWorkspaceReleasesGetRequest struct {
	AppID     uint64        `schema:"appID,required"`
	Workspace DiceWorkspace `schema:"workspace,required"`
}

AppWorkspaceReleasesGetRequest 查询应用某个环境所有可部署的 release 请求

type AppWorkspaceReleasesGetResponse

type AppWorkspaceReleasesGetResponse struct {
	Header
	Data AppWorkspaceReleasesGetResponseData `json:"data,omitempty"`
}

AppWorkspaceReleasesGetResponse 查询应用某个环境所有可部署的 release 响应

type AppWorkspaceReleasesGetResponseData

type AppWorkspaceReleasesGetResponseData map[string]*ReleaseListResponseData

AppWorkspaceReleasesGetResponseData map key: branch, map value: paging releases

type ApplicationBuildRequest

type ApplicationBuildRequest struct {
	AppID       string `json:"appId,omitempty" validate:"required"` // 实际上是 appID
	Branch      string `json:"branch,omitempty" validate:"required"`
	Env         string `json:"env,omitempty" validate:"required"`
	Callback    string `json:"callback,omitempty"`
	Extra       string `json:"extra,omitempty"`
	AutoExecute bool   `json:"auto_execute"`
}

ApplicationBuildRequest 应用构建请求结构

type ApplicationBuildResponse

type ApplicationBuildResponse struct {
	Success bool       `json:"success"`
	Data    CiV3Builds `json:"data,omitempty"`
	Error   BuildError `json:"err,omitempty"`
}

ApplicationBuildResponse 应用构建响应结构

type ApplicationCertificateDTO

type ApplicationCertificateDTO struct {
	ID            uint64                 `json:"id"`
	AppID         uint64                 `json:"appId"`
	CertificateID uint64                 `json:"certificateId"`
	ApprovalID    uint64                 `json:"approvalId"`
	Name          string                 `json:"name"`
	Type          string                 `json:"type"`
	OrgID         uint64                 `json:"orgId"`
	Status        string                 `json:"status"`
	Creator       string                 `json:"creator"`  // 证书创建者
	Operator      string                 `json:"operator"` // 应用者
	Desc          string                 `json:"desc"`
	AndroidInfo   AndroidCertificateDTO  `json:"androidInfo"`
	IOSInfo       IOSCertificateDTO      `json:"iosInfo"`
	MessageInfo   CertificateFileDTO     `json:"messageInfo"`
	PushConfig    PushCertificateConfigs `json:"pushConfig"`
	CreatedAt     time.Time              `json:"createdAt"` // 应用引用Certificate时间
}

ApplicationCertificateDTO 应用引用证书结构

type ApplicationCreateRequest

type ApplicationCreateRequest struct {
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`
	Desc        string `json:"desc"`
	ProjectID   uint64 `json:"projectId"`

	// 模式 LIBRARY, SERVICE, BIGDATA, ABILITY
	Mode string `json:"mode"`

	// 配置信息,eg: 钉钉通知地址
	Config map[string]interface{} `json:"config"`

	// 是否外置仓库
	IsExternalRepo bool `json:"isExternalRepo"`
	// 仓库配置 isExternalRepo=true时设置
	RepoConfig *GitRepoConfig `json:"repoConfig"`
}

ApplicationCreateRequest POST /api/applications 创建应用请求结构

type ApplicationCreateResponse

type ApplicationCreateResponse struct {
	Header
	Data ApplicationDTO `json:"data"`
}

ApplicationCreateResponse POST /api/applications 创建应用返回结构

type ApplicationDTO

type ApplicationDTO struct {
	ID          uint64 `json:"id"`
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`

	// 模式 LIBRARY, SERVICE, BIGDATA
	Mode     string                 `json:"mode,omitempty"`
	Pined    bool                   `json:"pined"`
	Desc     string                 `json:"desc"`
	Config   map[string]interface{} `json:"config"`
	IsPublic bool                   `json:"isPublic"`

	// 创建者的userId
	Creator string `json:"creator"`

	UnBlockStart *time.Time `json:"unBlockStart"`
	UnBlockEnd   *time.Time `json:"unBlockEnd"`
	BlockStatus  string     `json:"blockStatus"`
	// 统计信息
	Stats              ApplicationStats       `json:"stats"`
	GitRepo            string                 `json:"gitRepo"`
	GitRepoAbbrev      string                 `json:"gitRepoAbbrev"`
	GitRepoNew         string                 `json:"gitRepoNew"`
	Token              string                 `json:"token"`
	OrgID              uint64                 `json:"orgId"`
	OrgName            string                 `json:"orgName"`
	OrgDisplayName     string                 `json:"orgDisplayName"`
	ProjectID          uint64                 `json:"projectId"`
	ProjectName        string                 `json:"projectName"`
	ProjectDisplayName string                 `json:"projectDisplayName"`
	Workspaces         []ApplicationWorkspace `json:"workspaces"`

	// 是否外置仓库
	IsExternalRepo bool `json:"isExternalRepo"`

	RepoConfig *GitRepoConfig `json:"repoConfig"`

	// 成员对应的角色
	MemberRoles []string `json:"memberRoles"`

	// 应用创建时间
	CreatedAt time.Time `json:"createdAt"`

	// 应用更新时间
	UpdatedAt time.Time `json:"updatedAt"`
}

ApplicationDTO 应用结构

type ApplicationDeleteRequest

type ApplicationDeleteRequest struct {
	ProjectID string `path:"projectId"`
}

ApplicationDeleteRequest DELETE /api/applications/<applicationId> 删除应用请求结构

type ApplicationDeleteResponse

type ApplicationDeleteResponse struct {
	Header
	Data ApplicationDTO `json:"data"`
}

ApplicationDeleteResponse DELETE /api/applications/<applicationId> 删除应用响应结构

type ApplicationFetchRequest

type ApplicationFetchRequest struct {
	// 应用id/应用名
	ApplicationIDOrName string `path:"applicationIdOrName"`

	// 当path中传的是applicationName的时候,需要传入projectId
	ProjectID string `query:"projectId"`
}

ApplicationFetchRequest GET /api/applications/<applicationId> 获取应用详情请求结构

type ApplicationFetchResponse

type ApplicationFetchResponse struct {
	Header
	Data ApplicationDTO `json:"data"`
}

ApplicationFetchResponse GET /api/applications/<applicationId> 获取应用详情返回结构

type ApplicationInitRequest

type ApplicationInitRequest struct {
	ApplicationID uint64 `json:"-"`
	// +optional 移动应用模板名称, 移动应用时必传
	MobileAppName string `json:"mobileAppName"`
	// +optional 移动应用显示名称
	MobileDisplayName string `json:"mobileDisplayName"`
	// +optional ios bundle id, 移动应用时必传
	BundleID string `json:"bundleID"`
	// +optional android package name, 移动应用时必传
	PackageName string `json:"packageName"`

	IdentityInfo
}

ApplicationInitRequest 移动应用初始化请求

type ApplicationListRequest

type ApplicationListRequest struct {
	ProjectID uint64 `query:"projectId"`
	Mode      string `query:"mode"` // LIBRARY/SERVICE/BIGDATA

	// 对项目名进行like查询
	Query    string `query:"q"`
	Name     string `query:"name"` // 根据 name 精确匹配
	PageNo   int    `query:"pageNo"`
	PageSize int    `query:"pageSize"`
	Public   string `query:"public"`
	OrderBy  string `query:"orderBy"`

	// 是否只返回简单信息(应用级流水线打开列表使用)
	IsSimple bool `query:"isSimple"`
}

ApplicationListRequest GET /api/applications 应用列表请求结构

type ApplicationListResponse

type ApplicationListResponse struct {
	Header
	Data ApplicationListResponseData `json:"data"`
}

ApplicationListResponse GET /api/applications 应用列表响应结构

type ApplicationListResponseData

type ApplicationListResponseData struct {
	Total int              `json:"total"`
	List  []ApplicationDTO `json:"list"`
}

ApplicationListResponseData 应用列表响应数据

type ApplicationMode

type ApplicationMode string

ApplicationMode 应用类型

const (
	ApplicationModeService ApplicationMode = "SERVICE"
	ApplicationModeBigdata ApplicationMode = "BIGDATA"
	ApplicationModeLibrary ApplicationMode = "LIBRARY"
	ApplicationModeAbility ApplicationMode = "ABILITY"
	ApplicationModeMobile  ApplicationMode = "MOBILE"
	ApplicationModeApi     ApplicationMode = "API"
)

type ApplicationStats

type ApplicationStats struct {
	// runtime 数量
	CountRuntimes uint `json:"countRuntimes"`

	// 成员人数
	CountMembers     uint   `json:"countMembers"`
	TimeLastModified string `json:"timeLastModified"`
}

ApplicationStats 应用统计

type ApplicationUpdateRequest

type ApplicationUpdateRequest struct {
	ApplicationID int64                        `json:"-" path:"applicationId"`
	Body          ApplicationUpdateRequestBody `json:"body"`
}

ApplicationUpdateRequest 应用更新 PUT /api/applications/<applicationId>

type ApplicationUpdateRequestBody

type ApplicationUpdateRequestBody struct {
	Logo string `json:"logo"`

	// 应用描述信息
	Desc string `json:"desc"`

	// 展示名称
	DisplayName string `json:"displayName"`

	// 配置信息,eg: 钉钉通知地址
	Config map[string]interface{} `json:"config"`

	RepoConfig *GitRepoConfig `json:"repoConfig"`

	// 是否公开
	IsPublic bool `json:"isPublic"`
}

ApplicationUpdateRequestBody 应用更新请求body

type ApplicationUpdateResponse

type ApplicationUpdateResponse struct {
	Header
	Data interface{} `json:"data"`
}

ApplicationUpdateResponse 应用更新响应结构

type ApplicationUsageFetchResponse

type ApplicationUsageFetchResponse struct {
	Header
	Data []ApplicationUsageFetchResponseData `json:"data"`
}

type ApplicationUsageFetchResponseData

type ApplicationUsageFetchResponseData struct {
	ID           string  `json:"id"`
	Name         string  `json:"name"`
	Instance     int     `json:"instance"`
	UnhealthyNum int     `json:"unhealthy"` // 项目对应的实例不健康数量
	Memory       float64 `json:"memory"`    // 分配的内存大小单位(MB)
	Disk         float64 `json:"disk"`      // 分配的磁盘大小单位(MB)
	CPU          float64 `json:"cpu"`
}

ApplicationUsageFetchResponseData 应用资源分配

type ApplicationWorkspace

type ApplicationWorkspace struct {
	ClusterName string `json:"clusterName"` // TODO deprecated

	// 工作空间 DEV,TEST,STAGING,PROD
	Workspace       string `json:"workspace"`
	ConfigNamespace string `json:"configNamespace"`
}

ApplicationWorkspace 应用工作空间

type ApprovalStatus

type ApprovalStatus string

ApprovalStatus 审批流状态

const (
	ApprovalStatusPending  ApprovalStatus = "pending"
	ApprovalStatusApproved ApprovalStatus = "approved"
	ApprovalStatusDeined   ApprovalStatus = "denied"
)

审批流状态集

type ApprovalStatusChangedEvent

type ApprovalStatusChangedEvent struct {
	EventHeader
	Content ApprovalStatusChangedEventData `json:"content"`
}

ApprovalStatusChangedEvent 审批流状态变更事件

type ApprovalStatusChangedEventData

type ApprovalStatusChangedEventData struct {
	ApprovalID     uint64         `json:"approvalID"`
	ApprovalStatus ApprovalStatus `json:"approvalStatus"`
	ApprovalType   ApproveType    `json:"approvalType"`
}

ApprovalStatusChangedEventData 审批流状态变更事件数据

type ApproveCreateRequest

type ApproveCreateRequest struct {
	OrgID      uint64            `json:"orgId"`
	TargetID   uint64            `json:"targetId"`   // 审批目标 ID,如 appId
	EntityID   uint64            `json:"entityId"`   // 证书 ID
	TargetName string            `json:"targetName"` // 审批目标名称,如 appName
	Type       ApproveType       `json:"type"`       // 审批类型:certificate/lib-reference/unblock-application
	Extra      map[string]string `json:"extra"`
	Title      string            `json:"title"`
	Priority   string            `json:"priority"`
	Desc       string            `json:"desc"`
}

ApproveCreateRequest POST /api/approves 创建审批请求结构

type ApproveCreateResponse

type ApproveCreateResponse struct {
	Header
	Data ApproveDTO `json:"data"`
}

ApproveCreateResponse POST /api/approves 创建审批响应结构

type ApproveDTO

type ApproveDTO struct {
	ID           uint64            `json:"id"`
	OrgID        uint64            `json:"orgId"`
	EntityID     uint64            `json:"entityId"`
	TargetID     uint64            `json:"targetId"`   // 审批目标 ID,如 appId
	TargetName   string            `json:"targetName"` // 审批目标名称,如 appName
	Type         ApproveType       `json:"type"`       // 审批类型:certificate/lib-reference
	Extra        map[string]string `json:"extra"`
	Title        string            `json:"title"`
	Priority     string            `json:"priority"`
	Desc         string            `json:"desc"`
	Status       ApprovalStatus    `json:"status"`
	Submitter    string            `json:"submitter"`
	Approver     string            `json:"approver"`
	ApprovalTime *time.Time        `json:"approvalTime"` // 审批时间
	CreatedAt    time.Time         `json:"createdAt"`    // 创建时间
	UpdatedAt    time.Time         `json:"updatedAt"`    // 更新时间
}

ApproveDTO 审批信息结构

type ApproveDeleteResponse

type ApproveDeleteResponse struct {
	Header
	Data uint64 `json:"data"`
}

ApproveDeleteResponse DELETE /api/approves/{approveId} 取消审批响应结构

type ApproveDetailResponse

type ApproveDetailResponse struct {
	Header
	ApproveDTO `json:"data"`
}

ApproveDetailResponse GET /api/approves/{approveId} 审批详情响应结构

type ApproveListRequest

type ApproveListRequest struct {
	OrgID    uint64   `json:"orgId"`
	Status   []string `query:"status"`
	PageNo   int      `query:"pageNo"`
	PageSize int      `query:"pageSize"`
	ID       *int64   `query:"id"`
}

ApproveListRequest GET /api/Approve 获取证书列表请求

type ApproveType

type ApproveType string

ApproveType 证书类型

const (
	ApproveCeritficate       ApproveType = "certificate"
	ApproveLibReference      ApproveType = "lib-reference"
	ApproveUnblockAppication ApproveType = "unblock-application"
)

审批流状态集

type ApproveUpdateRequest

type ApproveUpdateRequest struct {
	OrgID    uint64            `json:"orgId"`
	Extra    map[string]string `json:"extra"`
	Priority string            `json:"priority"`
	Desc     string            `json:"desc"`
	Status   ApprovalStatus    `json:"status"`
	Approver string            `json:"approver"`
}

ApproveUpdateRequest PUT /api/approves/{approveId} 更新审批请求结构

type ApproveUpdateResponse

type ApproveUpdateResponse struct {
	Header
	Data interface{} `json:"data"`
}

ApproveUpdateResponse PUT /api/approves/{approveId} 更新审批响应结构

type AssetVersionDetailURI

type AssetVersionDetailURI struct {
	AssetID   string      `json:"assetID"`
	VersionID interface{} `json:"versionID"`
}

type AtomicIndexDTO

type AtomicIndexDTO struct {
	ExtBaseParam
	Type string `json:"type"`
	// contains filtered or unexported fields
}

type AttachDest

type AttachDest struct {
	//runtime.Service[x].Namespace
	Namespace string

	Service string
	// 容器中的路径
	Path string
}

AttachDest Volume Attach 目的地的信息

type AttempTestURIParams

type AttempTestURIParams struct {
	AssetID        string
	SwaggerVersion string
}

type AttrDTO

type AttrDTO struct {
	BaseParam
	Type string `json:"type"`
}

type AttrData

type AttrData struct {
	// contains filtered or unexported fields
}

type Attribute

type Attribute struct {
	Likes   []string `json:"like"`
	UnLikes []string `json:"unlike"`
}

Attribute dice_tags like & unlike

type Audit

type Audit struct {
	ID int64 `json:"id"`
	// +required 用户id
	UserID string `json:"userId"`
	// +required scope type
	ScopeType ScopeType `json:"scopeType"`
	// +required scope id
	ScopeID uint64 `json:"scopeId"`
	// +optional fdp项目id
	FDPProjectID string `json:"fdpProjectId"`
	// +optional 企业id
	OrgID uint64 `json:"orgId"`
	// +optional 项目id
	ProjectID uint64 `json:"projectId"`
	// +optional 应用id
	AppID uint64 `json:"appId"`
	// +optional 事件上下文,前端用来渲染的键值对,如appName,projectName
	Context map[string]interface{} `json:"context"`
	// +required 前端模版名,告诉前端应该用哪个模版来渲染
	TemplateName TemplateName `json:"templateName"`
	// +optional  事件等级
	AuditLevel string `json:"auditLevel"`
	// +required 操作结果
	Result Result `json:"result"`
	// +optional 如果失败,可以记录失败原因
	ErrorMsg string `json:"errorMsg"`
	// +required 事件开始时间
	StartTime string `json:"startTime"`
	// +required 事件结束时间
	EndTime string `json:"endTime"`
	// +optional 客户端地址
	ClientIP string `json:"clientIp"`
	// +optional 客户端类型
	UserAgent string `json:"userAgent"`
}

Audit 审计事件具体信息

type AuditBatchCreateRequest

type AuditBatchCreateRequest struct {
	Audits []Audit `json:"audits"`
}

AuditBatchCreateRequest 审计事件批量创建请求

type AuditBatchCreateResponse

type AuditBatchCreateResponse struct {
	Header
	Data string `json:"data"`
}

AuditBatchCreateResponse 审计事件批量创建响应

type AuditCreateRequest

type AuditCreateRequest struct {
	Audit `json:"audits"`
}

AuditCreateRequest 审计事件创建接口

type AuditCreateResponse

type AuditCreateResponse struct {
	Header
	Data string `json:"data"`
}

AuditCreateResponse 审计事件创建响应

type AuditListCleanCronRequest

type AuditListCleanCronRequest struct {
	// +required 企业ID
	OrgID uint64 `query:"orgId"`
}

AuditListCleanCronRequest 审计事件清理周期查看接口

type AuditListCleanCronResponse

type AuditListCleanCronResponse struct {
	Header
	UserInfoHeader
	Data *AuditListCleanCronResponseData `json:"data"`
}

AuditListCleanCronResponse 审计事件清理周期查看响应

type AuditListCleanCronResponseData

type AuditListCleanCronResponseData struct {
	Interval uint64 `json:"interval"`
}

type AuditSetCleanCronRequest

type AuditSetCleanCronRequest struct {
	// +required 企业ID
	OrgID uint64 `json:"orgId"`
	// +required 事件清理周期
	Interval uint64 `json:"interval"`
}

AuditSetCleanCronRequest 审计事件清理周期设置接口

type AuditSetCleanCronResponse

type AuditSetCleanCronResponse struct {
	Header
	Data uint64 `json:"data"`
}

AuditSetCleanCronResponse 审计事件清理周期设置响应

type AuditTemplateDetail

type AuditTemplateDetail struct {
	Desc    string            `json:"desc"`
	Success map[string]string `json:"success"`
	Fail    map[string]string `json:"fail"`
}

AuditTemplateDetail 单个审计模版

func (*AuditTemplateDetail) ConvertContent2GoTemplateFormart

func (atd *AuditTemplateDetail) ConvertContent2GoTemplateFormart()

ConvertContent2GoTemplateFormart 转成gotemplate能解析的模版

type AuditTemplateMap

type AuditTemplateMap map[TemplateName]AuditTemplateDetail

AuditTemplateMap 解析前端审计模版全家桶

type AuditsListRequest

type AuditsListRequest struct {
	// +required 是否是查看系统的事件
	Sys bool `schema:"sys"`
	// +required 企业ID
	OrgID uint64 `schema:"orgId"`
	// +required 事件开始时间
	StartAt string `schema:"startAt"`
	// +required 事件结束事件
	EndAt string `schema:"endAt"`
	// +optional fdp项目id
	FDPProjectID string `schema:"fdpProjectId"`
	// +optional 通过用户id过滤事件
	UserID []string `schema:"userId"`
	// default 1
	PageNo int `schema:"pageNo"`
	// default 20
	PageSize int `schema:"pageSize"`
}

AuditsListRequest GET /api/audits/actions/list 审计事件查询请求结构

func (*AuditsListRequest) Check

func (a *AuditsListRequest) Check() error

Check 检查 AuditsListRequest 是否合法

type AuditsListResponse

type AuditsListResponse struct {
	Header
	UserInfoHeader
	Data *AuditsListResponseData `json:"data"`
}

AuditsListResponse 审计事件分页查询响应

type AuditsListResponseData

type AuditsListResponseData struct {
	Total int     `json:"total"`
	List  []Audit `json:"list"`
}

AuditsListResponseData 审计事件分页查询具体数据

type Authentication

type Authentication string
const (
	AuthenticationKeyAuth  Authentication = "key-auth"
	AuthenticationSignAuth Authentication = "sign-auth"
	AuthenticationOAuth2   Authentication = "oauth2"
)

func (Authentication) ToLower

func (s Authentication) ToLower() Authentication

type Authorization

type Authorization string
const (
	AuthorizationAuto   Authorization = "auto"
	AuthorizationManual Authorization = "manual"
)

func (Authorization) ToLower

func (s Authorization) ToLower() Authorization

func (Authorization) Valid

func (s Authorization) Valid() bool

type Authorize

type Authorize struct {
	// 权限key
	Key      string `json:"key"`
	TargetId string `json:"targetId"`
}

type AutoRenewCloudResourceEcsRequest

type AutoRenewCloudResourceEcsRequest struct {
	Vendor      string   `json:"vendor"`
	Region      string   `json:"region"`
	InstanceIds []string `json:"instanceIds"`
	Duration    int      `json:"duration"`
	Switch      bool     `json:"switch"`
}

type AutoTestAPIConfig

type AutoTestAPIConfig struct {
	Domain string                        `json:"domain"`
	Header map[string]string             `json:"header"`
	Global map[string]AutoTestConfigItem `json:"global"`
}

func (AutoTestAPIConfig) BasicValidate

func (cfg AutoTestAPIConfig) BasicValidate() error

type AutoTestCaseSavePipelineRequest

type AutoTestCaseSavePipelineRequest struct {
	Inode string `json:"inode"`

	PipelineYml string             `json:"pipelineYml"`
	RunParams   []PipelineRunParam `json:"runParams"`

	IdentityInfo
}

func (AutoTestCaseSavePipelineRequest) BasicValidate

func (req AutoTestCaseSavePipelineRequest) BasicValidate() error

type AutoTestCaseSavePipelineResponse

type AutoTestCaseSavePipelineResponse struct {
	Header
	Data *UnifiedFileTreeNode `json:"data,omitempty"`

	IdentityInfo
}

type AutoTestConfigItem

type AutoTestConfigItem struct {
	Name  string `json:"name"`
	Type  string `json:"type"`
	Value string `json:"value"`
	Desc  string `json:"desc,omitempty"`
}

type AutoTestFileTreeNode

type AutoTestFileTreeNode struct {
	Type      UnifiedFileTreeNodeType
	Scope     string
	ScopeID   string
	Pinode    string `gorm:"type:bigint(20)"` // root dir 的 pinode 为 "0",表示无 pinode
	Inode     string `gorm:"type:bigint(20)"`
	Name      string
	Desc      string
	CreatorID string
	UpdaterID string
}

type AutoTestGlobalConfig

type AutoTestGlobalConfig struct {
	Scope   string `json:"scope"`
	ScopeID string `json:"scopeID"`
	Ns      string `json:"ns"`

	DisplayName string    `json:"displayName,omitempty"`
	Desc        string    `json:"desc,omitempty"`
	CreatorID   string    `json:"creatorID"`
	UpdaterID   string    `json:"updaterID"`
	CreatedAt   time.Time `json:"createdAt,omitempty"`
	UpdatedAt   time.Time `json:"updatedAt,omitempty"`

	APIConfig *AutoTestAPIConfig `json:"apiConfig,omitempty"`
	UIConfig  *AutoTestUIConfig  `json:"uiConfig,omitempty"`
}

func (AutoTestGlobalConfig) GetUserIDs

func (cfg AutoTestGlobalConfig) GetUserIDs() []string

type AutoTestGlobalConfigCreateRequest

type AutoTestGlobalConfigCreateRequest struct {
	Scope   string `json:"scope"`
	ScopeID string `json:"scopeID"`

	DisplayName string `json:"displayName"`
	Desc        string `json:"desc"`

	APIConfig *AutoTestAPIConfig `json:"apiConfig,omitempty"`
	UIConfig  *AutoTestUIConfig  `json:"uiConfig,omitempty"`

	IdentityInfo
}

func (AutoTestGlobalConfigCreateRequest) BasicValidate

func (req AutoTestGlobalConfigCreateRequest) BasicValidate() error

type AutoTestGlobalConfigCreateResponse

type AutoTestGlobalConfigCreateResponse struct {
	Header
	Data *AutoTestGlobalConfig `json:"data,omitempty"`
}

type AutoTestGlobalConfigDeleteRequest

type AutoTestGlobalConfigDeleteRequest struct {
	PipelineCmsNs string `json:"ns"`

	IdentityInfo
}

func (AutoTestGlobalConfigDeleteRequest) BasicValidate

func (req AutoTestGlobalConfigDeleteRequest) BasicValidate() error

type AutoTestGlobalConfigDeleteResponse

type AutoTestGlobalConfigDeleteResponse struct {
	Header
	Data *AutoTestAPIConfig `json:"data,omitempty"`
}

type AutoTestGlobalConfigListRequest

type AutoTestGlobalConfigListRequest struct {
	Scope   string `json:"scope"`
	ScopeID string `json:"scopeID"`

	IdentityInfo
}

func (AutoTestGlobalConfigListRequest) BasicValidate

func (req AutoTestGlobalConfigListRequest) BasicValidate() error

type AutoTestGlobalConfigListResponse

type AutoTestGlobalConfigListResponse struct {
	Header
	Data []AutoTestGlobalConfig `json:"data,omitempty"`
}

type AutoTestGlobalConfigType

type AutoTestGlobalConfigType string
var (
	AutoTestGlobalConfigTypeAPI AutoTestGlobalConfigType = "API"
	AutoTestGlobalConfigTypeUI  AutoTestGlobalConfigType = "UI"
)

type AutoTestGlobalConfigUpdateRequest

type AutoTestGlobalConfigUpdateRequest struct {
	PipelineCmsNs string `json:"ns"`

	DisplayName string `json:"displayName"`
	Desc        string `json:"desc"`

	APIConfig *AutoTestAPIConfig `json:"apiConfig,omitempty"`
	UIConfig  *AutoTestUIConfig  `json:"uiConfig,omitempty"`

	IdentityInfo
}

func (AutoTestGlobalConfigUpdateRequest) BasicValidate

func (req AutoTestGlobalConfigUpdateRequest) BasicValidate() error

type AutoTestGlobalConfigUpdateResponse

type AutoTestGlobalConfigUpdateResponse struct {
	Header
	Data *AutoTestAPIConfig `json:"data,omitempty"`
}

type AutoTestNodeMetaSnippetObj

type AutoTestNodeMetaSnippetObj struct {
	Alias  string                 `json:"alias"`
	Params map[string]interface{} `json:"params"`
}

type AutoTestRunConfigSheet

type AutoTestRunConfigSheet struct {
	RunParams       map[string]interface{} `json:"runParams,omitempty"`
	ConfigSheetID   string                 `json:"configSheetID"`
	ConfigSheetName string                 `json:"configSheetName"`
}

type AutoTestRunCustom

type AutoTestRunCustom struct {
	Commands []string `json:"commands"`
	Image    string   `json:"image"`
}

type AutoTestRunScene

type AutoTestRunScene struct {
	RunParams map[string]interface{} `json:"runParams,omitempty"`
	SceneID   uint64                 `json:"sceneID"`
}

type AutoTestRunStep

type AutoTestRunStep struct {
	ApiSpec map[string]interface{} `json:"apiSpec"`
}

type AutoTestRunWait

type AutoTestRunWait struct {
	WaitTime int `json:"waitTime"`
}

type AutoTestScene

type AutoTestScene struct {
	AutoTestSceneParams
	Name        string                `json:"name"`
	Description string                `json:"description"` // 描述
	PreID       uint64                `json:"preID"`       // 排序的前驱ID
	SetID       uint64                `json:"setID"`       // 场景集ID
	CreateAt    *time.Time            `json:"createAt"`
	UpdateAt    *time.Time            `json:"updateAt"`
	Status      SceneStatus           `json:"status"`    // 最新运行状态
	StepCount   uint64                `json:"stepCount"` // 步骤数量
	Inputs      []AutoTestSceneInput  `json:"inputs"`    // 输入参数
	Output      []AutoTestSceneOutput `json:"output"`    // 输出参数
	Steps       []AutoTestSceneStep   `json:"steps"`     // 步骤
	RefSetID    uint64                `json:"refSetID"`  // 引用场景集ID
}

type AutoTestSceneCopyRef

type AutoTestSceneCopyRef struct {
	PreSetID     uint64 // the id of the copied scene set
	PreSpaceID   uint64 // the id of the copied space
	AfterSetID   uint64 // id of the scene set to be copied
	AfterSpaceID uint64 // id of the space to be copied
}

record the structure of the information before and after the scene collection is copied to update those scenes that refer to the old scene set to refer to the new scene set

type AutoTestSceneInput

type AutoTestSceneInput struct {
	AutoTestSceneParams
	Name        string `json:"name"`
	Description string `json:"description"` // 描述
	Value       string `json:"value"`       // 默认值
	Temp        string `json:"temp"`        // 当前值
	SceneID     uint64 `json:"sceneID"`     // 场景id
}

type AutoTestSceneList

type AutoTestSceneList struct {
	List  []AutoTestScene `json:"list"`
	Total uint64          `json:"total"`
}

type AutoTestSceneOutput

type AutoTestSceneOutput struct {
	AutoTestSceneParams
	Name        string `json:"name"`
	Description string `json:"description"` // 描述
	Value       string `json:"value"`
	SceneID     uint64 `json:"sceneID"`
}

type AutoTestSceneParams

type AutoTestSceneParams struct {
	ID        uint64 `json:"id,omitempty"`
	SpaceID   uint64 `json:"spaceID,omitempty"`   // 场景所属测试空间ID
	CreatorID string `json:"creatorID,omitempty"` // 创建者
	UpdaterID string `json:"updaterID,omitempty"` // 更新者
}

type AutoTestSceneStep

type AutoTestSceneStep struct {
	AutoTestSceneParams
	Type      StepAPIType         `json:"type"`    // 类型
	Method    StepAPIMethod       `json:"method"`  // method
	Value     string              `json:"value"`   // 值
	Name      string              `json:"name"`    // 名称
	PreID     uint64              `json:"preID"`   // 排序id
	PreType   PreType             `json:"preType"` // 串行/并行类型
	SceneID   uint64              `json:"sceneID"` // 场景ID
	SpaceID   uint64              `json:"spaceID"` // 所属测试空间ID
	CreatorID string              `json:"creatorID"`
	UpdaterID string              `json:"updaterID"`
	Children  []AutoTestSceneStep // 并行子节点
	APISpecID uint64              `json:"apiSpecID"` // api集市id
}

type AutoTestSpace

type AutoTestSpace struct {
	ID          uint64              `json:"id"`
	Name        string              `json:"name"`
	ProjectID   int64               `json:"projectId"`
	Description string              `json:"description"`
	CreatorID   string              `json:"creatorId"`
	UpdaterID   string              `json:"updaterId"`
	Status      AutoTestSpaceStatus `json:"status"`
	// 被复制的源测试空间
	SourceSpaceID *uint64 `json:"sourceSpaceId,omitempty"`
	// CreatedAt 创建时间
	CreatedAt time.Time `json:"createdAt"`
	// UpdatedAt 更新时间
	UpdatedAt time.Time `json:"updatedAt"`
	// DeletedAt 删除时间
	DeletedAt *time.Time `json:"deletedAt"`
}

AutoTestSpace 测试空间

func (AutoTestSpace) IsOpen

func (a AutoTestSpace) IsOpen() bool

type AutoTestSpaceCopy

type AutoTestSpaceCopy struct {
	Name      string `json:"name"`
	SourceID  uint64 `json:"sourceId"`
	ProjectID int64  `json:"projectId"`
}

AutoTestSpaceCopy 测试空间复制

type AutoTestSpaceCreateRequest

type AutoTestSpaceCreateRequest struct {
	Name          string  `json:"name"`
	ProjectID     int64   `json:"projectId"`
	Description   string  `json:"description"`
	SourceSpaceID *uint64 `json:"sourceSpaceId"`

	IdentityInfo
}

AutoTestSpaceCreateRequest 测试空间创建请求

type AutoTestSpaceList

type AutoTestSpaceList struct {
	List  []AutoTestSpace `json:"list"`
	Total int             `json:"total"`
}

AutoTestSpaceList 获取测试空间列表

type AutoTestSpaceListResponse

type AutoTestSpaceListResponse struct {
	Header
	Data *AutoTestSpaceList `json:"data"`
}

AutoTestSpaceListResponse 获取测试空间列表响应

type AutoTestSpaceResponse

type AutoTestSpaceResponse struct {
	Header
	Data *AutoTestSpace `json:"data"`
}

AutoTestSpaceCreateResponse 测试空间创建响应

type AutoTestSpaceStatus

type AutoTestSpaceStatus string

AutoTestSpaceStatus 测试空间状态

var (
	// TestSpaceCopying 复制中
	TestSpaceCopying AutoTestSpaceStatus = "copying"
	// TestSpaceLocked 被(复制)锁定
	TestSpaceLocked AutoTestSpaceStatus = "locked"
	// TestSpaceOpen open
	TestSpaceOpen AutoTestSpaceStatus = "open"
	// TestSpaceFailed (复制)失败
	TestSpaceFailed AutoTestSpaceStatus = "failed"
)

type AutoTestUIConfig

type AutoTestUIConfig struct {
}

func (AutoTestUIConfig) BasicValidate

func (cfg AutoTestUIConfig) BasicValidate() error

type AutoTestsScope

type AutoTestsScope string
var (
	AutoTestsScopeProject         AutoTestsScope = "project"
	AutoTestsScopeProjectTestPlan AutoTestsScope = "project-testplan" // 测试计划单独的目录树
)

type AutoopOutputLine

type AutoopOutputLine struct {
	Stream string `json:"stream"`
	Node   string `json:"node"`
	Host   string `json:"host"`
	Body   string `json:"body"`
}

AutoopOutputLine 自动化运维脚本执行时输出的行内容

type AutotestCancelSceneRequest

type AutotestCancelSceneRequest struct {
	AutoTestScene AutoTestScene `json:"scene"`
	UserID        string        `json:"userId"`
	IdentityInfo  IdentityInfo  `json:"identityInfo"`
}

type AutotestCancelSceneResponse

type AutotestCancelSceneResponse struct {
	Header
	Data string `json:"data"`
}

type AutotestCancelTestPlansRequest

type AutotestCancelTestPlansRequest struct {
	TestPlan TestPlanV2 `json:"testPlan"`
	UserID   string     `json:"userId"`
}

type AutotestCancelTestPlansResponse

type AutotestCancelTestPlansResponse struct {
	Header
	Data string `json:"data"`
}

type AutotestCreateSceneResponse

type AutotestCreateSceneResponse struct {
	Header
	Data uint64 `json:"data"`
}

type AutotestExecuteSceneRequest

type AutotestExecuteSceneRequest struct {
	AutoTestScene          AutoTestScene     `json:"scene"`
	ClusterName            string            `json:"clusterName"`
	Labels                 map[string]string `json:"labels"`
	UserID                 string            `json:"userId"`
	ConfigManageNamespaces string            `json:"configManageNamespaces"`
	IdentityInfo           IdentityInfo      `json:"identityInfo"`
}

type AutotestExecuteSceneResponse

type AutotestExecuteSceneResponse struct {
	Header
	Data *PipelineDTO `json:"data"`
}

type AutotestExecuteSceneStepRequest

type AutotestExecuteSceneStepRequest struct {
	SceneStepID            uint64       `json:"sceneStepID"`
	UserID                 string       `json:"userId"`
	ConfigManageNamespaces string       `json:"configManageNamespaces"`
	IdentityInfo           IdentityInfo `json:"identityInfo"`
}

type AutotestExecuteSceneStepResp

type AutotestExecuteSceneStepResp struct {
	Header
	Data *AutotestExecuteSceneStepRespData `json:"data"`
}

type AutotestExecuteSceneStepRespData

type AutotestExecuteSceneStepRespData struct {
	Info    *APIRequestInfo       `json:"requestInfo"`
	Resp    *APIResp              `json:"respInfo"`
	Asserts *APITestsAssertResult `json:"asserts"`
}

type AutotestExecuteTestPlansRequest

type AutotestExecuteTestPlansRequest struct {
	TestPlan               TestPlanV2        `json:"testPlan"`
	ClusterName            string            `json:"clusterName"`
	Labels                 map[string]string `json:"labels"`
	UserID                 string            `json:"userId"`
	ConfigManageNamespaces string            `json:"configManageNamespaces"`
	IdentityInfo           IdentityInfo      `json:"userId"`
}

type AutotestExecuteTestPlansResponse

type AutotestExecuteTestPlansResponse struct {
	Header
	Data *PipelineDTO `json:"data"`
}

type AutotestGetSceneInputResponse

type AutotestGetSceneInputResponse struct {
	Header
	Data []AutoTestSceneInput `json:"data"`
}

type AutotestGetSceneOutputResponse

type AutotestGetSceneOutputResponse struct {
	Header
	Data []AutoTestSceneOutput `json:"data"`
}

type AutotestGetSceneResponse

type AutotestGetSceneResponse struct {
	Header
	Data AutoTestScene `json:"data"`
}

type AutotestGetSceneStepOutPutResponse

type AutotestGetSceneStepOutPutResponse struct {
	Header
	Data map[string]string `json:"data"`
}

type AutotestGetSceneStepReq

type AutotestGetSceneStepReq struct {
	ID     uint64 `json:"id"`
	UserID string `json:"userId"`
}

type AutotestGetSceneStepResp

type AutotestGetSceneStepResp struct {
	Header
	Data AutoTestSceneStep `json:"data"`
}

type AutotestGetSceneStepResponse

type AutotestGetSceneStepResponse struct {
	Header
	Data []AutoTestSceneStep `json:"data"`
}

type AutotestListSceneResponse

type AutotestListSceneResponse struct {
	Header
	Data AutoTestSceneList `json:"data"`
}

type AutotestListStepOutPutRequest

type AutotestListStepOutPutRequest struct {
	IdentityInfo
	List []AutoTestSceneStep `json:"list"`
}

type AutotestSceneCopyRequest

type AutotestSceneCopyRequest struct {
	PreID   uint64 `json:"preID"`   // 目标前节点
	SceneID uint64 `json:"sceneID"` // 被复制场景ID
	SetID   uint64 `json:"setID"`   // 目标场景集
	SpaceID uint64 `json:"spaceID"` // 目标测试空间
	IdentityInfo
}

type AutotestSceneInputUpdateRequest

type AutotestSceneInputUpdateRequest struct {
	AutotestSceneRequest
	List []AutoTestSceneInput `json:"list"`
	IdentityInfo
}

type AutotestSceneOutputUpdateRequest

type AutotestSceneOutputUpdateRequest struct {
	AutotestSceneRequest
	List []AutoTestSceneOutput `json:"list"`
	IdentityInfo
}

type AutotestSceneRequest

type AutotestSceneRequest struct {
	AutoTestSceneParams
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"` // 描述
	Value       string `json:"value,omitempty"`       // 默认值
	Temp        string `json:"temp,omitempty"`        // 当前值
	SceneID     uint64 `json:"sceneID,omitempty"`     // 场景ID
	SetID       uint64 `json:"setID,omitempty"`       // 场景集ID
	APISpecID   uint64 `json:"apiSpecID,omitempty"`   // api集市id
	RefSetID    uint64 `json:"refSetID,omitempty"`    // 引用场景集的ID

	Type     StepAPIType `json:"type,omitempty"`
	Target   int64       `json:"target,omitempty"`   // 目标位置
	GroupID  int64       `json:"groupID,omitempty"`  // 串行ID
	PreType  PreType     `json:"preType,omitempty"`  // 并行/并行
	Position int64       `json:"position,omitempty"` // 插入位置 (-1为前/1为后)
	IsGroup  bool        `json:"isGroup,omitempty"`  // 是否整组移动

	PageNo   uint64 `json:"pageNo"`
	PageSize uint64 `json:"pageSize"`

	IdentityInfo
}

func (*AutotestSceneRequest) URLQueryString

func (ats *AutotestSceneRequest) URLQueryString() map[string][]string

type AutotestSceneSceneUpdateRequest

type AutotestSceneSceneUpdateRequest struct {
	SceneID     uint64      `json:"sceneID"`
	Name        string      `json:"name"`
	Description string      `json:"description"`
	Status      SceneStatus `json:"status"`
	SetID       uint64      `json:"setID"`
	IsStatus    bool        `json:"isStatus"` // 为true的情况下不会改变更新人
	IdentityInfo
}

type AutotestScenesModalResponse

type AutotestScenesModalResponse struct {
	Header
	Data map[uint64]AutoTestScene `json:"data"`
}

type AutotestScenesRequest

type AutotestScenesRequest struct {
	AutoTestSceneParams
	SetIDs []uint64 `json:"setIds"`

	IdentityInfo
}

type BackupList

type BackupList struct {
	ID          uint64     `json:"id"`
	UUID        string     `json:"uuid"`
	DisplayName string     `json:"name"`
	ByteSize    int64      `json:"size"`
	DownloadURL string     `json:"url"`
	Type        FileType   `json:"type"`
	From        string     `json:"from"`
	Username    string     `json:"creator", gorm:"username"`
	CreatedAt   time.Time  `json:"createdAt"`
	UpdatedAt   time.Time  `json:"updatedAt"`
	ExpiredAt   *time.Time `json:"expiredAt,omitempty"`
	CommitID    string     `json:"commitId"`
	Remark      string     `json:"remark"`
}

BackupList 备份列表

type BackupListResponse

type BackupListResponse struct {
	RepoFiles []BackupList `json:"files"`
	Total     int          `json:"total"`
}

BackupListResponse 获取备份列表响应

type BaseModel

type BaseModel struct {
	ID        uint64    `json:"id"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
	CreatorID string    `json:"creatorID"`
	UpdaterID string    `json:"updaterID"`
}

type BaseParam

type BaseParam struct {
	EnName string `json:"enName"`
	CnName string `json:"cnName"`
	Desc   string `json:"desc"`
}

onedata基本参数

type BaseResource

type BaseResource struct {
	CPU float64 `json:"cpu"`
	// Mem 内存大小
	Mem float64 `json:"mem"`
}

type BaseResponse

type BaseResponse struct {
	Success bool             `json:"success"`
	Err     *BaseResponseErr `json:"err,omitempty"`
	Data    json.RawMessage  `json:"data"`
}

type BaseResponseErr

type BaseResponseErr struct {
	Code string `json:"code"`
	Msg  string `json:"msg"`
}

func (*BaseResponseErr) Error

func (e *BaseResponseErr) Error() string

type BasicCloudConf

type BasicCloudConf struct {
	Region          string `json:"region"`
	AccessKeyId     string `json:"accessKeyId"`
	AccessKeySecret string `json:"accessKeySecret"`
}

mns

type BasicTestCase

type BasicTestCase struct {
	Id            uint64     `json:"id"`
	TestSetId     uint64     `json:"testSetId"`     // 所属测试集id
	ProjectId     uint64     `json:"projectId"`     // 当前项目id
	UpdatedId     uint64     `json:"updatedID"`     // 更新者id
	CreatorId     uint64     `json:"creatorID"`     // 创建者id
	Recycled      bool       `json:"recycled"`      // 是否回收,0:不回收,1:回收
	Desc          string     `json:"desc"`          // 注释
	Name          string     `json:"name"`          // 用例名称
	From          string     `json:"from"`          // 来源
	Priority      string     `json:"priority"`      // 优先级
	PreCondition  string     `json:"preCondition"`  // 前置条件
	TagIds        string     `json:"tagIds"`        // 目标id列表
	Result        string     `json:"result"`        // 测试执行结果
	StepAndResult string     `json:"stepAndResult"` // 步骤及结果
	CreatedAt     *time.Time `json:"createdAt"`     // 创建时间
	UpdatedAt     *time.Time `json:"updatedAt"`     // 更新时间
}

BasicTestCase 测试用例Basic DTO

type BatchSnippetConfigYml

type BatchSnippetConfigYml struct {
	Config SnippetConfig `json:"config"`
	Yml    string        `json:"yml"`
}

type BatchUpgradeEdgeClusterRequest

type BatchUpgradeEdgeClusterRequest struct {
	Clusters []UpgradeClusterInfo `json:"clusters"`
}

type BatchUpgradeEdgeClusterResponse

type BatchUpgradeEdgeClusterResponse struct {
	Header
}

type BigdataConf

type BigdataConf struct {
	BigdataMetadata `json:"metadata"`
	Spec            BigdataSpec `json:"spec"`
}

type BigdataMetadata

type BigdataMetadata struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
}

type BigdataResource

type BigdataResource struct {
	CPU     string `json:"cpu"`
	Memory  string `json:"memory"`
	Replica int32  `json:"replica"`
}

type BigdataSpec

type BigdataSpec struct {
	Image      string            `json:"image,omitempty"`
	Resource   string            `json:"resource,omitempty"`
	Class      string            `json:"class,omitempty"`
	Args       []string          `json:"args,omitempty"`
	Envs       []corev1.EnvVar   `json:"envs,omitempty"`
	Properties map[string]string `json:"properties,omitempty"`
	FlinkConf  *FlinkConf        `json:"flinkConf,omitempty"`
	SparkConf  *SparkConf        `json:"sparkConf,omitempty"`
}

type Bind

type Bind struct {
	// ContainerPath 指容器路径
	ContainerPath string `json:"containerPath"`
	// HostPath 指宿主机路径
	HostPath string `json:"hostPath"`
	// ReadOnly 是可选的,默认值是 false (read/write)
	ReadOnly bool `json:"readOnly,omitempty"`
}

Bind 定义宿主机上的路径挂载到容器中

type Blame

type Blame struct {
	//起始行号
	StartLineNo int `json:"startLineNo"`
	//结束行号
	EndLineNo int `json:"endLineNo"`
	//提交commit
	Commit *Commit `json:"commit"`
}

Blame 单条Blame信息

type BlockoutConfig

type BlockoutConfig struct {
	BlockDEV   bool `json:"blockDev"`
	BlockTEST  bool `json:"blockTest"`
	BlockStage bool `json:"blockStage"`
	BlockProd  bool `json:"blockProd"`
}

type Branch

type Branch struct {
	ID     string  `json:"id"`
	Name   string  `json:"name"`
	Commit *Commit `json:"commit"`
}

Branch 分支

type BranchInfo

type BranchInfo struct {
	ID           string  `json:"id"`
	Name         string  `json:"name"`
	Commit       *Commit `json:"commit"`
	OperatorID   string  `json:"operatorId"`
	OperatorName string  `json:"operatorName"`
	Link         string  `json:"link"`
	EventName    string  `json:"eventName"`
}

BranchInfo 分支详情

type BranchRule

type BranchRule struct {
	ID        int64     `json:"id"`
	ScopeType ScopeType `json:"scopeType"`
	ScopeID   int64     `json:"scope_id"`
	Desc      string    `json:"desc"`
	// 分支规则 eg:master,feature/*
	Rule              string `json:"rule"`
	IsProtect         bool   `json:"isProtect"`
	IsTriggerPipeline bool   `json:"isTriggerPipeline"`
	// project级别
	NeedApproval bool `json:"needApproval"`
	// 通过分支创建的流水线环境
	Workspace string `json:"workspace"`
	// 制品可部署的环境
	ArtifactWorkspace string `json:"artifactWorkspace"`
}

type BuildArtifact

type BuildArtifact struct {
	ID           int64  `json:"id"`
	Sha256       string `json:"sha256"`
	IdentityText string `json:"identityText"`
	Type         string `json:"type"`
	Content      string `json:"content"`
	ClusterName  string `json:"clusterName"`
	PipelineID   uint64 `json:"pipelineID"`
}

type BuildArtifactDeleteByImagesRequest

type BuildArtifactDeleteByImagesRequest struct {
	Images []string `json:"images"`
}

type BuildArtifactQueryResponse

type BuildArtifactQueryResponse struct {
	Header
	Data *BuildArtifact `json:"data"`
}

type BuildArtifactRegisterRequest

type BuildArtifactRegisterRequest struct {
	SHA          string `json:"sha"`
	IdentityText string `json:"identity_text"`
	Type         string `json:"type"`
	Content      string `json:"content"`
	ClusterName  string `json:"cluster_name"`
	PipelineID   uint64 `json:"pipelineID"`
}

type BuildArtifactRegisterResponse

type BuildArtifactRegisterResponse struct {
	Header
	Data *BuildArtifact `json:"data"`
}

type BuildArtifactType

type BuildArtifactType string
const (
	BuildArtifactOfNfsLink     BuildArtifactType = "NFS_LINK "
	BuildArtifactOfFileContent BuildArtifactType = "FILE_CONTENT "
)

type BuildCacheImageReportRequest

type BuildCacheImageReportRequest struct {
	Action      string `json:"action"`
	Name        string `json:"name"`
	ClusterName string `json:"clusterName"`
}

type BuildCacheImageReportResponse

type BuildCacheImageReportResponse struct {
	Header
}

type BuildError

type BuildError struct {
	Code    string `json:"code"`
	Message string `json:"msg"`
}

BuildError 构建错误结构

type BusinessDomainDTO

type BusinessDomainDTO struct {
	BaseParam
}

type BusinessProcessDTO

type BusinessProcessDTO struct {
	ExtBaseParam
}

type BusinessProcessData

type BusinessProcessData struct {
	// contains filtered or unexported fields
}

type CICDPipelineListRequest

type CICDPipelineListRequest struct {
	Branches string `schema:"branches"`
	Sources  string `schema:"sources"`
	YmlNames string `schema:"ymlNames"`
	Statuses string `schema:"statuses"`
	AppID    uint64 `schema:"appID"`
	PageNum  int    `schema:"pageNum"`
	PageSize int    `schema:"pageSize"`
}

CICDPipelineListRequest /api/cicds 获取 pipeline 列表

type CICDPipelineYmlListRequest

type CICDPipelineYmlListRequest struct {
	AppID  int64  `schema:"appID"`
	Branch string `schema:"branch"`
}

CICDPipelineYmlListRequest /api/cicds/actions/pipelineYmls 获取 pipeline yml列表

type CICDPipelineYmlListResponse

type CICDPipelineYmlListResponse struct {
	Data []string `json:"data"`
}

CICDPipelineYmlListResponse

type CapacityInfoData

type CapacityInfoData struct {
	ElasticsearchOperator bool `json:"elasticsearchOperator"`
	RedisOperator         bool `json:"redisOperator"`
	MysqlOperator         bool `json:"mysqlOperator"`
	DaemonsetOperator     bool `json:"daemonsetOperator"`
}

type CapacityInfoRequest

type CapacityInfoRequest struct {
	ClusterName string `query:"clusterName"`
}

type CapacityInfoResponse

type CapacityInfoResponse struct {
	Header
	Data CapacityInfoData `json:"data"`
}

type CardinalityResultDataMapInterfaceValue

type CardinalityResultDataMapInterfaceValue struct {
	Agg  string      `json:"agg"`
	Data interface{} `json:"data"`
	Name string      `json:"name"`
	Unit string      `json:"unit"`
	Tag  string      `json:"tag"`
}

type CardinalityResultDataMapSingleValue

type CardinalityResultDataMapSingleValue struct {
	Agg  string  `json:"agg"`
	Data float64 `json:"data"`
	Name string  `json:"name"`
	Tag  string  `json:"tag"`
}

type CardinalityResultDataMapValue

type CardinalityResultDataMapValue struct {
	Agg  string   `json:"agg"`
	Data []uint64 `json:"data"`
	Name string   `json:"name"`
	Tag  string   `json:"tag"`
}

type CardinalityResultInterfaceItem

type CardinalityResultInterfaceItem struct {
	Name string                                              `json:"name"`
	Data []map[string]CardinalityResultDataMapInterfaceValue `json:"data"`
}

type CardinalityResultItem

type CardinalityResultItem struct {
	Name string                                      `json:"name"`
	Data []map[string]*CardinalityResultDataMapValue `json:"data"`
}

type CardinalityResultSingleItem

type CardinalityResultSingleItem struct {
	Name string                                           `json:"name"`
	Data []map[string]CardinalityResultDataMapSingleValue `json:"data"`
}

type CardinalityResults

type CardinalityResults struct {
	Times   []uint64                `json:"time"`
	Title   string                  `json:"title"`
	Total   uint64                  `json:"total"`
	Results []CardinalityResultItem `json:"results"`
}

type CardinalityResultsInterface

type CardinalityResultsInterface struct {
	Times   []uint64                         `json:"time"`
	Title   string                           `json:"title"`
	Total   uint64                           `json:"total"`
	Results []CardinalityResultInterfaceItem `json:"results"`
}

type CardinalityResultsSingle

type CardinalityResultsSingle struct {
	Times   []uint64                      `json:"time"`
	Title   string                        `json:"title"`
	Total   uint64                        `json:"total"`
	Results []CardinalityResultSingleItem `json:"results"`
}

type CaseParams

type CaseParams struct {
	Key   string      `json:"key"`
	Type  string      `json:"type"`
	Value interface{} `json:"value"`
}

CaseParams 传递case内出入参的全局变量

type CertificateCreateRequest

type CertificateCreateRequest struct {
	OrgID       uint64                `json:"orgId"`
	Type        string                `json:"type"` // IOS发布证书/Android证书/消息推送证书
	Name        string                `json:"name"` // 证书定义名称
	Desc        string                `json:"desc"`
	AndroidInfo AndroidCertificateDTO `json:"androidInfo"`
	IOSInfo     IOSCertificateDTO     `json:"iosInfo"`
	MessageInfo CertificateFileDTO    `json:"messageInfo"`
}

CertificateCreateRequest POST /api/certificates 创建证书s请求结构

type CertificateCreateResponse

type CertificateCreateResponse struct {
	Header
	Data CertificateDTO `json:"data"`
}

CertificateCreateResponse POST /api/certificates 创建证书响应结构

type CertificateDTO

type CertificateDTO struct {
	ID          uint64                `json:"id"`
	Name        string                `json:"name"`
	Type        string                `json:"type"`
	OrgID       uint64                `json:"orgId"`
	Creator     string                `json:"creator"`
	Operator    string                `json:"operator"`
	Desc        string                `json:"desc"`
	AndroidInfo AndroidCertificateDTO `json:"androidInfo"`
	IOSInfo     IOSCertificateDTO     `json:"iosInfo"`
	MessageInfo CertificateFileDTO    `json:"messageInfo"`
	CreatedAt   time.Time             `json:"createdAt"` // Certificate创建时间
	UpdatedAt   time.Time             `json:"updatedAt"` // Certificate更新时间
}

CertificateDTO 证书结构

type CertificateDeleteResponse

type CertificateDeleteResponse struct {
	Header
	Data CertificateDTO `json:"data"`
}

CertificateDeleteResponse DELETE /api/certificates/{certificateId} 删除证书响应结构

type CertificateDetailResponse

type CertificateDetailResponse struct {
	Header
	CertificateDTO `json:"data"`
}

CertificateDetailResponse GET /api/certificates/{certificateId} 证书详情响应结构

type CertificateFileDTO

type CertificateFileDTO struct {
	UUID     string `json:"uuid"`
	FileName string `json:"fileName"`
}

CertificateFileDTO 证书文件信息

type CertificateListRequest

type CertificateListRequest struct {
	OrgID uint64 `query:"orgId"`

	// 对Certificate名进行like查询
	Query    string `query:"q"`
	Name     string `query:"name"`
	Type     string `query:"type"`
	Status   string `query:"status"`
	PageNo   int    `query:"pageNo"`
	PageSize int    `query:"pageSize"`
}

CertificateListRequest GET /api/certificates 获取证书列表请求

type CertificateListResponse

type CertificateListResponse struct {
	Header
	Data PagingCertificateDTO `json:"data"`
}

CertificateListResponse GET /api/certificates 查询证书响应

type CertificateQuoteRequest

type CertificateQuoteRequest struct {
	CertificateID uint64 `json:"certificateId"`
	AppID         uint64 `json:"appId"`
}

CertificateQuoteRequest POST /api/certificates 应用引用证书

type CertificateType

type CertificateType string
const (
	AndroidCertificateType CertificateType = "Android"
	IOSCertificateType     CertificateType = "IOS"
	MessageCertificateType CertificateType = "Message"
)

type CertificateUpdateRequest

type CertificateUpdateRequest struct {
	UUID     string `json:"uuid"`
	Desc     string `json:"desc"`
	Filename string `json:"filename"`
}

CertificateUpdateRequest PUT /api/certificates/{certificateId} 更新证书请求结构

type CertificateUpdateResponse

type CertificateUpdateResponse struct {
	Header
	Data CertificateDTO `json:"data"`
}

CertificateUpdateResponse PUT /api/certificates/{certificateId} 更新证书响应结构

type ChangeLimitsReq

type ChangeLimitsReq struct {
	Limits []LimitType `json:"limits"`
}

type ChangeMysqlAccountPrivilegeRequest

type ChangeMysqlAccountPrivilegeRequest struct {
	Vendor               string                  `json:"vendor"`
	Region               string                  `json:"region"`
	InstanceID           string                  `json:"instanceID"`
	Account              string                  `json:"account"`
	AccountPrivileges    []MysqlAccountPrivilege `json:"accountPrivileges"`
	OldAccountPrivileges []MysqlAccountPrivilege `json:"oldAccountPrivileges"`
}

type CheckRun

type CheckRun struct {
	ID int64 `json:"id"`
	// 检查任务名称 golang-lint/java-lint/api-test
	Name string `json:"name"`
	// Merge-Request ID
	MrID int64 `json:"mrId"`
	// 检查类型 CI
	Type string `json:"type"`
	// 外部系统 ID
	ExternalID string `json:"externalId"`
	// 提交commitID
	Commit string `json:"commit"`
	// 流水线 ID
	PipelineID string `json:"pipelineId"`
	// 运行状态 in_progress:进行中 completed:已完成
	Status CheckRunStatus `json:"status"`
	// 运行结果 success:成功 failed:失败 cancel:取消 timeout:超时
	Result CheckRunResult `json:"result"`
	Output string         `json:"output"`
	// 完成时间
	CompletedAt *time.Time
	// 创建时间
	CreatedAt time.Time `json:"createdAt"`
	// 仓库ID
	RepoID int64 `json:"repoId"`
}

CheckRun

type CheckRunRequest

type CheckRunRequest struct {
	Path   string `json:"path"`
	MRID   int64  `json:"mrId"`
	Branch string `json:"branch"`
}

type CheckRunResult

type CheckRunResult string

type CheckRunStatus

type CheckRunStatus string

type CheckRuns

type CheckRuns struct {
	CheckRun []*CheckRun    `json:"checkrun"`
	Result   CheckRunResult `json:"result"`
	Mergable bool           `json:"mergable"`
}

type CiV3Builds

type CiV3Builds struct {
	ID               int64             `json:"id,omitempty"`
	ProjectID        int64             `json:"projectId,omitempty"`
	ProjectName      string            `json:"projectName,omitempty"`
	ApplicationID    int64             `json:"applicationId,omitempty"`
	ApplicationName  string            `json:"applicationName,omitempty"`
	GitRepo          string            `json:"gitRepo,omitempty"`
	GitRepoAbbrev    string            `json:"gitRepoAbbrev,omitempty"`
	Branch           string            `json:"branch,omitempty"`
	SubmitUserID     string            `json:"submitUserId,omitempty"`
	Status           string            `json:"status,omitempty"`
	Env              string            `json:"env,omitempty"`
	OrgID            int64             `json:"org_id"`
	ClusterID        int64             `json:"cluster_id"`
	ClusterName      string            `json:"cluster_name"`
	ScheduleExecutor string            `json:"schedule_executor"`
	ServiceExecutor  string            `json:"service_executor"`
	ErrMsg           ErrMsg            `json:"errMsg"`
	ExtraInfo        map[string]string `json:"extra_info"` // envs starts with env_ will set to pipeline.yml

	PipelineCommitId string `json:"pipelineCommitId,omitempty"`
	CommitID         string `json:"commitId,omitempty"`
	CommitUser       string `json:"commitUser,omitempty"`
	CommitEmail      string `json:"commitEmail,omitempty"`
	CommitTime       string `json:"commitTime,omitempty"`
	CommitComment    string `json:"commitComment,omitempty"`
	CodeDir          string `json:"codeDir,omitempty"`
	UUID             string `json:"uuid,omitempty"`
	Pipeline         string `json:"pipeline,omitempty"`

	Avatar         string   `json:"avatar,omitempty"`
	Username       string   `json:"username,omitempty"`
	CancelUsername string   `json:"cancelUsername,omitempty"`
	Envs           []string `json:"envs"`
	TimeTotal      int      `json:"time_total"`
	BuildURL       string   `json:"build_url"`
}

CiV3Builds Pipeline结构

type ClientInfoDto

type ClientInfoDto struct {
	ClientId     string `json:"clientId"`
	ClientSecret string `json:"clientSecret"`
}

type ClientInfoResponse

type ClientInfoResponse struct {
	Header
	Data ClientInfoDto `json:"data"`
}

type ClientModel

type ClientModel struct {
	BaseModel

	OrgID       uint64 `json:"orgID"`
	Name        string `json:"name"`
	Desc        string `json:"desc"`
	ClientID    string `json:"clientID"`
	DisplayName string `json:"displayName"`
}

dice_api_clients

func (ClientModel) TableName

func (m ClientModel) TableName() string

type ClientObj

type ClientObj struct {
	Client *ClientModel `json:"client"`
	SK     *SK          `json:"sk"`
}

type CloudAccount

type CloudAccount struct {
	// 云账号ak
	AccessKeyID string `json:"accessKeyID"`
	// 云账号as
	AccessSecret string `json:"accessSecret"`
}

CloudAccount 云账号信息

type CloudAccountAllInfo

type CloudAccountAllInfo struct {
	CloudAccountInfo
	AccessKeyID     string `json:"accessKeyID"`
	AccessKeySecret string `json:"accessKeySecret"`
}

type CloudAccountCreateRequest

type CloudAccountCreateRequest struct {
	CloudProvider   string `json:"cloudProvider"`
	Name            string `json:"name"`
	AccessKeyID     string `json:"accessKeyID"`
	AccessKeySecret string `json:"accessKeySecret"`
}

CloudAccountCreateRequest POST /api/cloud-accounts 创建账号请求结构

type CloudAccountCreateResponse

type CloudAccountCreateResponse struct {
	Header
	Data CloudAccountInfo `json:"data"`
}

CloudAccountCreateResponse POST /api/cloud-account 创建账号返回结构

type CloudAccountDeleteResponse

type CloudAccountDeleteResponse struct {
	Header
	Data uint64 `json:"data"`
}

CloudAccountDeleteResponse DELETE /api/cloud-accounts/{acountId} 删除云账号响应结构

type CloudAccountGetResponse

type CloudAccountGetResponse struct {
	Header
	Data CloudAccountAllInfo `json:"data"`
}

CloudAccountGetResponse GET /api/cloud-accounts 获取云账号列表, 仅内网使用

type CloudAccountInfo

type CloudAccountInfo struct {
	ID            int64  `json:"accoundID"`
	CloudProvider string `json:"cloudProvider"`
	Name          string `json:"name"`
	OrgID         int64  `json:"orgID"`
}

CloudAccountInfo 云账号信息

type CloudAccountListResponse

type CloudAccountListResponse struct {
	Header
	Data []CloudAccountInfo `json:"data"`
}

CloudAccountListResponse GET /api/cloud-accounts 获取云账号列表

type CloudAccountResponse

type CloudAccountResponse struct {
	Header
	Data CloudAccount `json:"data"`
}

CloudAccountResponse 获取云账号的响应

type CloudAccountUpdateRequest

type CloudAccountUpdateRequest struct {
	AccountID       uint64 `json:"-" path:"accountID"`
	CloudProvider   string `json:"cloudProvider"`
	Name            string `json:"name"`
	AccessKeyID     string `json:"accessKeyID"`
	AccessKeySecret string `json:"accessKeySecret"`
}

CloudAccountUpdateRequest PUT /api/cloud-accounts/{accountID} 更新云账号信息

type CloudAccountUpdateResponse

type CloudAccountUpdateResponse struct {
	Header
	Data CloudAccountInfo `json:"data"`
}

CloudAccountUpdateResponse PUT /api/cloud-accounts/{accountID} 更新云账号响应结构

type CloudAddonCreateResp

type CloudAddonCreateResp struct {
	Header
	Data string `json:"data"`
}

CloudAddonCreateResp

type CloudAddonResourceDeleteRequest

type CloudAddonResourceDeleteRequest struct {
	// 来自addon, 还是云管理(resource)
	Source string `json:"source"`
	// optional (addon request needed)
	RecordID string `json:"recordID"`
	// optional (addon request needed)
	ProjectID string `json:"projectID"`
	// optional (addon request needed)
	AddonID string `json:"addonID"`
	// optional (来自云管的请求需要填)
	InstanceID string `json:"instanceID"`
	// optional (来自云管的请求需要填)
	Vendor string `json:"vendor"`
	Region string `json:"region"`
}

cloud resource delete request

type CloudAddonResourceDeleteRespnse

type CloudAddonResourceDeleteRespnse struct {
	Header
}

cloud resource delete response

type CloudClusterContainerInfo

type CloudClusterContainerInfo struct {
	// 容器服务配置信息
	DockerRoot  string `json:"dockerRoot"` //已有资源创建所需参数
	ExecRoot    string `json:"execRoot"`   //已有资源创建所需参数
	ServiceCIDR string `json:"serviceCIDR" default:"10.96.0.0/14"`
	PodCIDR     string `json:"podCIDR" default:"10.112.0.0/12"`
	DockerCIDR  string `json:"dockerCIDR" default:"10.107.0.0/16"` // 对应docker配置中的fixed_cidr
	DockerBip   string `json:"dockerBip"`                          // 从fixed_cidr获取,ip/mask
}

type CloudClusterGlusterfs

type CloudClusterGlusterfs struct {
	GlusterfsIps string `json:"glusterfsIps"` //逗号分隔的字符串
}

type CloudClusterHostsInfo

type CloudClusterHostsInfo struct {
	HostIps  string `json:"hostIps"` //逗号分隔的字符串
	Device   string `json:"device"`  //磁盘名,如vdb
	DataPath string `json:"dataPath"`
}

type CloudClusterInfo

type CloudClusterInfo struct {
	// 边缘集群配置信息
	ClusterName string `json:"clusterName"` //集群名称
	DisplayName string `json:"displayName"` //集群展示名称
	RootDomain  string `json:"rootDomain"`  //泛域名
	EnableHttps bool   `json:"enableHttps"` //是否开启https
	ClusterSize string `json:"clusterSize"` //已有资源创建所需参数;测试/生产
	Nameservers string `json:"nameservers"` //已有资源创建所需参数,通过逗号分隔

	// 中心集群配置信息,自动获取
	CollectorURL string `json:"collectorURL"`
	OpenAPI      string `json:"openapi"`
}

type CloudClusterInstaller

type CloudClusterInstaller struct {
	InstallerIp string `json:"installerIp"`
	User        string `json:"user"`
	Password    string `json:"password"`
	Port        string `json:"port"`
}

type CloudClusterNas

type CloudClusterNas struct {
	NasDomain string `json:"nasDomain"`
	NasPath   string `json:"nasPath"`
}

type CloudClusterNewCreateInfo

type CloudClusterNewCreateInfo struct {
	// 云供应商信息
	CloudVendor CloudVendor `json:"cloudVendor"` //云供应商,如alicloud-ecs,alicloud-ack
	// 从CloudVendor中解析
	CloudVendorName string // alicloud
	CloudBasicRsc   string // ecs\ack

	// 云环境vpc配置信息
	Region       string      `json:"region"`                         //区域
	ClusterType  string      `json:"clusterType" default:"Edge"`     //集群类型,默认边缘集群
	ClusterSpec  ClusterSpec `json:"clusterSpec" default:"Standard"` //集群规格,Standard, Small, Test
	ChargeType   string      `json:"chargeType" default:"PrePaid"`   //付费类型,PrePaid, PostPaid
	ChargePeriod int         `json:"chargePeriod" default:"1"`       //付费周期
	AppNodeNum   int         `json:"appNodeNum" default:"-1"`        //平台节点数
	AccessKey    string      `json:"accessKey"`
	SecretKey    string      `json:"secretKey"`
	// 从已有vpc创建,指定该值;否则新建vpc,指定VpcCIDR
	VpcID   string `json:"vpcID"`
	VpcCIDR string `json:"vpcCIDR"`
	// 从已有vswitch创建,指定该值;否则新建vswitch,指定VSwitchCIDR
	VSwitchID   string `json:"vSwitchID"`
	VSwitchCIDR string `json:"vSwitchCIDR"`
	// nat网关配置
	NatGatewayID   string
	ForwardTableID string
	SnatTableID    string
	// k8s/ecs相关配置
	K8sVersion  string `json:"k8sVersion"`
	EcsInstType string `json:"ecsInstType"`
	Terraform   string `json:"terraform"`
}

type CloudClusterRequest

type CloudClusterRequest struct {
	// 企业信息
	OrgID               uint64 `json:"orgID"`                                      //企业id
	OrgName             string `json:"orgName"`                                    //企业名称
	DiceVersion         string `json:"diceVersion" env:"DICE_VERSION"`             //dice版本号,从ops环境变量中获取dice版本号
	CentralClusterName  string `json:"centralClusterName" env:"DICE_CLUSTER_NAME"` //从ops环境变量中获取中心集群名字
	CentralRootDomain   string `json:"centralRootDomain" env:"DICE_ROOT_DOMAIN"`
	CentralDiceProtocol string `json:"centralDiceProtocol" env:"DICE_PROTOCOL"`

	// 集群创建通用配置信息
	CloudClusterInfo
	CloudClusterContainerInfo
	// 集群创建云环境配置信息
	CloudClusterNewCreateInfo
	// 根据已有资源创建集群所需配置信息
	CloudClusterInstaller
	CloudClusterNas
	CloudClusterGlusterfs
	CloudClusterHostsInfo
}

add cloud cluster request

type CloudClusterResponse

type CloudClusterResponse CloudNodesResponse

type CloudNodesRequest

type CloudNodesRequest struct {
	ClusterName string `json:"clusterName"`
	OrgID       uint64 `json:"orgID"`

	CloudVendor      string `json:"cloudVendor" default:"alicloud"`
	AvailabilityZone string `json:"availabilityZone"`
	Region           string `json:"region"` //后端,根据AvailabilityZone解析,AZ: cn-hangzhou-f --> Region:cn-hangzhou
	ChargeType       string `json:"chargeType" default:"PrePaid"`
	ChargePeriod     int    `json:"chargePeriod" default:"1"`
	AccessKey        string `json:"accessKey"`
	SecretKey        string `json:"secretKey"`

	CloudResource    string   `json:"cloudResource" default:"ecs"`
	InstancePassword string   `json:"instancePassword"`
	InstanceNum      int      `json:"instanceNum"`
	InstanceType     string   `json:"instanceType" default:"ecs.sn2ne.2xlarge"`
	DiskType         string   `json:"diskType" default:"cloud_ssd"`
	DiskSize         int      `json:"diskSize" default:"200"`
	SecurityGroupIds []string `json:"securityGroupIds"`
	VSwitchId        string   `json:"vSwitchId"`
	Labels           []string `json:"labels"`

	Terraform string `json:"terraform"` //后端,根据需要,自动选择何时的terraform命令执行
}

add cloud node request

type CloudNodesResponse

type CloudNodesResponse struct {
	Header
	Data AddNodesData `json:"data"`
}

add cloud node response

type CloudResource

type CloudResource struct {
	Resource        ClusterResourceType `json:"resourceType"`
	ResourceProfile []string            `json:"resourceProfile"`
	ResourceNum     int                 `json:"resourceNum"`
	ChargeType      string              `json:"chargeType"`
	ChargePeriod    int                 `json:"chargePeriod"`
}

cluster preview

type CloudResourceBasicData

type CloudResourceBasicData struct {
	TotalCount  int    `json:"totalCount"`
	DisplayName string `json:"displayName"`
}

type CloudResourceBasicDataWithRegion

type CloudResourceBasicDataWithRegion struct {
	CloudResourceBasicData
	Region string `json:"region"`
}

type CloudResourceBasicDataWithType

type CloudResourceBasicDataWithType struct {
	CloudResourceBasicData
	ResourceName string `json:"resourceName"`
	ResourceType string `json:"resourceType"`
}

type CloudResourceBasicView

type CloudResourceBasicView struct {
	TotalCount int                                `json:"totalCount"`
	Resource   []CloudResourceBasicDataWithRegion `json:"resource"`
}

type CloudResourceChargeTypeCount

type CloudResourceChargeTypeCount struct {
	ChargeType string `json:"chargeType"`
	Count      int    `json:"count"`
}

type CloudResourceConfig

type CloudResourceConfig struct {
	VPCCIDR                 string `json:"vpcCIDR"`
	VSwitchCIDR             string `json:"vSwitchCIDR"`
	ECSInstanceChargeType   string `json:"ecsInstanceChargeType"`
	ECSPeriod               int    `json:"ecsPeriod"`
	NumberOfMasterInstances int    `json:"numberOfMasterInstances"`
	NumberOfLBInstances     int    `json:"numberOfLBInstances"`
	NumberOfAppInstances    int    `json:"numberOfAppInstances"`
	ECSPassword             string `json:"ecsPassword"`
}

CloudResourceConfig

type CloudResourceConfigJSON

type CloudResourceConfigJSON struct {
	OrgID  int               `json:"orgID"`
	SaaS   bool              `json:"saas"`
	Jump   DeployClusterJump `json:"jump"`
	Config Sysconf           `json:"config"`
}

CloudResourceConfigJSON

type CloudResourceCreateRequest

type CloudResourceCreateRequest struct {
	ClusterName    string              `json:"clusterName"` // TODO db migration
	WildcardDomain string              `json:"wildcardDomain"`
	CloudAccountID uint64              `json:"cloudAccountID"`
	CloudRegion    string              `json:"cloudRegion"`
	Config         CloudResourceConfig `json:"cloudResourceConfig"`
}

CloudResourceCreateRequest POST /api/cloud-resources 创建云资源请求结构

type CloudResourceCreateResponse

type CloudResourceCreateResponse struct {
	Header
	Data CloudResourceInfo `json:"data"`
}

CloudResourceCreateResponse

type CloudResourceDNAT

type CloudResourceDNAT struct {
	ExternalIP     string `json:"externalIP"`
	ExternalPort   string `json:"externalPort"`
	ForwardEntryID string `json:"forwardEntryID"`
	ForwardTableID string `json:"forwardTableID"`
	InternalIP     string `json:"internalIP"`
	InternalPort   string `json:"internalPort"`
	IPProtocol     string `json:"ipProtocol"`
}

CloudResourceDNAT

type CloudResourceDestroyResponse

type CloudResourceDestroyResponse struct {
	Header
	Data CloudResourceInfo `json:"data"`
}

CloudResourceDestroyResponse

type CloudResourceDetailInfo

type CloudResourceDetailInfo struct {
	Label string                    `json:"label"`
	Items []CloudResourceDetailItem `json:"items"`
}

type CloudResourceDetailItem

type CloudResourceDetailItem struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type CloudResourceECS

type CloudResourceECS struct {
	ID           string `json:"id"`
	InstanceName string `json:"instanceName"`

	InstanceChargeType string `json:"instanceChargeType"`
	Period             string `json:"period"`
	PeriodUnit         string `json:"periodUnit"`

	InstanceType string `json:"instanceType"`
	PrivateIP    string `json:"privateIP"`
	Password     string `json:"password"`

	SystemDiskSize     float64 `json:"systemDiskSize"`
	SystemDiskCategory string  `json:"systemDiskCategory"`

	DataDiskID         string  `json:"dataDiskID"`
	DataDiskSize       float64 `json:"dataDiskSize"`
	DataDiskCategory   string  `json:"dataDiskCategory"`
	DataDiskDeviceName string  `json:"dataDiskDeviceName"`

	TagsType string `json:"tagsType"`
}

CloudResourceECS

type CloudResourceEIP

type CloudResourceEIP struct {
	ID                 string  `json:"id"`
	Name               string  `json:"name"`
	InternetChargeType string  `json:"internetChargeType"`
	IPAddress          string  `json:"ipAddress"`
	Bandwidth          float64 `json:"bandwidth"`
}

CloudResourceEIP

type CloudResourceGetResponse

type CloudResourceGetResponse struct {
	Header
	Data CloudResourceInfo `json:"data"`
}

CloudResourceGetResponse

type CloudResourceInfo

type CloudResourceInfo struct {
	ID             uint64                   `json:"cloudResourceID"`
	ClusterName    string                   `json:"clusterName"`
	WildcardDomain string                   `json:"wildcardDomain"`
	CloudAccountID uint64                   `json:"cloudAccountID"`
	CloudRegion    string                   `json:"cloudRegion"`
	Config         CloudResourceConfig      `json:"cloudResourceConfig"`
	Status         InstallStatus            `json:"status"`
	ConfigJSON     *CloudResourceConfigJSON `json:"configJSON"`
	Inventory      *CloudResourceInventory  `json:"inventory"`
}

CloudResourceInfo

type CloudResourceInventory

type CloudResourceInventory struct {
	VPC     CloudResourceVPC     `json:"vpc"`
	VSwitch CloudResourceVSwitch `json:"vswitch"`
	ECS     []CloudResourceECS   `json:"ecs"`
	SLB     CloudResourceSLB     `json:"slb"`
	EIP     []CloudResourceEIP   `json:"eip"`
	NAT     CloudResourceNAT     `json:"nat"`
	NAS     CloudResourceNAS     `json:"nas"`
}

CloudResourceInventory

type CloudResourceLabelCount

type CloudResourceLabelCount struct {
	Label string `json:"label"`
	Count int    `json:"count"`
}

type CloudResourceMysqlAccount

type CloudResourceMysqlAccount struct {
	// 以字母开头,以字母或数字结尾。
	// 由小写字母、数字或下划线组成。
	// 长度为2~16个字符。
	Account string `json:"account"`
	// 长度为8~32个字符。
	// 由大写字母、小写字母、数字、特殊字符中的任意三种组成。
	// 特殊字符为!@#$&%^*()_+-=
	Password         string `json:"password"`
	AccountPrivilege string `json:"accountPrivilege"`
}

type CloudResourceMysqlAccountPrivileges

type CloudResourceMysqlAccountPrivileges struct {
	DBName           string `json:"dBName"`
	AccountPrivilege string `json:"accountPrivilege"`
}

type CloudResourceMysqlBasicData

type CloudResourceMysqlBasicData struct {
	ID     string `json:"id"`
	Name   string `json:"name"`
	Region string `json:"region"`
	//Basic:基础版
	//HighAvailability:高可用版
	//Finance:三节点企业版
	Category   string            `json:"category"`
	Spec       string            `json:"spec"`
	Version    string            `json:"version"`
	Status     string            `json:"status"`
	ChargeType string            `json:"chargeType"`
	CreateTime string            `json:"createTime"`
	ExpireTime string            `json:"expireTime"`
	Tag        map[string]string `json:"tag"`
}

type CloudResourceMysqlDB

type CloudResourceMysqlDB struct {
	DBName string `json:"dbName"`
	// addon bound to this database
	AddonID string `json:"addonID"`
	// accounts for a databases
	Accounts []CloudResourceMysqlAccount `json:"accounts"`
}

Mysql db basic info

type CloudResourceMysqlDBInfo

type CloudResourceMysqlDBInfo struct {
	Total int `json:"total"`
	// mysql instance id
	InstanceID string                 `json:"instanceID"`
	List       []CloudResourceMysqlDB `json:"list"`
}

type CloudResourceMysqlDBRequest

type CloudResourceMysqlDBRequest struct {
	CloudResourceMysqlDetailInfoRequest
	// optional, if not specified, return all db info, 由小写字母、数字、下划线或中划线组成
	DBName string `query:"dbName"`
}

Mysql db info request

type CloudResourceMysqlDBResponse

type CloudResourceMysqlDBResponse struct {
	Header
	Data CloudResourceMysqlDBInfo `json:"data"`
}

Mysql db info response, database & addon relation

type CloudResourceMysqlData

type CloudResourceMysqlData struct {
	Total int                           `json:"total"`
	List  []CloudResourceMysqlBasicData `json:"list"`
}

type CloudResourceMysqlDetailInfoData

type CloudResourceMysqlDetailInfoData struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	// Basic:基础版, HighAvailability:高可用版, AlwaysOn:集群版, Finance:三节点企业版
	Category  string `json:"category"`
	RegionId  string `json:"regionID"`
	VpcId     string `json:"vpcID"`
	VSwitchId string `json:"vSwitchID"`
	ZoneId    string `json:"zoneID"`
	// connection string
	Host        string `json:"host"`
	Port        string `json:"port"`
	Memory      string `json:"memory"`
	StorageSize string `json:"storageSize"`
	StorageType string `json:"storageType"`
	Status      string `json:"status"`
}

type CloudResourceMysqlDetailInfoRequest

type CloudResourceMysqlDetailInfoRequest struct {
	Vendor string `query:"vendor"`
	Region string `query:"region"`
	// get from request path
	InstanceID string `query:"instanceID"`
}

Mysql detail info request

type CloudResourceMysqlDetailInfoResponse

type CloudResourceMysqlDetailInfoResponse struct {
	Header
	Data CloudResourceMysqlDetailInfoData `json:"data"`
}

Mysql detail info response

type CloudResourceMysqlFullDetailInfoResponse

type CloudResourceMysqlFullDetailInfoResponse struct {
	Header
	Data []CloudResourceDetailInfo `json:"data"`
}

type CloudResourceMysqlListAccountData

type CloudResourceMysqlListAccountData struct {
	List []CloudResourceMysqlListAccountItem `json:"list"`
}

type CloudResourceMysqlListAccountItem

type CloudResourceMysqlListAccountItem struct {
	AccountName        string                                `json:"accountName"`
	AccountStatus      string                                `json:"accountStatus"`
	AccountType        string                                `json:"accountType"`
	AccountDescription string                                `json:"accountDescription"`
	DatabasePrivileges []CloudResourceMysqlAccountPrivileges `json:"databasePrivileges"`
}

type CloudResourceMysqlListAccountRequest

type CloudResourceMysqlListAccountRequest struct {
	Vendor string `query:"vendor"`
	Region string `query:"region"`
	// get from request path
	InstanceID string `query:"instanceID"`
}

type CloudResourceMysqlListAccountResponse

type CloudResourceMysqlListAccountResponse struct {
	Header
	Data CloudResourceMysqlListAccountData `json:"data"`
}

type CloudResourceMysqlListDatabaseAccount

type CloudResourceMysqlListDatabaseAccount struct {
	Account string `query:"account"`
}

type CloudResourceMysqlListDatabaseData

type CloudResourceMysqlListDatabaseData struct {
	List []CloudResourceMysqlListDatabaseItem `json:"list"`
}

type CloudResourceMysqlListDatabaseItem

type CloudResourceMysqlListDatabaseItem struct {
	DBName           string                                  `json:"dBName"`
	DBStatus         string                                  `json:"dBStatus"`
	CharacterSetName string                                  `json:"characterSetName"`
	DBDescription    string                                  `json:"dBDescription"`
	Accounts         []CloudResourceMysqlListDatabaseAccount `json:"accounts"`
}

type CloudResourceMysqlListDatabaseRequest

type CloudResourceMysqlListDatabaseRequest struct {
	Vendor string `query:"vendor"`
	Region string `query:"region"`
	// get from request path
	InstanceID string `query:"instanceID"`
}

type CloudResourceMysqlListDatabaseResponse

type CloudResourceMysqlListDatabaseResponse struct {
	Header
	Data CloudResourceMysqlListDatabaseData `json:"data"`
}

type CloudResourceNAS

type CloudResourceNAS struct {
	MountTargetID          string `json:"mountTargetID"`
	FileSystemID           string `json:"fileSystemID"`
	FileSystemProtocolType string `json:"fileSystemProtocolType"`
	FileSystemStorageType  string `json:"fileSystemStorageType"`
}

CloudResourceNAS

type CloudResourceNAT

type CloudResourceNAT struct {
	ID            string              `json:"id"`
	Name          string              `json:"name"`
	Specification string              `json:"specification"`
	SNATEntryID   string              `json:"snatEntryID"`
	SNATIP        string              `json:"snatIP"`
	SNATTableID   string              `json:"snatTableID"`
	DNAT          []CloudResourceDNAT `json:"dnat"`
}

CloudResourceNAT

type CloudResourceOnsBasicData

type CloudResourceOnsBasicData struct {
	Region string `json:"region"`
	ID     string `json:"id"`
	Name   string `json:"name"`
	//实例类型。取值说明如下:
	//1:后付费实例
	//2:铂金版实例
	InstanceType string `json:"instanceType"`
	//实例状态。取值说明如下:
	//0:铂金版实例部署中
	//2:后付费实例已欠费
	//5:后付费实例或铂金版实例服务中
	//7:铂金版实例升级中且服务可用
	Status string            `json:"status"`
	Tags   map[string]string `json:"tags"`
}

type CloudResourceOnsData

type CloudResourceOnsData struct {
	Total int                         `json:"total"`
	List  []CloudResourceOnsBasicData `json:"list"`
}

type CloudResourceOnsDetailInfoRequest

type CloudResourceOnsDetailInfoRequest CloudResourceMysqlDetailInfoRequest

ons detail info request

type CloudResourceOnsGroupBaseInfo

type CloudResourceOnsGroupBaseInfo struct {
	// 以 “GID_“ 或者 “GID-“ 开头,只能包含字母、数字、短横线(-)和下划线(_),长度限制在 5–64 字节之间,
	// Group ID 一旦创建,将无法再修改
	GroupId string `json:"groupID"`
	// tcp:默认值,表示创建的 Group ID 仅适用于 TCP 协议的消息收发
	// http:表示创建的 Group ID 仅适用于 HTTP 协议的消息收发
	GroupType string `json:"groupType" default:"tcp"`
	Remark    string `json:"remark"`
}

type CloudResourceOnsGroupBasicData

type CloudResourceOnsGroupBasicData struct {
	GroupId    string            `json:"groupId"`
	Remark     string            `json:"remark"`
	InstanceId string            `json:"instanceId"`
	GroupType  string            `json:"groupType"`
	CreateTime string            `json:"createTime"`
	Tags       map[string]string `json:"tags"`
}

type CloudResourceOnsGroupInfoData

type CloudResourceOnsGroupInfoData struct {
	Total int                              `json:"total"`
	List  []CloudResourceOnsGroupBasicData `json:"list"`
}

type CloudResourceOnsGroupInfoRequest

type CloudResourceOnsGroupInfoRequest struct {
	Vendor     string `query:"vendor"`
	Region     string `query:"region"`
	InstanceID string `query:"instanceID"`
	// optional, if not provide, return all group info
	GroupID string `query:"groupID"`
	// optional, filter by group type
	GroupType string `query:"groupType"`
}

ons group info request

type CloudResourceOnsGroupInfoResponse

type CloudResourceOnsGroupInfoResponse struct {
	Header
	Data CloudResourceOnsGroupInfoData `json:"data"`
}

ons group info response

type CloudResourceOnsSetTagRequest

type CloudResourceOnsSetTagRequest struct {
	CloudResourceSetTagRequest
}

ons set tag request

type CloudResourceOnsTopicAndGroup

type CloudResourceOnsTopicAndGroup struct {
	CloudResourceOnsGroupBaseInfo
	TopicName   string `json:"topicName"`
	AddonID     string `json:"addonID"`
	MessageType int    `json:"messageType"`
	Remark      string `json:"remark"`
}

type CloudResourceOnsTopicInfo

type CloudResourceOnsTopicInfo struct {
	Total int `json:"total"`
	// topics
	List []OnsTopic `json:"list"`
}

type CloudResourceOnsTopicInfoRequest

type CloudResourceOnsTopicInfoRequest struct {
	CloudResourceMysqlDetailInfoRequest
	// optional, if not specified, return all topics info
	TopicName string `query:"topicName"`
}

ons topic info request

type CloudResourceOnsTopicInfoResponse

type CloudResourceOnsTopicInfoResponse struct {
	Header
	Data CloudResourceOnsTopicInfo `json:"data"`
}

ons topic info response

type CloudResourceOssBasicData

type CloudResourceOssBasicData struct {
	Name         string            `json:"name"`
	Location     string            `json:"location"`
	CreateDate   string            `json:"createDate"`
	StorageClass string            `json:"storageClass"`
	Tags         map[string]string `json:"tags"`
}

type CloudResourceOssData

type CloudResourceOssData struct {
	Total int                         `json:"total"`
	List  []CloudResourceOssBasicData `json:"list"`
}

type CloudResourceOssDetailInfoData

type CloudResourceOssDetailInfoData struct {
	BucketName       string `json:"bucketName"`
	InternetEndpoint string `json:"internetEndpoint"`
	IntranetEndpoint string `json:"intranetEndpoint"`
	// Bucket的地域
	Location string `json:"location"`
	// Bucket的ACL权限: private、public-read、public-read-write
	Acl string `json:"acl"`
}

type CloudResourceOssDetailInfoRequest

type CloudResourceOssDetailInfoRequest struct {
	Vendor string `query:"vendor"`
	Region string `query:"region"`
	Name   string `query:"name"`
}

oss bucket detail info request

type CloudResourceOssDetailInfoResponse

type CloudResourceOssDetailInfoResponse struct {
	Header
	Data CloudResourceOssDetailInfoData `json:"data"`
}

oss bucket detail info response

type CloudResourceOverviewDetailData

type CloudResourceOverviewDetailData struct {
	CloudResourceBasicData
	ManagedCount    *int                           `json:"managedCount,omitempty"`
	StatusCount     []CloudResourceStatusCount     `json:"statusCount,omitempty"`
	ChargeTypeCount []CloudResourceChargeTypeCount `json:"chargeTypeCount,omitempty"`
	LabelCount      []CloudResourceLabelCount      `json:"labelCount,omitempty"`
	StorageUsage    *int64                         `json:"storageUsage,omitempty"`
	ExpireDays      int                            `json:"expireDays,omitempty"`
}

type CloudResourceOverviewRequest

type CloudResourceOverviewRequest struct {
	// optional
	Vendor string `query:"vendor"`
	// optional
	Region string `query:"region"`
}

cloud resource overview request

type CloudResourceOverviewResponse

type CloudResourceOverviewResponse struct {
	Header
	Data map[string]*CloudResourceTypeOverview `json:"data"`
}

cloud resource overview response

type CloudResourceRedisBasicData

type CloudResourceRedisBasicData struct {
	ID         string            `json:"id"`
	Name       string            `json:"name"`
	Region     string            `json:"region"`
	Spec       string            `json:"spec"` // cluster(集群版),standard(标准版),standard(标准版)
	Version    string            `json:"version"`
	Capacity   string            `json:"capacity"` // 容量
	Status     string            `json:"status"`
	Tags       map[string]string `json:"tags"`
	ChargeType string            `json:"chargeType"`
	ExpireTime string            `json:"expireTime"`
	CreateTime string            `json:"createTime"`
}

type CloudResourceRedisDetailInfoData

type CloudResourceRedisDetailInfoData struct {
	// 实例ID
	ID string `json:"id"`
	// 名称
	Name string `json:"name"`
	// 状态
	Status string `json:"status"`
	// 私网地址
	PrivateHost string `json:"privateHost"`
	// 公网地址
	PublicHost string `json:"publicHost"`
	Host       string `json:"endpoint"`
	Port       int64  `json:"port"`
	// 地域/可用区
	RegionId string `json:"regionId"`
	ZoneId   string `json:"zoneID"`
	// 网络类型(vpc/vsw信息)
	NetworkType string `json:"networkType"`
	VpcId       string `json:"vpcID"`
	VSwitchId   string `json:"vSwitchID"`
	// cluster(集群版), standard(标准版), SplitRW(读写分离版)
	ArchitectureType string `json:"architectureType"`
	Bandwidth        string `json:"bandwidth"`
	// 存储容量,单位:MB
	Capacity string `json:"capacity"`
	// 实例类型
	Spec string `json:"spec"`
	// 实例最大连接数
	Connections int64 `json:"connections"`
	// 版本
	Version string `json:"version"`
}

type CloudResourceRedisDetailInfoRequest

type CloudResourceRedisDetailInfoRequest CloudResourceMysqlDetailInfoRequest

Redis detail info request

type CloudResourceRedisDetailInfoResponse

type CloudResourceRedisDetailInfoResponse CloudResourceMysqlFullDetailInfoResponse

Redis detail info response

type CloudResourceSLB

type CloudResourceSLB struct {
	ID                 string  `json:"id"`
	Name               string  `json:"name"`
	InternetChargeType string  `json:"internetChargeType"`
	Specification      string  `json:"specification"`
	Bandwidth          float64 `json:"bandwidth"`
	Address            string  `json:"address"`
}

CloudResourceSLB

type CloudResourceSetTagRequest

type CloudResourceSetTagRequest struct {
	Tags []string `json:"tags"`

	//一级资源
	//	VPC:VPC实例
	//	VSWITCH:交换机实例
	//	EIP:弹性公网IP实例
	//	OSS
	//	ONS
	//二级资源
	//	ONS_TOPIC
	//	ONS_GROUP
	ResourceType string `json:"resourceType"`
	// Tag一级资源时,InstanceID 为空
	// Tag二级资源时,此处指定InstanceID, 如指定ons id, 然后在resource ids 中指定ons_group/ons_topic
	InstanceID string                 `json:"instanceID"`
	Items      []CloudResourceTagItem `json:"items"`
}

type CloudResourceSetTagResponse

type CloudResourceSetTagResponse struct {
	Header
}

type CloudResourceStatusCount

type CloudResourceStatusCount struct {
	Label  string `json:"label"`
	Status string `json:"status"`
	Count  int    `json:"count"`
}

type CloudResourceTagItem

type CloudResourceTagItem struct {
	Vendor     string   `json:"vendor"`
	Region     string   `json:"region"`
	ResourceID string   `json:"resourceID"`
	OldTags    []string `json:"oldTags"`
}

为了处理批量打标签 来自不通region的情况

type CloudResourceTypeOverview

type CloudResourceTypeOverview struct {
	ResourceTypeData map[string]*CloudResourceOverviewDetailData `json:"resourceTypeData"`
}

type CloudResourceVPC

type CloudResourceVPC struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	CIDRBlock string `json:"cidrBlock"`
}

CloudResourceVPC

type CloudResourceVSwitch

type CloudResourceVSwitch struct {
	ID               string `json:"id"`
	Name             string `json:"name"`
	CIDRBlock        string `json:"cidrBlock"`
	AvailabilityZone string `json:"availabilityZone"`
}

CloudResourceVSwitch

type CloudResourceVpcBaseInfo

type CloudResourceVpcBaseInfo struct {
	Region    string `json:"region"`
	VpcID     string `json:"vpcID"`
	VpcCIDR   string `json:"vpcCIDR"`
	VSwitchID string `json:"vSwitchID"`
	ZoneID    string `json:"zoneID"`
}

type CloudResourcesDetailData

type CloudResourcesDetailData struct {
	DisplayName string              `json:"displayName"`
	LabelOrder  []string            `json:"labelOrder"`
	Labels      map[string]string   `json:"labels"`
	Data        []map[string]string `json:"data"`
}

type CloudResourcesDetailResponse

type CloudResourcesDetailResponse struct {
	Header
	Data map[string]CloudResourcesDetailData `json:"data"`
}

type CloudVendor

type CloudVendor string
const (
	CloudVendorAliEcs       CloudVendor = "alicloud-ecs"
	CloudVendorAliAck       CloudVendor = "alicloud-ack" // TODO remove
	CloudVendorAliCS        CloudVendor = "alicloud-cs"
	CloudVendorAliCSManaged CloudVendor = "alicloud-cs-managed"
)

type Cluster

type Cluster struct {
	Name            string   `json:"name"`
	Type            string   `json:"type"` // dcos, k8s
	Nameservers     []string `json:"nameservers"`
	ContainerSubnet string   `json:"containerSubnet"`
	VirtualSubnet   string   `json:"virtualSubnet"`
	MasterVIP       string   `json:"masterVIP,omitempty"`
	Offline         bool     `json:"offline"`
}

Cluster 集群配置

type ClusterCreateRequest

type ClusterCreateRequest struct {
	OrgID           int64               `json:"orgID"`
	Name            string              `json:"name"`
	CloudVendor     string              `json:"cloudVendor"`
	DisplayName     string              `json:"displayName"`
	Description     string              `json:"description"`
	Type            string              `json:"type"` // dcos, edas, k8s
	WildcardDomain  string              `json:"wildcardDomain"`
	URLs            map[string]string   `json:"urls"`
	Settings        map[string]string   `json:"settings"`
	Config          map[string]string   `json:"config"` // 集群基本配置
	SchedulerConfig *ClusterSchedConfig `json:"scheduler"`
	OpsConfig       *OpsConfig          `json:"opsConfig"`
	SysConfig       *Sysconf            `json:"sysConfig"`
}

ClusterCreateRequest 集群创建请求 TODO 逐步废弃 urls & settings, 统一使用config

type ClusterCreateResponse

type ClusterCreateResponse struct {
	Header
	Data interface{} `json:"data"`
}

ClusterCreateResponse 集群创建响应

type ClusterEvent

type ClusterEvent struct {
	EventHeader
	Content ClusterInfo `json:"content"`
}

ClusterEvent 创建和修改集群时触发的事件 event: cluster

type ClusterFetchResponse

type ClusterFetchResponse struct {
	Header
	Data ClusterInfo `json:"data"`
}

ClusterFetchResponse 集群详情响应

type ClusterInfo

type ClusterInfo struct {
	ID             int                    `json:"id"`
	OrgID          int                    `json:"orgID"`
	Name           string                 `json:"name"`
	DisplayName    string                 `json:"displayName"`
	Type           string                 `json:"type"` // dcos, edas, k8s
	CloudVendor    string                 `json:"cloudVendor"`
	Description    string                 `json:"description"`
	WildcardDomain string                 `json:"wildcardDomain"`
	URLs           map[string]string      `json:"urls,omitempty"`
	Settings       map[string]interface{} `json:"settings,omitempty"`
	Config         map[string]string      `json:"config,omitempty"`
	SchedConfig    *ClusterSchedConfig    `json:"scheduler,omitempty"`
	OpsConfig      *OpsConfig             `json:"opsConfig,omitempty"`
	//Resource       *aliyun.AliyunResources `json:"resource"`  // TODO: 重构优化
	System *Sysconf `json:"system,omitempty"`
	// 是否关联集群,Y: 是,N: 否
	IsRelation string    `json:"isRelation"`
	CreatedAt  time.Time `json:"createdAt"`
	UpdatedAt  time.Time `json:"updatedAt"`
}

ClusterInfo 集群信息

type ClusterInfoData

type ClusterInfoData map[ClusterInfoMapKey]string

func (ClusterInfoData) DiceProtocolIsHTTPS

func (info ClusterInfoData) DiceProtocolIsHTTPS() bool

DiceProtocolIsHTTPS 判断 DiceProtocol 是否支持 HTTPS

func (ClusterInfoData) Get

func (ClusterInfoData) GetApiServerUrl

func (info ClusterInfoData) GetApiServerUrl() string

func (ClusterInfoData) GetIstioInfo

func (info ClusterInfoData) GetIstioInfo() IstioInfo

func (ClusterInfoData) IsDCOS

func (info ClusterInfoData) IsDCOS() bool

func (ClusterInfoData) IsEDAS

func (info ClusterInfoData) IsEDAS() bool

func (ClusterInfoData) IsK8S

func (info ClusterInfoData) IsK8S() bool

func (ClusterInfoData) MustGet

func (info ClusterInfoData) MustGet(key ClusterInfoMapKey) string

func (ClusterInfoData) MustGetPublicURL

func (info ClusterInfoData) MustGetPublicURL(component string) string

{DICE_PROTOCOL}://{组件名}.{DICE_ROOT_DOMAIN}:{DICE_HTTP_PORT or DICE_HTTPS_PORT}

type ClusterInfoDataList

type ClusterInfoDataList []ClusterInfoData

type ClusterInfoListResponse

type ClusterInfoListResponse struct {
	Header
	Data ClusterInfoDataList `json:"data"`
}

type ClusterInfoMapKey

type ClusterInfoMapKey string
const (
	ETCD_ENDPOINTS          ClusterInfoMapKey = "ETCD_ENDPOINTS"          // k8s etcd的rs ip地址,逗号分割
	DICE_INSIDE             ClusterInfoMapKey = "DICE_INSIDE"             // bool值, true表示当前集群是离线部署的
	DICE_CLUSTER_TYPE       ClusterInfoMapKey = "DICE_CLUSTER_TYPE"       // 集群类型
	DICE_CLUSTER_NAME       ClusterInfoMapKey = "DICE_CLUSTER_NAME"       // 集群名
	DICE_VERSION            ClusterInfoMapKey = "DICE_VERSION"            // dice 版本
	DICE_ROOT_DOMAIN        ClusterInfoMapKey = "DICE_ROOT_DOMAIN"        // 集群泛域名
	DICE_IS_EDGE            ClusterInfoMapKey = "DICE_IS_EDGE"            // true表示当前集群是边缘集群
	DICE_STORAGE_MOUNTPOINT ClusterInfoMapKey = "DICE_STORAGE_MOUNTPOINT" // 网盘的挂载路径
	DICE_PROTOCOL           ClusterInfoMapKey = "DICE_PROTOCOL"           // 集群的入口协议,未开启https时值为http,开启https时,值为https
	DICE_HTTP_PORT          ClusterInfoMapKey = "DICE_HTTP_PORT"          // http协议使用的端口
	DICE_HTTPS_PORT         ClusterInfoMapKey = "DICE_HTTPS_PORT"         // https协议使用的端口
	MASTER_ADDR             ClusterInfoMapKey = "MASTER_ADDR"             // master的地址
	MASTER_VIP_ADDR         ClusterInfoMapKey = "MASTER_VIP_ADDR"         // master vip的地址
	MASTER_URLS             ClusterInfoMapKey = "MASTER_URLS"             // 带协议头的master地址
	LB_ADDR                 ClusterInfoMapKey = "LB_ADDR"                 // lb的地址
	LB_URLS                 ClusterInfoMapKey = "LB_URLS"                 // 带协议头的lb地址
	NEXUS_ADDR              ClusterInfoMapKey = "NEXUS_ADDR"              // nexus的地址
	NEXUS_USERNAME          ClusterInfoMapKey = "NEXUS_USERNAME"          // nexus 用户名
	NEXUS_PASSWORD          ClusterInfoMapKey = "NEXUS_PASSWORD"          // nexus的密码
	REGISTRY_ADDR           ClusterInfoMapKey = "REGISTRY_ADDR"           // registry的地址
	SOLDIER_ADDR            ClusterInfoMapKey = "SOLDIER_ADDR"            // soldier的地址
	NETPORTAL_URL           ClusterInfoMapKey = "NETPORTAL_URL"           // netportal的集群入口url
	EDASJOB_CLUSTER_NAME    ClusterInfoMapKey = "EDASJOB_CLUSTER_NAME"    // edas 集群可能会使用别的集群运行 JOB,若该字段为空,则说明使用本集群运行 JOB
	CLUSTER_DNS             ClusterInfoMapKey = "CLUSTER_DNS"             // k8s 或 dcos 内部域名服务器,逗号分隔
	ISTIO_ALIYUN            ClusterInfoMapKey = "ISTIO_ALIYUN"            // 是否用aliyn asm,true or false
	ISTIO_INSTALLED         ClusterInfoMapKey = "ISTIO_INSTALLED"         // 是否启用了 istio
	ISTIO_VERSION           ClusterInfoMapKey = "ISTIO_VERSION"           // istio 的版本
)

type ClusterInfoResponse

type ClusterInfoResponse struct {
	Header
	Data ClusterInfoData `json:"data"`
}

type ClusterLabelInfo

type ClusterLabelInfo struct {
	TotalCPU        float64  `json:"totalCpu"`
	TotalMemory     float64  `json:"totalMemory"`
	UsedCPU         float64  `json:"usedCpu"`
	UsedMemory      float64  `json:"usedMemory"`
	HostsList       []string `json:"hostsList,omitempty"`
	HostsNum        uint64   `json:"hostsNum"`
	SchedulerCPU    float64  `json:"schedulerCPU"`
	SchedulerMemory float64  `json:"schedulerMemory"`
}

ClusterLabelInfo 集群标签占用得机器资源信息响应

type ClusterLabels

type ClusterLabels struct {
	TotalHosts uint64 `json:"totalHosts"`

	// 返回key,value形式; 如key: label, value: labelInfo
	LabelsInfo map[string]*ClusterLabelInfo `json:"labelsInfo"`
}

type ClusterLabelsRequest

type ClusterLabelsRequest struct {
	// 查询集群需要带的query参数
	Cluster string `query:"cluster"`
}

ClusterLabelsResponse 集群标签占用机器数请求

type ClusterLabelsResponse

type ClusterLabelsResponse struct {
	Header
	Data *ClusterLabels `json:"data"`
}

ClusterLabelsResponse 集群标签占用机器数响应

type ClusterListRequest

type ClusterListRequest struct {
	OrgID int64 `query:"orgID"` // orgID选填
}

ClusterListRequest 集群列表请求

type ClusterListResponse

type ClusterListResponse struct {
	Header
	Data []ClusterInfo `json:"data"`
}

ClusterListResponse 集群列表响应

type ClusterPreviewResponse

type ClusterPreviewResponse struct {
	Header
	Data []CloudResource `json:"data"`
}

type ClusterQueryRequest

type ClusterQueryRequest struct {
	// 查询集群需要带的query参数
	Cluster string `query:"cluster"`
}

ClusterQueryRequest 显示集群 query 参数 Path: "/api/clusters/actions/statistics-labels", Path: "/api/clusters/actions/accumulate-resource",

type ClusterResourceInfoData

type ClusterResourceInfoData struct {
	CPUOverCommit        float64 `json:"cpuOverCommit"`
	ProdCPUOverCommit    float64 `json:"prodCpuOverCommit"`
	DevCPUOverCommit     float64 `json:"devCpuOverCommit"`
	TestCPUOverCommit    float64 `json:"testCpuOverCommit"`
	StagingCPUOverCommit float64 `json:"stagingCpuOverCommit"`
	ProdMEMOverCommit    float64 `json:"prodMemOverCommit"`
	DevMEMOverCommit     float64 `json:"devMemOverCommit"`
	TestMEMOverCommit    float64 `json:"testMemOverCommit"`
	StagingMEMOverCommit float64 `json:"stagingMemOverCommit"`

	Nodes map[string]*NodeResourceInfo `json:"nodes"`
}

type ClusterResourceInfoResponse

type ClusterResourceInfoResponse struct {
	Header
	Data ClusterResourceInfoData `json:"data"`
}

type ClusterResourceResponse

type ClusterResourceResponse struct {
	Header

	// 返回key,value形式; 主要包括:
	// key: projects, value: 10
	// key: applications, value: 10
	// key: runtimes, value: 10
	// key: hosts, value: 10
	// key: abnormalHosts, value: 10
	Data map[string]uint64 `json:"data"`
}

ClusterResourceResponse 指定集群获取项目,应用,主机,异常主机和runtime的总数

type ClusterResourceType

type ClusterResourceType string
const (
	ResourceEcs ClusterResourceType = "ECS"
	ResourceSlb ClusterResourceType = "SLB"
	ResourceNat ClusterResourceType = "NAT Gateway"
	ResourceNAS ClusterResourceType = "NAS Storage"
)

func (ClusterResourceType) GetResSpec

func (res ClusterResourceType) GetResSpec() []string

type ClusterSchedConfig

type ClusterSchedConfig struct {
	MasterURL         string `json:"dcosURL"`
	AuthType          string `json:"authType"` // basic, token
	AuthUsername      string `json:"authUsername"`
	AuthPassword      string `json:"authPassword"`
	CACrt             string `json:"caCrt"`
	ClientCrt         string `json:"clientCrt"`
	ClientKey         string `json:"clientKey"`
	EnableTag         bool   `json:"enableTag"`
	EdasConsoleAddr   string `json:"edasConsoleAddr"`
	AccessKey         string `json:"accessKey"`
	AccessSecret      string `json:"accessSecret"`
	ClusterID         string `json:"clusterID"`
	RegionID          string `json:"regionID"`
	LogicalRegionID   string `json:"logicalRegionID"`
	K8sAddr           string `json:"k8sAddr"`
	RegAddr           string `json:"regAddr"`
	CPUSubscribeRatio string `json:"cpuSubscribeRatio"`
}

ClusterSchedConfig 调度器初始化配置

type ClusterSpec

type ClusterSpec string
const (
	ClusterSpecStandard ClusterSpec = "Standard"
	ClusterSpecSmall    ClusterSpec = "Small"
	ClusterSpecTest     ClusterSpec = "Test"
)

func (ClusterSpec) GetSpecNum

func (spec ClusterSpec) GetSpecNum() int

type ClusterStatusRequest

type ClusterStatusRequest NodeStatusRequest

type ClusterStatusResponse

type ClusterStatusResponse NodeStatusResponse

type ClusterUpdateRequest

type ClusterUpdateRequest struct {
	OrgID           int                 `json:"orgID"`
	Name            string              `json:"name"`
	DisplayName     string              `json:"displayName"`
	Type            string              `json:"type"`
	Description     string              `json:"description"`
	WildcardDomain  string              `json:"wildcardDomain"`
	URLs            map[string]string   `json:"urls"`
	SchedulerConfig *ClusterSchedConfig `json:"scheduler"`
	OpsConfig       *OpsConfig          `json:"opsConfig"`
	SysConfig       *Sysconf            `json:"sysConfig"`
}

ClusterUpdateRequest 集群更新请求

type ClusterUpdateResponse

type ClusterUpdateResponse struct {
	Header
	Data interface{} `json:"data"`
}

ClusterUpdateResponse 集群更新响应

type ClusterUsageFetchResponse

type ClusterUsageFetchResponse struct {
	Header
	Data ClusterUsageFetchResponseData `json:"data"`
}

ClusterUsageFetchResponse 集群资源使用详情响应

type ClusterUsageFetchResponseData

type ClusterUsageFetchResponseData struct {
	TotalCPU             float64  `json:"total_cpu"`
	TotalMemory          float64  `json:"total_memory"`
	TotalDisk            float64  `json:"total_disk"`
	UsedCPU              float64  `json:"used_cpu"`
	UsedMemory           float64  `json:"used_memory"`
	UsedDisk             float64  `json:"used_disk"`
	TotalHosts           []string `json:"total_hosts,omitempty"`
	TotalHostsNum        uint     `json:"total_hosts_num,omitempty"`
	AbnormalHosts        []string `json:"abnormal_hosts,omitempty"`
	AbnormalHostsNum     uint     `json:"abnormal_hosts_num,omitempty"`
	TotalContainersNum   uint     `json:"total_containers_num,omitempty"`
	TotalAlertsNum       uint     `json:"total_alerts_num,omitempty"`
	TotalServicesNum     uint     `json:"total_services_num,omitempty"`
	UnhealthyServicesNum uint     `json:"unhealthy_services_num,omitempty"`
	TotalJobsNum         uint     `json:"total_jobs_num,omitempty"`
}

ClusterUsageFetchResponseData 集群资源使用情况

type ClusterUsageListRequest

type ClusterUsageListRequest struct {
	Cluster string `query:"cluster"` // 可传多个cluster, eg: cluster=cluster1&cluster=cluster2
}

ClusterUsageListRequest 集群资源使用列表请求

type ClusterUsageListResponse

type ClusterUsageListResponse struct {
	Header
	Data map[string]ClusterUsageFetchResponseData `json:"data"`
}

ClusterUsageListResponse 集群资源使用列表响应 GET /api/cluster-usages?cluster=xxx&cluster=xxx

type CmContainersFetchResponse

type CmContainersFetchResponse struct {
	Header
	Data []ContainerFetchResponseData `json:"data"`
}

type CodeQualityRatingLevel

type CodeQualityRatingLevel string
var (
	CodeQualityRatingLevelA       CodeQualityRatingLevel = "A"
	CodeQualityRatingLevelB       CodeQualityRatingLevel = "B"
	CodeQualityRatingLevelC       CodeQualityRatingLevel = "C"
	CodeQualityRatingLevelD       CodeQualityRatingLevel = "D"
	CodeQualityRatingLevelE       CodeQualityRatingLevel = "E"
	CodeQualityRatingLevelUnknown CodeQualityRatingLevel = "-"
)

type Comment

type Comment struct {
	// 评论ID
	CommentID int64 `json:"id"`

	// 工单ID
	TicketID int64 `json:"ticketID"`

	// 工单评论类型
	CommentType TCType `json:"commentType"`

	// 评论内容
	Content string `json:"content"`

	// 关联任务工单
	IRComment IRComment `json:"irComment"`

	// 评论用户ID
	UserID string `json:"userID"`

	// 创建时间
	CreatedAt time.Time `json:"createdAt"`

	// 更新时间
	UpdatedAt time.Time `json:"updatedAt"`
}

Comment 评论DTO

type CommentCreateRequest

type CommentCreateRequest struct {
	// 工单ID
	TicketID int64 `json:"ticketID"`
	// 评论类型
	CommentType TCType `json:"commentType"`
	// 评论内容
	Content string `json:"content"`
	// 关联事件评论内容
	IRComment IRComment `json:"irComment"`

	// 评论用户ID
	UserID string `json:"userID"`
}

CommentCreateRequest 工单评论创建请求

type CommentCreateResponse

type CommentCreateResponse struct {
	Header

	// 评论ID
	Data int64 `json:"data"`
}

CommentCreateResponse 工单评论创建响应

type CommentIssueStreamCreateRequest

type CommentIssueStreamCreateRequest struct {
	IssueID int64           `json:"-"`
	Type    IssueStreamType `json:"type"`
	Content string          `json:"content"`
	MRInfo  MRCommentInfo   `json:"mrInfo"`

	// internal use, get from *http.Request
	IdentityInfo
}

CommentIssueStreamCreateRequest 评论创建请求

type CommentListRequest

type CommentListRequest struct {
	TicketID int64 `query:"ticketID"`
}

CommentListRequest 工单评论列表

type CommentListResponse

type CommentListResponse struct {
	Header
	Data CommentListResponseData `json:"data"`
}

CommentListResponse 工单评论响应

type CommentListResponseData

type CommentListResponseData struct {
	Total    int64     `json:"total"`
	Comments []Comment `json:"comments"`
}

CommentListResponseData 工单评论响应数据

type CommentUpdateRequest

type CommentUpdateRequest struct {
	CommentID int64                    `json:"-" path:"commentID"`
	Body      CommentUpdateRequestBody `json:"body"`
}

CommentUpdateRequest 工单评论编辑请求

type CommentUpdateRequestBody

type CommentUpdateRequestBody struct {
	// 评论内容
	Content string `json:"content"`
}

CommentUpdateRequestBody 工单评论编辑请求body

type CommentUpdateResponse

type CommentUpdateResponse struct {
	Header

	// 评论ID
	Data int64 `json:"data"`
}

CommentUpdateResponse 工单评论编辑响应

type Commit

type Commit struct {
	ID            string     `json:"id"`
	Author        *Signature `json:"-"`
	Committer     *Signature `json:"committer"`
	CommitMessage string     `json:"commitMessage"`
	ParentSha     string     `json:"parentSha"`
}

Commit commit

type CommitDetail

type CommitDetail struct {
	CommitID string     `json:"commitID,omitempty"`
	Repo     string     `json:"repo,omitempty"`
	RepoAbbr string     `json:"repoAbbr,omitempty"`
	Author   string     `json:"author,omitempty"`
	Email    string     `json:"email,omitempty"`
	Time     *time.Time `json:"time,omitempty"`
	Comment  string     `json:"comment,omitempty"`
}

type Component

type Component struct {
	Version string `json:"version,omitempty" yaml:"version,omitempty"`
	// 组件类型
	Type string `json:"type,omitempty" yaml:"type,omitempty"`
	// 组件名字
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// table 动态字段
	Props interface{} `json:"props,omitempty" yaml:"props,omitempty"`
	// 组件业务数据
	Data ComponentData `json:"data,omitempty" yaml:"data,omitempty"`
	// 前端组件状态
	State map[string]interface{} `json:"state,omitempty" yaml:"state,omitempty"`
	// 组件相关操作(前端定义)
	Operations ComponentOps `json:"operations,omitempty" yaml:"operations,omitempty"`
}

type ComponentData

type ComponentData map[string]interface{}

type ComponentEvent

type ComponentEvent struct {
	Component     string                 `json:"component"`
	Operation     OperationKey           `json:"operation"`
	OperationData map[string]interface{} `json:"operationData"`
}

type ComponentInfoData

type ComponentInfoData struct {
	Cluster       string `json:"cluster"`
	ComponentName string `json:"componentName"`

	Phase       string  `json:"phase"`
	Message     string  `json:"message"`
	ContainerID string  `json:"containerID"`
	ContainerIP string  `json:"containerIP"`
	HostIP      string  `json:"hostIP"`
	ExitCode    int     `json:"exitCode"`
	CpuOrigin   float64 `json:"cpuOrigin"`
	MemOrigin   int     `json:"memOrigin"`
	CpuRequest  float64 `json:"cpuRequest"`
	MemRequest  int     `json:"memRequest"`
	CpuLimit    float64 `json:"cpuLimit"`
	MemLimit    int     `json:"memLimit"`
	Image       string  `json:"image"`

	StartedAt  time.Time  `json:"startedAt"`
	FinishedAt *time.Time `json:"finishedAt"`
}

type ComponentInfoDataList

type ComponentInfoDataList []ComponentInfoData

type ComponentInfoResponse

type ComponentInfoResponse struct {
	Header
	Data ComponentInfoDataList `json:"data"`
}

type ComponentIngressUpdateRequest

type ComponentIngressUpdateRequest struct {
	K8SNamespace  string `json:"k8sNamespace"`
	ComponentName string `json:"componentName"`
	ComponentPort int    `json:"componentPort"`
	// 若为空,则使用当前集群名称
	ClusterName string `json:"clusterName"`
	// 若为空,则使用ComponentName
	IngressName string `json:"ingressName"`
	// 若为空,则清除ingress
	Routes       []IngressRoute `json:"routes"`
	RouteOptions RouteOptions   `json:"routeOptions"`
}

func (*ComponentIngressUpdateRequest) CheckValid

func (req *ComponentIngressUpdateRequest) CheckValid() error

type ComponentIngressUpdateResponse

type ComponentIngressUpdateResponse struct {
	Header
}

type ComponentOps

type ComponentOps map[string]interface{}

type ComponentProtocol

type ComponentProtocol struct {
	Version     string                   `json:"version" yaml:"version"`
	Scenario    string                   `json:"scenario" yaml:"scenario"`
	GlobalState *GlobalStateData         `json:"state" yaml:"state"`
	Hierarchy   Hierarchy                `json:"hierarchy" yaml:"hierarchy"`
	Components  map[string]*Component    `json:"components" yaml:"components"`
	Rendering   map[string][]RendingItem `json:"rendering" yaml:"rendering"`
}

组件化协议定义

type ComponentProtocolDebugOptions

type ComponentProtocolDebugOptions struct {
	ComponentKey string `json:"componentKey"`
}

type ComponentProtocolParams

type ComponentProtocolParams interface{}

type ComponentProtocolRequest

type ComponentProtocolRequest struct {
	Scenario ComponentProtocolScenario `json:"scenario"`
	Event    ComponentEvent            `json:"event"`
	InParams map[string]interface{}    `json:"inParams"`
	// 初次请求为空,事件出发后,把包含状态的protocol传到后端
	Protocol *ComponentProtocol `json:"protocol"`

	// DebugOptions debug 选项
	DebugOptions *ComponentProtocolDebugOptions `json:"debugOptions,omitempty"`
}

request

type ComponentProtocolResponse

type ComponentProtocolResponse struct {
	Header
	Data     ComponentProtocolResponseData `json:"data"`
	UserIDs  []string                      `json:"userIDs"`
	UserInfo map[string]UserInfo           `json:"userInfo"`
}

response

type ComponentProtocolResponseData

type ComponentProtocolResponseData struct {
	Scenario ComponentProtocolScenario `json:"scenario"`
	// 后端渲染后的protocol返回前端
	Protocol ComponentProtocol `json:"protocol"`
}

type ComponentProtocolScenario

type ComponentProtocolScenario struct {
	// 场景类型, 没有则为空
	ScenarioType string `json:"scenarioType" query:"scenarioType"`
	// 场景Key
	ScenarioKey string `json:"scenarioKey" query:"scenarioKey"`
}

type ComponentRenderCtx

type ComponentRenderCtx ComponentProtocolRequest

type ComponentUsageFetchResponse

type ComponentUsageFetchResponse struct {
	Header
	Data []ComponentUsageFetchResponseData `json:"data"`
}

type ComponentUsageFetchResponseData

type ComponentUsageFetchResponseData struct {
	Name     string  `json:"name"`
	Instance int     `json:"instance"`
	Memory   float64 `json:"memory"` // 分配的内存大小单位(MB)
	Disk     float64 `json:"disk"`   // 分配的磁盘大小单位(MB)
	CPU      float64 `json:"cpu"`
}

ComponentUsageFetchResponseData 组件资源分配

type Condition

type Condition struct {
	Phase     NodePhase      `json:"phase"`
	Status    PhaseStatus    `json:"status"`
	Reason    PipelineStatus `json:"reason"`
	TimeStart time.Time      `json:"timeStart"`
	TimeEnd   time.Time      `json:"timeEnd"`
	I18N      string         `json:"i18n"`
}

type Container

type Container struct {
	ID          string  `json:"id,omitempty"`          // Task Id
	ContainerID string  `json:"containerId,omitempty"` // Container Id
	IPAddress   string  `json:"ipAddress,omitempty"`
	Host        string  `json:"host,omitempty"`
	Image       string  `json:"image"`  // 容器镜像
	CPU         float64 `json:"cpu"`    // 分配的cpu
	Memory      int64   `json:"memory"` // 分配的内存(字节)
	Disk        int64   `json:"disk"`   // 分配的磁盘空间(字节)
	Status      string  `json:"status,omitempty"`
	ExitCode    int     `json:"exitCode"`
	Message     string  `json:"message,omitempty"`
	Stage       string  `json:"stage,omitempty"`
	StartedAt   string  `json:"startedAt,omitempty"`
	UpdatedAt   string  `json:"updatedAt,omitempty"`
	Service     string  `json:"service,omitempty"`
	ClusterName string  `json:"clusterName,omitempty"`
}

Container 容器信息

type ContainerFetchResponse

type ContainerFetchResponse struct {
	Header
	Data ContainerFetchResponseData `json:"data"`
}

type ContainerFetchResponseData

type ContainerFetchResponseData struct {
	ID                  string  `json:"id"`                // 容器ID
	Deleted             bool    `json:"deleted"`           // 资源是否被删除
	StartedAt           string  `json:"started_at"`        // 容器启动时间
	FinishedAt          string  `json:"finished_at"`       // 容器结束时间
	ExitCode            int     `json:"exit_code"`         // 容器退出码
	Privileged          bool    `json:"privileged"`        // 是否是特权容器
	Cluster             string  `json:"cluster_full_name"` // 集群名
	HostPrivateIPAddr   string  `json:"host_private_addr"` // 宿主机内网地址
	IPAddress           string  `json:"ip_addr"`           // 容器IP地址
	Image               string  `json:"image_name"`        // 容器镜像名
	CPU                 float64 `json:"cpu"`               // 分配的cpu
	Memory              int64   `json:"memory"`            // 分配的内存(字节)
	Disk                int64   `json:"disk"`              // 分配的磁盘空间(字节)
	DiceOrg             string  `json:"dice_org"`          // 所在的组织
	DiceProject         string  `json:"dice_project"`      // 所在大项目
	DiceApplication     string  `json:"dice_application"`  // 所在项目
	DiceRuntime         string  `json:"dice_runtime"`      // 所在runtime
	DiceService         string  `json:"dice_service"`      // 所属应用
	EdasAppID           string  `json:"edasAppId"`         // EDAS 应用 ID,与 dice service 属于一个层级
	EdasAppName         string  `json:"edasAppName"`
	EdasGroupID         string  `json:"edasGroupId"`
	DiceProjectName     string  `json:"dice_project_name"`     // 所在大项目名称
	DiceApplicationName string  `json:"dice_application_name"` // 所在项目
	DiceRuntimeName     string  `json:"dice_runtime_name"`     // 所在runtime
	DiceComponent       string  `json:"dice_component"`        // 组件名
	DiceAddon           string  `json:"dice_addon"`            // 中间件id
	DiceAddonName       string  `json:"dice_addon_name"`       // 中间件名称
	DiceWorkspace       string  `json:"dice_workspace"`        // 部署环境
	DiceSharedLevel     string  `json:"dice_shared_level"`     // 中间件共享级别
	Status              string  `json:"status"`                // 前期定义为docker状态(后期期望能表示服务状态)
	TimeStamp           int64   `json:"timestamp"`             // 消息本身的时间戳
	TaskID              string  `json:"task_id"`               // task id
	Env                 string  `json:"env,omitempty"`         // 该容器由哪个环境发布(dev, test, staging, prod)
}

CmContainer 容器元数据

type ContainerListRequest

type ContainerListRequest struct {
	Type        string `query:"type"` // 可选值: cluster/host/org/project/application/runtime/service/addon/component
	RuntimeID   int64  `query:"runtimeID"`
	ServiceName string `query:"serviceName"`
	Status      string `query:"status"` // 可选值: running/stopped
}

ContainerListRequest 容器实例列表请求

type ContainerListResponse

type ContainerListResponse struct {
	Header
	Data Containers `json:"data"`
}

ContainerListResponse 容器实例列表响应

type ContainerUsageFetchResponse

type ContainerUsageFetchResponse struct {
	Header
	Data ContainerUsageFetchResponseData `json:"data"`
}

type ContainerUsageFetchResponseData

type ContainerUsageFetchResponseData struct {
	ID     string  `json:"id"`
	Memory float64 `json:"memory"` // 分配的内存大小单位(MB)
	Disk   float64 `json:"disk"`   // 分配的磁盘大小单位(MB)
	CPU    float64 `json:"cpu"`
}

GetContainerUsageResponseData 容器资源分配

type Containers

type Containers []Container

func (Containers) Len

func (c Containers) Len() int

func (Containers) Less

func (c Containers) Less(i, j int) bool

func (Containers) Swap

func (c Containers) Swap(i, j int)

type ContractModel

type ContractModel struct {
	BaseModel

	OrgID          uint64         `json:"orgID"`
	AssetID        string         `json:"assetID"`
	AssetName      string         `json:"assetName"`
	SwaggerVersion string         `json:"swaggerVersion"`
	ClientID       uint64         `json:"clientID"`
	Status         ContractStatus `json:"status"` // proved, proving, disproved, unproved
	CurSLAID       *uint64        `json:"curSLAID,omitempty"`
	RequestSLAID   *uint64        `json:"requestSLAID,omitempty"`
	SLACommittedAt *time.Time     `json:"slaCommittedAt,omitempty"`
}

dice_api_contracts

func (ContractModel) TableName

func (m ContractModel) TableName() string

type ContractModelAdvance

type ContractModelAdvance struct {
	ContractModel

	ClientName        string `json:"clientName,omitempty"`
	ClientDisplayName string `json:"clientDisplayName,omitempty"`
	CurSLAName        string `json:"curSLAName,omitempty"`
	RequestSLAName    string `json:"requestSLAName,omitempty"`
	EndpointName      string `json:"endpointName,omitempty"`
	ProjectID         uint64 `json:"projectID,omitempty"`
	Workspace         string `json:"workspace,omitempty"`
}

type ContractRecordModel

type ContractRecordModel struct {
	ID         uint64    `json:"id"`
	OrgID      uint64    `json:"orgID"`
	ContractID uint64    `json:"contractID"`
	Action     string    `json:"action"`
	CreatorID  string    `json:"creatorID"`
	CreatedAt  time.Time `json:"createdAt"`
}

dice_api_contract_records

func (ContractRecordModel) TableName

func (m ContractRecordModel) TableName() string

type ContractStatus

type ContractStatus string
const (
	ContractApproved    ContractStatus = "proved"    // 已授权
	ContractApproving   ContractStatus = "proving"   // 等待授权
	ContractDisapproved ContractStatus = "disproved" // 已拒绝授权
	ContractUnapproved  ContractStatus = "unproved"  // 已撤销授权
)

func (ContractStatus) ToLower

func (s ContractStatus) ToLower() ContractStatus

type Coordinate

type Coordinate struct {
	OrgID           uint64 `json:"orgId"`
	OrgName         string `json:"orgName"`
	ProjectID       uint64 `json:"projectId"`
	ProjectName     string `json:"projectName"`
	ApplicationID   uint64 `json:"applicationId"`
	ApplicationName string `json:"applicationName"`
}

Coordinate 应用关联元信息

type CreateAPIAssetVersionBody

type CreateAPIAssetVersionBody struct {
	AssetID          string `json:"assetID"`
	Major            uint64 `json:"major"`
	Minor            uint64 `json:"minor"`
	Patch            uint64 `json:"patch"`
	SpecProtocol     string `json:"specProtocol"`
	SpecDiceFileUUID string `json:"specDiceFileUUID"`
}

type CreateAPIDocMeta

type CreateAPIDocMeta struct {
	Content string `json:"content"`
}

type CreateAccessBody

type CreateAccessBody struct {
	AssetID         string         `json:"assetID"`
	OrgID           uint64         `json:"orgID"`
	Major           uint64         `json:"major"`
	Minor           uint64         `json:"minor"`
	ProjectID       uint64         `json:"projectID,omitempty"`
	AppID           uint64         `json:"appID,omitempty"`
	Workspace       string         `json:"workspace"`
	Authentication  Authentication `json:"authentication"`
	Authorization   Authorization  `json:"authorization"`
	BindDomain      []string       `json:"bindDomain"`
	AddonInstanceID string         `json:"addonInstanceID"`
}

type CreateAccessReq

type CreateAccessReq struct {
	OrgID    uint64
	Identity *IdentityInfo
	Body     *CreateAccessBody
}

创建一个访问管理条目的参数结构

type CreateBranchRuleRequest

type CreateBranchRuleRequest struct {
	ScopeType         ScopeType `json:"scopeType"`
	ScopeID           int64     `json:"scopeId"`
	Rule              string    `json:"rule"`
	IsProtect         bool      `json:"isProtect"`
	NeedApproval      bool      `json:"needApproval"`
	IsTriggerPipeline bool      `json:"isTriggerPipeline"`
	Workspace         string    `json:"workspace"`
	ArtifactWorkspace string    `json:"artifactWorkspace"`
	Desc              string    `json:"desc"`
}

type CreateBranchRuleResponse

type CreateBranchRuleResponse struct {
	Header
	Data *BranchRule `json:"data"`
}

type CreateCheckRunResponse

type CreateCheckRunResponse struct {
	Header
	Data *CheckRun `json:"data"`
}

CreateCheckRunResponse

type CreateClientBody

type CreateClientBody struct {
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`
	Desc        string `json:"desc"`
}

type CreateClientReq

type CreateClientReq struct {
	OrgID    uint64
	Identity *IdentityInfo
	Body     *CreateClientBody
}

type CreateCloudAccountRequest

type CreateCloudAccountRequest struct {
	Vendor      string `json:"vendor"`
	AccessKey   string `json:"accessKeyID"`
	Secret      string `json:"accessKeySecret"`
	Description string `json:"description"`
}

type CreateCloudAccountResponse

type CreateCloudAccountResponse struct {
	Header
}

type CreateCloudResourceBaseInfo

type CreateCloudResourceBaseInfo struct {
	Vendor string `json:"vendor"`
	Region string `json:"region"`
	// optional, 一个region可能有多个vpc,需要选择一个,然后还需要据此添加白名单
	VpcID string `json:"vpcID"`
	// optional
	VSwitchID string `json:"vSwitchID"`
	// optional, 根据资源密集度选择
	ZoneID string `json:"zoneID"`

	// optional
	OrgID string `json:"orgID"`
	// optional
	UserID string `json:"userID"`
	// optional (addon request need)
	ClusterName string `json:"clusterName"`
	// optional (addon request need)
	ProjectID string `json:"projectID"`
	// 请求来自addon还是云管(addon, resource)
	Source string `json:"source"`
	// optional
	ClientToken string `json:"clientToken"` //保证动作的幂等性
}

func (CreateCloudResourceBaseInfo) GetClientToken

func (req CreateCloudResourceBaseInfo) GetClientToken() string

func (CreateCloudResourceBaseInfo) GetClusterName

func (req CreateCloudResourceBaseInfo) GetClusterName() string

func (CreateCloudResourceBaseInfo) GetOrgID

func (req CreateCloudResourceBaseInfo) GetOrgID() string

func (CreateCloudResourceBaseInfo) GetProjectID

func (req CreateCloudResourceBaseInfo) GetProjectID() string

func (CreateCloudResourceBaseInfo) GetRegion

func (req CreateCloudResourceBaseInfo) GetRegion() string

func (CreateCloudResourceBaseInfo) GetSource

func (req CreateCloudResourceBaseInfo) GetSource() string

func (CreateCloudResourceBaseInfo) GetUserID

func (req CreateCloudResourceBaseInfo) GetUserID() string

func (CreateCloudResourceBaseInfo) GetVSwitchID

func (req CreateCloudResourceBaseInfo) GetVSwitchID() string

func (CreateCloudResourceBaseInfo) GetVendor

func (req CreateCloudResourceBaseInfo) GetVendor() string

func (CreateCloudResourceBaseInfo) GetVpcID

func (req CreateCloudResourceBaseInfo) GetVpcID() string

func (*CreateCloudResourceBaseInfo) GetZoneID

func (req *CreateCloudResourceBaseInfo) GetZoneID() string

func (*CreateCloudResourceBaseInfo) SetRegion

func (req *CreateCloudResourceBaseInfo) SetRegion(region string)

func (*CreateCloudResourceBaseInfo) SetVSwitchID

func (req *CreateCloudResourceBaseInfo) SetVSwitchID(vSwitchID string)

func (*CreateCloudResourceBaseInfo) SetVendor

func (req *CreateCloudResourceBaseInfo) SetVendor(vendor string)

func (*CreateCloudResourceBaseInfo) SetVpcID

func (req *CreateCloudResourceBaseInfo) SetVpcID(vpcID string)

func (*CreateCloudResourceBaseInfo) SetZoneID

func (req *CreateCloudResourceBaseInfo) SetZoneID(zoneID string)

type CreateCloudResourceBaseRequest

type CreateCloudResourceBaseRequest struct {
	*CreateCloudResourceBaseInfo
	CreateCloudResourceChargeInfo
	InstanceName string `json:"instanceName"`
}

func (CreateCloudResourceBaseRequest) GetAutoRenew

func (req CreateCloudResourceBaseRequest) GetAutoRenew() bool

func (CreateCloudResourceBaseRequest) GetAutoRenewPeriod

func (req CreateCloudResourceBaseRequest) GetAutoRenewPeriod() string

func (CreateCloudResourceBaseRequest) GetChargePeriod

func (req CreateCloudResourceBaseRequest) GetChargePeriod() string

func (CreateCloudResourceBaseRequest) GetChargeType

func (req CreateCloudResourceBaseRequest) GetChargeType() string

func (CreateCloudResourceBaseRequest) GetInstanceName

func (req CreateCloudResourceBaseRequest) GetInstanceName() string

type CreateCloudResourceBaseResponse

type CreateCloudResourceBaseResponse struct {
	Header
	Data CreateCloudResourceBaseResponseData `json:"data"`
}

type CreateCloudResourceBaseResponseData

type CreateCloudResourceBaseResponseData struct {
	RecordID uint64 `json:"recordID"`
}

type CreateCloudResourceChargeInfo

type CreateCloudResourceChargeInfo struct {
	ChargeType   string `json:"chargeType"`
	ChargePeriod string `json:"chargePeriod"`
	// 是否开启自动付费
	AutoRenew bool `json:"autoRenew"`
	// optional, auto generate based on charge period if not provide
	AutoRenewPeriod string `json:"autoRenewPeriod"`
}

type CreateCloudResourceGatewayResponse

type CreateCloudResourceGatewayResponse CreateCloudResourceBaseResponse

create gateway response

type CreateCloudResourceMysqlAccountRequest

type CreateCloudResourceMysqlAccountRequest struct {
	Vendor     string `json:"vendor"`
	Region     string `json:"region"`
	InstanceID string `json:"instanceID"`
	Account    string `json:"account"`
	// 长度为8~32个字符。
	// 由大写字母、小写字母、数字、特殊字符中的任意三种组成。
	// 特殊字符为!@#$&%^*()_+-=
	Password    string `json:"password"`
	Description string `json:"description"`
}

type CreateCloudResourceMysqlAccountResponse

type CreateCloudResourceMysqlAccountResponse CreateCloudResourceBaseResponse

type CreateCloudResourceMysqlDBAccountsRequest

type CreateCloudResourceMysqlDBAccountsRequest struct {
	InstanceID string `json:"instanceID"`
	MysqlDataBaseInfo
}

create mysql database accounts request

type CreateCloudResourceMysqlDBRequest

type CreateCloudResourceMysqlDBRequest struct {
	CreateCloudResourceBaseInfo
	InstanceID string              `json:"instanceID"`
	Databases  []MysqlDataBaseInfo `json:"databases"`
}

create mysql database request

type CreateCloudResourceMysqlDBResponse

type CreateCloudResourceMysqlDBResponse CreateCloudResourceBaseResponse

create mysql database response

type CreateCloudResourceMysqlRequest

type CreateCloudResourceMysqlRequest struct {
	*CreateCloudResourceBaseRequest
	// 支持版本5.7
	Version string `json:"version"`
	// 普通版,高可用版
	SpecType string `json:"specType"`
	// mysql instance spec
	SpecSize string `json:"spec"`
	// optional, 后端填充
	StorageType string `json:"storageType"`
	StorageSize int    `json:"storageSize"`
	// optional, 后端根据vpc信息填充
	SecurityIPList string `json:"securityIPList"`
	// optional, 创建mysql addon时需要指定database信息
	Databases []MysqlDataBaseInfo `json:"databases"`
}

create mysql request

func (CreateCloudResourceMysqlRequest) GetAddonID

func (req CreateCloudResourceMysqlRequest) GetAddonID() string

type CreateCloudResourceMysqlResponse

type CreateCloudResourceMysqlResponse CreateCloudResourceBaseResponse

create mysql response

type CreateCloudResourceOnsGroupRequest

type CreateCloudResourceOnsGroupRequest struct {
	Vendor     string                          `json:"vendor"`
	Region     string                          `json:"region"`
	InstanceID string                          `json:"instanceID"`
	Groups     []CloudResourceOnsGroupBaseInfo `json:"groups"`
}

create ons group request

type CreateCloudResourceOnsGroupResponse

type CreateCloudResourceOnsGroupResponse struct {
	Header
}

type CreateCloudResourceOnsRequest

type CreateCloudResourceOnsRequest struct {
	*CreateCloudResourceBaseInfo
	Name string `json:"name"`
	// 备注说明
	Remark string `json:"remark"`
	// optional
	Topics []CloudResourceOnsTopicAndGroup `json:"topics"`
}

create ons request

func (CreateCloudResourceOnsRequest) GetAddonID

func (req CreateCloudResourceOnsRequest) GetAddonID() string

func (CreateCloudResourceOnsRequest) GetInstanceName

func (req CreateCloudResourceOnsRequest) GetInstanceName() string

type CreateCloudResourceOnsResponse

type CreateCloudResourceOnsResponse CreateCloudResourceBaseResponse

create ons response

type CreateCloudResourceOnsTopicRequest

type CreateCloudResourceOnsTopicRequest struct {
	CreateCloudResourceBaseInfo

	InstanceID string                          `json:"instanceID"`
	Topics     []CloudResourceOnsTopicAndGroup `json:"topics"`
}

create ons topic request

type CreateCloudResourceOnsTopicResponse

type CreateCloudResourceOnsTopicResponse CreateCloudResourceBaseResponse

create ons topic response

type CreateCloudResourceOssRequest

type CreateCloudResourceOssRequest struct {
	*CreateCloudResourceBaseInfo
	Buckets []OssBucketInfo `json:"buckets"`
}

create oss bucket request

func (CreateCloudResourceOssRequest) GetAddonID

func (req CreateCloudResourceOssRequest) GetAddonID() string

func (CreateCloudResourceOssRequest) GetInstanceName

func (req CreateCloudResourceOssRequest) GetInstanceName() string

type CreateCloudResourceOssResponse

type CreateCloudResourceOssResponse CreateCloudResourceBaseResponse

create oss bucket response

type CreateCloudResourceRecord

type CreateCloudResourceRecord struct {
	InstanceID   string                    `json:"instanceID"`
	InstanceName string                    `json:"instance_name"`
	ClientToken  string                    `json:"clientToken"`
	Steps        []CreateCloudResourceStep `json:"steps"`
}

create cloud resource record

type CreateCloudResourceRedisRequest

type CreateCloudResourceRedisRequest struct {
	*CreateCloudResourceBaseRequest
	Version string `json:"version"`
	// eg. redis.master.mid.default	(标准版,双副本,2G)
	Spec string `json:"spec"`
	// optional, generated by backend
	// 实例密码。 长度为8-32位,需包含大写字母、小写字母、特殊字符和数字中的至少三种,允许的特殊字符包括!@#$%^&*()_+-=
	Password string `json:"password"`
	// 来自addon的请求需要
	AddonID string `json:"addonID"`
}

create redis request

func (CreateCloudResourceRedisRequest) GetAddonID

func (req CreateCloudResourceRedisRequest) GetAddonID() string

type CreateCloudResourceRedisResponse

type CreateCloudResourceRedisResponse CreateCloudResourceBaseResponse

create redis response

type CreateCloudResourceStep

type CreateCloudResourceStep struct {
	Name   string `json:"name"`
	Step   string `json:"step"`
	Status string `json:"status"`
	Reason string `json:"reason"`
}

type CreateCloudResourceVPC

type CreateCloudResourceVPC struct {
	VPCID string `json:"vpcID"`
}

type CreateCloudResourceVPCRequest

type CreateCloudResourceVPCRequest struct {
	Vendor      string `json:"vendor"`
	Region      string `json:"region"`
	VPCName     string `json:"vpcName"`
	CidrBlock   string `json:"cidrBlock"`
	Description string `json:"description"`
}

type CreateCloudResourceVPCResponse

type CreateCloudResourceVPCResponse struct {
	Header
	Data CreateCloudResourceVPC `json:"data"`
}

type CreateCloudResourceVSW

type CreateCloudResourceVSW struct {
	VSWID string `json:"vswID"`
}

type CreateCloudResourceVSWRequest

type CreateCloudResourceVSWRequest struct {
	Vendor      string `json:"vendor"`
	Region      string `json:"region"`
	VSWName     string `json:"vswName"`
	VPCID       string `json:"vpcID"`
	CidrBlock   string `json:"cidrBlock"`
	ZoneID      string `json:"zoneID"`
	Description string `json:"description"`
}

type CreateCloudResourceVSWResponse

type CreateCloudResourceVSWResponse struct {
	Header
	Data CreateCloudResourceVSW `json:"data"`
}

type CreateContractBody

type CreateContractBody struct {
	AssetID        string  `json:"assetID"`
	SwaggerVersion string  `json:"swaggerVersion"`
	SLAID          *uint64 `json:"slaID"`
}

type CreateContractReq

type CreateContractReq struct {
	OrgID     uint64
	Identity  *IdentityInfo
	URIParams *CreateContractURIParams
	Body      *CreateContractBody
}

创建合约(申请使用)的参数结构

type CreateContractURIParams

type CreateContractURIParams struct {
	ClientID string
}

type CreateHookRequest

type CreateHookRequest struct {
	// webhook 名字
	Name string `json:"name"`
	// webhook 所关心事件的列表
	Events []string `json:"events"`
	// webhook URL, 后续的事件触发时,会POST到该URL
	URL string `json:"url"`
	// 是否激活
	Active bool `json:"active"`
	HookLocation
}

CreateHookRequest 内部使用的创建 webhook 的请求结构体

type CreateInstantiationBody

type CreateInstantiationBody struct {
	Type        string `json:"type"` // "dice", "external"
	URL         string `json:"url"`
	ProjectID   uint64 `json:"projectID,omitempty"`
	AppID       uint64 `json:"appID,omitempty"`
	RuntimeID   uint64 `json:"runtimeID"`   // 20201013 新增
	ServiceName string `json:"serviceName"` // 20201013 新增
	Workspace   string `json:"workspace"`   // 20201013 新增
}

type CreateInstantiationReq

type CreateInstantiationReq struct {
	OrgID     uint64
	Identity  *IdentityInfo
	URIParams *CreateInstantiationURIParams
	Body      *CreateInstantiationBody
}

创建一条实例关联记录

type CreateInstantiationURIParams

type CreateInstantiationURIParams struct {
	AssetID        string
	SwaggerVersion string
	Minor          uint64
}

type CreateMBoxRequest

type CreateMBoxRequest struct {
	Title   string   `json:"title"`
	Content string   `json:"content"`
	OrgID   int64    `json:"orgId"`
	UserIDs []string `json:"userIds"`
	Label   string   `json:"label"`
}

CreateMBoxRequest 创建通知项请求

type CreateMBoxResponse

type CreateMBoxResponse struct {
	Header
}

CreateMBoxResponse 创建通知项响应

type CreateNotifyGroupRequest

type CreateNotifyGroupRequest struct {
	Name        string         `json:"name"`
	ScopeType   string         `json:"scopeType"`
	ScopeID     string         `json:"scopeId"`
	Targets     []NotifyTarget `json:"targets"`
	Creator     string         `json:"creator"`
	Label       string         `json:"label"`
	ClusterName string         `json:"clusterName"`
	AutoCreate  bool           `json:"-"`
	OrgID       int64          `json:"-"`
}

CreateNotifyGroupRequest 创建通知组请求

type CreateNotifyGroupResponse

type CreateNotifyGroupResponse struct {
	Header
	Data NotifyGroup `json:"data"`
}

CreateNotifyGroupResponse 创建通知组响应

type CreateNotifyHistoryRequest

type CreateNotifyHistoryRequest struct {
	NotifyName            string         `json:"notifyName"`
	NotifyItemDisplayName string         `json:"notifyItemDisplayName"`
	Channel               string         `json:"channel"`
	NotifyTargets         []NotifyTarget `json:"notifyTargets"`
	NotifySource          NotifySource   `json:"notifySource"`
	Status                string         `json:"status"`
	ErrorMsg              string         `json:"errorMsg"`
	OrgID                 int64          `json:"orgId"`
	Label                 string         `json:"label"`
	ClusterName           string         `query:"clusterName"`
}

CreateNotifyHistoryRequest 创建通知发送记录请求

type CreateNotifyHistoryResponse

type CreateNotifyHistoryResponse struct {
	Header
	Data int64
}

CreateNotifyHistoryResponse 创建通知发送记录响应

type CreateNotifyItemRequest

type CreateNotifyItemRequest struct {
	Name           string `json:"name"`
	DisplayName    string `json:"displayName"`
	Category       string `json:"category"`
	EmailTemplate  string `json:"emailTemplate"`
	MobileTemplate string `json:"mobileTemplate"`
	Module         string `json:"module"`
}

CreateNotifyItemRequest 创建通知项请求

type CreateNotifyItemResponse

type CreateNotifyItemResponse struct {
	Header
	// 创建通知项的id
	Data int64 `json:"data"`
}

CreateNotifyItemResponse 创建通知项响应

type CreateNotifyRequest

type CreateNotifyRequest struct {
	Name          string         `json:"name"`
	ScopeType     string         `json:"scopeType"`
	ScopeID       string         `json:"scopeId"`
	Enabled       bool           `json:"enabled"`
	Channels      string         `json:"channels"`
	NotifyGroupID int64          `json:"notifyGroupId"`
	NotifyItemIDs []int64        `json:"notifyItemIds"`
	WithGroup     bool           `json:"withGroup"`
	GroupTargets  []NotifyTarget `json:"groupTargets"`
	Label         string         `json:"label"`
	ClusterName   string         `json:"clusterName"`
	NotifySources []NotifySource `json:"notifySources"`
	WorkSpace     string         `json:"workspace"`
	Creator       string         `json:"-"`
	OrgID         int64          `json:"-"`
}

CreateNotifyRequest 创建通知请求

type CreateNotifyResponse

type CreateNotifyResponse struct {
	Header
	Data *NotifyDetail `json:"data"`
}

CreateNotifyResponse 创建通知响应

type CreateOffLinePublishItemVersionRequest

type CreateOffLinePublishItemVersionRequest struct {
	Desc          string                `json:"desc"`
	FormFile      multipart.File        `json:"-"`
	FileHeader    *multipart.FileHeader `json:"-"`
	PublishItemID int64                 `json:"-"`
	IdentityInfo  IdentityInfo          `json:"-"`
	OrgID         int64                 `json:"-"`
}

CreateOffLinePublishItemVersionRequest 创建离线包发布版本请求

type CreateOrgPublisherRequest

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

CreateOrgPublisherRequest POST

type CreatePublishItemRequest

type CreatePublishItemRequest struct {
	Name             string   `json:"name"`
	DisplayName      string   `json:"displayName"`
	PublisherID      int64    `json:"publisherId"`
	Type             string   `json:"type"`
	Public           bool     `json:"public"`
	Desc             string   `json:"desc"`
	OrgID            int64    `json:"-"`
	Creator          string   `json:"-"`
	NoJailbreak      bool     `json:"noJailbreak"`      // 越狱控制
	GeofenceLon      float64  `json:"geofenceLon"`      // 地理围栏,坐标经度
	GeofenceLat      float64  `json:"geofenceLat"`      // 地理围栏,坐标纬度
	GeofenceRadius   float64  `json:"geofenceRadius"`   // 地理围栏,合理半径
	GrayLevelPercent int      `json:"grayLevelPercent"` // 灰度百分比,0-100
	PreviewImages    []string `json:"previewImages"`    // 预览图
	BackgroundImage  string   `json:"backgroundImage"`  // 背景图
}

CreatePublishItemRequest 创建发布内容请求

type CreatePublishItemResponse

type CreatePublishItemResponse struct {
	Header
	Data PublishItem `json:"data"`
}

CreatePublishItemResponse 创建发布内容响应

type CreatePublishItemVersionRequest

type CreatePublishItemVersionRequest struct {
	Version       string        `json:"version"`
	BuildID       string        `json:"buildID"`
	PackageName   string        `json:"package_name"`
	Public        bool          `json:"public"`
	IsDefault     bool          `json:"is_default"`
	Desc          string        `json:"desc"`
	Readme        string        `json:"readme"`
	Spec          string        `json:"spec"`
	Swagger       string        `json:"swagger"`
	ReleaseID     string        `json:"releaseId"`
	MobileType    ResourceType  `json:"mobileType"`
	H5VersionInfo H5VersionInfo `json:"h5VersionInfo"`
	PublishItemID int64         `json:"-"`
	OrgID         int64         `json:"-"`
	AppID         uint64        `json:"appID"`
	Creator       string        `json:"-"`
}

QueryPublishItemVersionRequest 查询发布版本请求

type CreatePublishItemVersionResponse

type CreatePublishItemVersionResponse struct {
	Header
	Data        PublishItemVersion `json:"data"`
	PublishItem PublishItem        `json:"publishItem"`
}

type CreateRepoRequest

type CreateRepoRequest struct {
	OrgID       int64          `json:"org_id"`
	ProjectID   int64          `json:"project_id"`
	AppID       int64          `json:"app_id"`
	OrgName     string         `json:"org_name"`
	ProjectName string         `json:"project_name"`
	AppName     string         `json:"app_name"`
	IsExternal  bool           `json:"is_external"`
	Config      *GitRepoConfig `json:"config"`

	// 是否锁定
	IsLocked bool `json:"isLocked"`
	//做仓库创建检测,不实际创建
	OnlyCheck bool `json:"check"`
}

CreateRepoRequest 创建repo请求

type CreateRepoResponse

type CreateRepoResponse struct {
	Header
	Data CreateRepoResponseData `json:"data"`
}

CreateRepoResponse 创建repo响应

type CreateRepoResponseData

type CreateRepoResponseData struct {
	ID int64 `json:"id"`

	// 仓库相对路基
	RepoPath string `json:"repo_path"`
}

CreateRepoResponseData 创建repo响应data

type CreateReviewRequest

type CreateReviewRequest struct {
	BuildId         int       `json:"buildId"`
	ProjectId       int       `json:"projectId"`
	ApplicationId   int       `json:"applicationId"`
	ApplicationName string    `json:"applicationName"`
	SponsorId       string    `json:"sponsorId"`
	CommitID        string    `json:"commitID"`
	OrgId           int64     `json:"orgId"`
	TaskId          int       `json:"taskId"`
	ProjectName     string    `json:"projectName"`
	BranchName      string    `json:"branchName"`
	ApprovalStatus  string    `json:"approvalStatus"`
	CommitMessage   string    `json:"commitMessage"`
	CreatedAt       time.Time `json:"createdAt"`
}

type CreateReviewUser

type CreateReviewUser struct {
	OrgId     int64     `json:"orgId"`
	Operator  string    `json:"operator"`
	TaskId    int64     `json:"taskId"`
	CreatedAt time.Time `json:"createdAt"`
}

type CreateReviewUserResponse

type CreateReviewUserResponse struct {
	ID               int64     `json:"id"`
	OperatorUserInfo *UserInfo `json:"operatorUserInfo"`
}

type CreateRunnerTaskRequest

type CreateRunnerTaskRequest struct {
	JobID          string   `json:"job_id"`
	ContextDataUrl string   `json:"context_data_url"`
	Commands       []string `json:"commands"`
	Targets        []string `json:"targets"`
	WorkDir        string   `json:"workdir"`
}

type CreateRunnerTaskResponse

type CreateRunnerTaskResponse struct {
	Header
	Data int64 `json:"data"`
}

type CreateSLABody

type CreateSLABody struct {
	Name     string                     `json:"name"`
	Desc     string                     `json:"desc"`
	Approval Authorization              `json:"approval"`
	Default  bool                       `json:"default"`
	Limits   []*CreateUpdateSLALimitObj `json:"limits"`
}

type CreateSLAReq

type CreateSLAReq struct {
	OrgID     uint64
	Identity  *IdentityInfo
	URIParams *ListSLAsURIs
	Body      *CreateSLABody
}

type CreateSceneSetResponse

type CreateSceneSetResponse struct {
	Header
	Id uint64
}

type CreateSingleAddonResponse

type CreateSingleAddonResponse struct {
	Header
	Data map[string]interface{} `json:"data"`
}

CreateSingleAddonResponse addon创建单独接口

type CreateUpdateSLALimitObj

type CreateUpdateSLALimitObj struct {
	Limit uint64       `json:"limit"`
	Unit  DurationUnit `json:"unit"`
}

type CronCompensator

type CronCompensator struct {
	Enable               bool `json:"enable"`
	LatestFirst          bool `json:"latestFirst"`
	StopIfLatterExecuted bool `json:"stopIfLatterExecuted"`
}

type CustomAddonCreateRequest

type CustomAddonCreateRequest struct {
	// 实例名称
	Name string `json:"name"`
	// addon名称
	AddonName string `json:"addonName"`
	// 项目ID
	ProjectID uint64 `json:"projectId"`
	// 所属环境
	Workspace string `json:"workspace"`
	// 标签
	Tag string `json:"tag"`
	// 操作人
	OperatorID string `json:"operatorID"`
	// 三方addon类型 custom或者cloud,云服务就是cloud
	CustomAddonType string `json:"customAddonType"`
	// 环境变量 custom addon的环境变量配置
	Configs map[string]interface{} `json:"configs"`
	// 补充信息,云addon的信息都放在这里
	Options map[string]interface{} `json:"extra"`
}

CustomAddonCreateRequest 自定义 addon 创建请求

type CustomAddonUpdateRequest

type CustomAddonUpdateRequest struct {
	// 环境变量 custom addon的环境变量配置
	Configs map[string]interface{} `json:"configs"`
	// 补充信息,云addon的信息都放在这里
	Options map[string]interface{} `json:"extra"`
}

CustomAddonUpdateRequest 自定义 addon 更新请求

type DashBoardDTO

type DashBoardDTO struct {
	// 记录主键id
	Id uint64 `json:"id"`

	// 唯一标识
	UniqueId string `json:"uniqueId"`

	// 绘制信息
	DrawerInfoMap string `json:"drawerInfoMap"`

	// 布局信息
	Layout string `json:"layout"`
}

type DashboardCreateRequest

type DashboardCreateRequest struct {
	// 布局相关json
	Layout string `json:"layout"`

	// 绘制相关json
	DrawerInfoMap string `json:"drawerInfoMap"`
}

type DashboardCreateResponse

type DashboardCreateResponse struct {
	Header
	Data uint64 `json:"data"`
}

type DashboardDetailRequest

type DashboardDetailRequest struct {
	// 配置id
	Id uint64 `path:"id"`
}

type DashboardDetailResponse

type DashboardDetailResponse struct {
	Header
	Data DashBoardDTO `json:"data"`
}

type DashboardListResponse

type DashboardListResponse struct {
	Header
	Data []DashBoardDTO `json:"data"`
}

type DashboardSpotLogData

type DashboardSpotLogData struct {
	Lines []DashboardSpotLogLine `json:"lines"`
}

type DashboardSpotLogLine

type DashboardSpotLogLine struct {
	ID         string `json:"id"`
	Source     string `json:"source"`
	Stream     string `json:"stream"`
	TimeBucket string `json:"timeBucket"`
	TimeStamp  string `json:"timestamp"`
	Content    string `json:"content"`
	Offset     string `json:"offset"`
	Level      string `json:"level"`
	RequestID  string `json:"requestId"`
}

type DashboardSpotLogRequest

type DashboardSpotLogRequest struct {
	ID     string
	Source DashboardSpotLogSource
	Stream DashboardSpotLogStream
	Count  int64
	Start  time.Duration // 纳秒
	End    time.Duration // 纳秒
}

type DashboardSpotLogResponse

type DashboardSpotLogResponse struct {
	Header
	Data DashboardSpotLogData `json:"data"`
}

type DashboardSpotLogSource

type DashboardSpotLogSource string
var (
	DashboardSpotLogSourceJob       DashboardSpotLogSource = "job"
	DashboardSpotLogSourceContainer DashboardSpotLogSource = "container"
	DashboardSpotLogSourceDeploy    DashboardSpotLogSource = "deploy"
)

type DashboardSpotLogStream

type DashboardSpotLogStream string
var (
	DashboardSpotLogStreamStdout DashboardSpotLogStream = "stdout"
	DashboardSpotLogStreamStderr DashboardSpotLogStream = "stderr"
)

type DataDomainDTO

type DataDomainDTO struct {
	BaseParam
}

type DataItem

type DataItem struct {
	UserId       []string  `json:"userId"`
	CreatedAt    time.Time `json:"createdAt"`
	Id           int64     `json:"id"`
	NotifyID     string    `json:"notifyId"`
	NotifyName   string    `json:"notifyName"`
	Target       string    `json:"target"`
	NotifyTarget []Value   `json:"groupInfo"`
	Enable       bool      `json:"enable"`
	Items        []string  `json:"items"`
}

type DeleteBranchRuleResponse

type DeleteBranchRuleResponse struct {
	Header
	Data *BranchRule `json:"data"`
}

type DeleteClientReq

type DeleteClientReq struct {
	OrgID     uint64
	Identity  *IdentityInfo
	URIParams *DeleteClientURIParams
}

type DeleteClientURIParams

type DeleteClientURIParams struct {
	ClientID uint64 `json:"clientID" schema:"clientID"`
}

type DeleteCloudAccountRequest

type DeleteCloudAccountRequest struct {
	Vendor    string `json:"vendor"`
	AccessKey string `json:"accessKeyID"`
}

type DeleteCloudAccountResponse

type DeleteCloudAccountResponse struct {
	Header
}

type DeleteCloudResourceMysqlDBRequest

type DeleteCloudResourceMysqlDBRequest struct {
	CloudAddonResourceDeleteRequest
	DatabaseName string `json:"databaseName"`
}

delete mysql database request

type DeleteCloudResourceMysqlRequest

type DeleteCloudResourceMysqlRequest CloudAddonResourceDeleteRequest

delete mysql request

type DeleteCloudResourceOnsRequest

type DeleteCloudResourceOnsRequest CloudAddonResourceDeleteRequest

delete ons request

type DeleteCloudResourceOnsTopicRequest

type DeleteCloudResourceOnsTopicRequest struct {
	CloudAddonResourceDeleteRequest
	TopicName string `json:"topicName"`
}

delete ons topic request

type DeleteCloudResourceOssRequest

type DeleteCloudResourceOssRequest CloudAddonResourceDeleteRequest

delete oss request

type DeleteCloudResourceRedisRequest

type DeleteCloudResourceRedisRequest CloudAddonResourceDeleteRequest

delete redis request

type DeleteEvent

type DeleteEvent struct {
	Event     TemplateName `json:"event"`
	AppName   string       `json:"appName"`
	Name      string       `json:"name"`
	AppID     int64        `json:"appId"`
	ProjectID int64        `json:"projectId"`
}

DeleteEvent Gittar的删除事件

type DeleteNodesCronRequest

type DeleteNodesCronRequest struct {
	DeleteNodesRequest

	LaunchTime      string `json:"launchTime"`
	RecurrenceType  string `json:"recurrenceType"`
	RecurrenceValue string `json:"recurrenceValue"`
}

type DeleteNodesRequest

type DeleteNodesRequest struct {
	RmNodesRequest

	AccessKey string `json:"accessKey"`
	SecretKey string `json:"secretKey"`
	Region    string `json:"region"`

	ScalingGroupId string `json:"scalingGroupId"`
	InstanceIDs    string `json:"instanceIDs"` // multi instances separated by ','
	ForceDelete    bool   `json:"forceDelete"` // when add ess nodes failed, force delete them
}

type DeleteNotifyGroupResponse

type DeleteNotifyGroupResponse struct {
	Header
	Data NotifyGroup `json:"data"`
}

DeleteNotifyGroupResponse 删除通知组响应

type DeleteNotifyResponse

type DeleteNotifyResponse struct {
	Header
	Data *NotifyDetail `json:"data"`
}

DeleteNotifyResponse 删除通知响应

type DeleteNotifySourceRequest

type DeleteNotifySourceRequest struct {
	SourceType string `json:"sourceType"`
	SourceID   string `json:"sourceId"`
	OrgID      int64  `json:"-"`
}

type DeletePublishItemResponse

type DeletePublishItemResponse struct {
	Header
	Data PublishItem `json:"data"`
}

DeletePublishItemResponse 创建发布内容响应

type DeleteRepoResponse

type DeleteRepoResponse struct {
	Header
}

DeleteRepoResponse 删除repo响应

type DeleteSLAReq

type DeleteSLAReq struct {
	OrgID     uint64
	Identity  *IdentityInfo
	URIParams *SLADetailURI
}

type DeleteSceneSetResponse

type DeleteSceneSetResponse struct {
	Header
	// contains filtered or unexported fields
}

type DependencyPackageList

type DependencyPackageList struct {
	ListMetadata
	DependencyPackageSpec
}

type DependencyPackageListResponse

type DependencyPackageListResponse struct {
	Header
	Data DependencyPackageList `json:"data"`
}

type DependencyPackageSpec

type DependencyPackageSpec struct {
	Items []DependencyPackageType `json:"data"`
}

type DependencyPackageType

type DependencyPackageType struct {
	Type     string                      `json:"type"`
	Packages []DependencyPackageTypeItem `json:"packages"`
}

type DependencyPackageTypeItem

type DependencyPackageTypeItem struct {
	Name    string   `json:"name"`
	Version []string `json:"version"`
}

type DependencyPackageTypeResponse

type DependencyPackageTypeResponse struct {
	Header
	Data DependencyPackageType `json:"data"`
}

type DeployClusterJump

type DeployClusterJump struct {
	Host       string `json:"host"`
	Port       int    `json:"port"`
	User       string `json:"user"`
	Password   string `json:"password"`
	PrivateKey string `json:"privateKey"`
}

type DeployClusterRequest

type DeployClusterRequest struct {
	OrgID    int               `json:"orgID"`
	Jump     DeployClusterJump `json:"jump"`
	Config   Sysconf           `json:"config"`
	DeployID string            `json:"deployID"`
}

type DeployStagesAddonsRequest

type DeployStagesAddonsRequest struct {
}

type DeployStagesDomainsRequest

type DeployStagesDomainsRequest struct {
}

type DeployStagesServicesRequest

type DeployStagesServicesRequest struct {
}

type Deployment

type Deployment struct {
	ID             uint64           `json:"id"`
	RuntimeID      uint64           `json:"runtimeId"`
	BuildID        uint64           `json:"buildId"`
	ReleaseID      string           `json:"releaseId"`
	ReleaseName    string           `json:"releaseName"`
	Type           string           `json:"type"`
	Status         DeploymentStatus `json:"status"`
	Phase          DeploymentPhase  `json:"phase"`
	Step           DeploymentPhase  `json:"step"` // Deprecated: use phase instead
	FailCause      string           `json:"failCause"`
	Outdated       bool             `json:"outdated"`
	NeedApproval   bool             `json:"needApproval"`
	ApprovedByUser string           `json:"approvedByUser"`
	ApprovedAt     *time.Time       `json:"approvedAt"`
	ApprovalStatus string           `json:"approvalStatus"`
	ApprovalReason string           `json:"approvalReason"`

	Operator       string     `json:"operator"`
	OperatorName   string     `json:"operatorName"`   // Deprecated
	OperatorAvatar string     `json:"operatorAvatar"` // Deprecated
	CreatedAt      time.Time  `json:"createdAt"`
	FinishedAt     *time.Time `json:"finishedAt"`
	RollbackFrom   uint64     `json:"rollbackFrom"`
}

type DeploymentApproveRequest

type DeploymentApproveRequest struct {
	ID     uint64 `json:"id"`
	Reject bool   `json:"reject"`
	Reason string `json:"reason"`
}

type DeploymentApproveResponse

type DeploymentApproveResponse struct {
	Header
}

type DeploymentCancelRequest

type DeploymentCancelRequest struct {
	RuntimeID json.Number `json:"runtimeId"`
	Operator  string      `json:"operator"`
}

type DeploymentCancelResponse

type DeploymentCancelResponse struct {
	Header
}

type DeploymentCreateResponseDTO

type DeploymentCreateResponseDTO struct {
	DeploymentID  uint64 `json:"deploymentId"`
	ApplicationID uint64 `json:"applicationId"`
	RuntimeID     uint64 `json:"runtimeId"`
}

type DeploymentCreateResponsePipelineDTO

type DeploymentCreateResponsePipelineDTO struct {
	PipelineID uint64 `json:"pipelineId"`
}

type DeploymentDetailListData

type DeploymentDetailListData struct {
	Total int                     `json:"total"`
	List  []*DeploymentWithDetail `json:"list"`
}

type DeploymentDetailListResponse

type DeploymentDetailListResponse struct {
	Header
	UserInfoHeader
	Data *DeploymentDetailListData `json:"data"`
}

type DeploymentListData

type DeploymentListData struct {
	Total int           `json:"total"`
	List  []*Deployment `json:"list"`
}

type DeploymentListRequest

type DeploymentListRequest struct {
	PageInfo

	// 应用实例 ID
	RuntimeID uint64 `query:"runtimeId"`

	// Org ID, 获取 'orgid' 下的所有 runtime 的 deployments
	OrgID uint64 `query:"orgId"`

	// 通过 Status 过滤,不传为默认不过滤
	StatusIn string `query:"statusIn"`
}

Request for API: `GET /api/deployments`

type DeploymentListResponse

type DeploymentListResponse struct {
	Header
	UserInfoHeader
	Data *DeploymentListData `json:"data"`
}

Response for API: `GET /api/deployments`

type DeploymentPhase

type DeploymentPhase string
const (
	DeploymentPhaseInit      DeploymentPhase = "INIT"
	DeploymentPhaseAddon     DeploymentPhase = "ADDON_REQUESTING"
	DeploymentPhaseScript    DeploymentPhase = "SCRIPT_APPLYING"
	DeploymentPhaseService   DeploymentPhase = "SERVICE_DEPLOYING"
	DeploymentPhaseRegister  DeploymentPhase = "DISCOVERY_REGISTER"
	DeploymentPhaseCompleted DeploymentPhase = "COMPLETED"
)

type DeploymentStatus

type DeploymentStatus string

Flow:

WAITAPPROVE(optional) -> I/W -> DEPLOYING -> OK

|          `---> FAILED
|          `---> CANCELING -> CANCELED
|                       `---> FAILED
`-> CANCELED
const (
	DeploymentStatusWaitApprove DeploymentStatus = "WAITAPPROVE"
	DeploymentStatusInit        DeploymentStatus = "INIT"
	DeploymentStatusWaiting     DeploymentStatus = "WAITING"
	DeploymentStatusDeploying   DeploymentStatus = "DEPLOYING"
	DeploymentStatusOK          DeploymentStatus = "OK"
	DeploymentStatusFailed      DeploymentStatus = "FAILED"
	DeploymentStatusCanceling   DeploymentStatus = "CANCELING"
	DeploymentStatusCanceled    DeploymentStatus = "CANCELED"
)

type DeploymentStatusDTO

type DeploymentStatusDTO struct {
	// 发布Id
	DeploymentID uint64 `json:"deploymentId"`
	// 状态
	Status DeploymentStatus `json:"status"`
	// 发布过程
	Phase DeploymentPhase `json:"phase"`
	// 失败原因
	FailCause string `json:"failCause"`
	// 模块错误信息
	ModuleErrMsg map[string]string           `json:"lastMessage"`
	Runtime      *DeploymentStatusRuntimeDTO `json:"runtime"`
}

type DeploymentStatusRuntimeDTO deprecated

type DeploymentStatusRuntimeDTO struct {
	Services  map[string]*DeploymentStatusRuntimeServiceDTO `json:"services"`
	Endpoints map[string]*DeploymentStatusRuntimeServiceDTO `json:"endpoints"`
}

Deprecated: use RuntimeInspect api to get ServiceGroup Info

type DeploymentStatusRuntimeServiceDTO deprecated

type DeploymentStatusRuntimeServiceDTO struct {
	PublicHosts []string `json:"publicHosts"`
	Host        string   `json:"host"`
	Ports       []int    `json:"ports"`
}

Deprecated: use RuntimeInspect api to get ServiceGroup Info

type DeploymentWithDetail

type DeploymentWithDetail struct {
	Deployment
	RuntimeName     string `json:"runtimeName"`
	ApplicationName string `json:"applicationName"`
	ApplicationID   uint64 `json:"applicationId"`
	ProjectName     string `json:"projectName"`
	ProjectID       uint64 `json:"projectId"`
	BranchName      string `json:"branchName"`
	CommitID        string `json:"commitId"`
	CommitMessage   string `json:"commitMessage"`
}

type DereferenceClusterRequest

type DereferenceClusterRequest struct {
	// 查询集群需要带的query参数
	Cluster string `query:"clusterName"`
	// 企业ID
	OrgID int64 `json:"orgID"`
}

解除集群绑定关系request

type DereferenceClusterResponse

type DereferenceClusterResponse struct {
	Header
	Data string `json:"data"`
}

解除集群绑定关系response

type DerivativeIndexDTO

type DerivativeIndexDTO struct {
	ExtBaseParam
	Type string `json:"type"`
	// contains filtered or unexported fields
}

type DetailResponse

type DetailResponse struct {
	Id         int64  `json:"id"`
	NotifyID   string `json:"notifyId"`
	NotifyName string `json:"notifyName"`
	Target     string `json:"target"`
	GroupType  string `json:"groupType"`
}

type Dice

type Dice struct {
	// name of dice, namespace + name is unique
	// ID is the hash string identity for dice info like 'x389vj1l23...'
	ID string `json:"name"`
	// namespace of dice, namespace + name is unique
	// Type indicates the type of dice, it contains services, group-addon ...
	// Type and ID will compose the unique namespaces for kubernetes when Namespaces is empty
	Type string `json:"namespace"`
	// labels for extension and some tags
	Labels map[string]string `json:"labels"`
	// bunch of services running together with dependencies each other
	Services []Service `json:"services"`
	// service discovery kind: VIP, PROXY, NONE
	ServiceDiscoveryKind string `json:"serviceDiscoveryKind"`
	// Defines the way dice do env injection.
	//
	// GLOBAL:
	//   each service can see every services
	// DEPEND:
	//   each service can see what he depends (XXX_HOST, XXX_PORT)
	ServiceDiscoveryMode string `json:"serviceDiscoveryMode,omitempty"`

	// Namespace indicates namespace for kubernetes
	ProjectNamespace string `json:"projectNamespace"`
}

Ubiquitous dice entity (we call it dice.json)

type DicePipelineSnippetClient

type DicePipelineSnippetClient struct {
	ID    uint64                     `json:"id"`
	Name  string                     `json:"name"`
	Host  string                     `json:"host"`
	Extra PipelineSnippetClientExtra `json:"extra"`
}

type DiceWorkspace

type DiceWorkspace string

DiceWorkspace dice 部署环境:DEV、TEST、STAGING、PROD

const (
	DefaultWorkspace DiceWorkspace = "DEFAULT"
	// DevWorkspace 开发环境
	DevWorkspace DiceWorkspace = "DEV"
	// TestWorkspace 测试环境
	TestWorkspace DiceWorkspace = "TEST"
	// StagingWorkspace 预发环境
	StagingWorkspace DiceWorkspace = "STAGING"
	// ProdWorkspace 生产环境
	ProdWorkspace DiceWorkspace = "PROD"
)

func (DiceWorkspace) Deployable

func (s DiceWorkspace) Deployable() bool

Deployable 是否可部署的合法环境

func (DiceWorkspace) String

func (w DiceWorkspace) String() string

type Diff

type Diff struct {
	FilesChanged  int         `json:"filesChanged"`
	TotalAddition int         `json:"totalAddition"`
	TotalDeletion int         `json:"totalDeletion"`
	Files         []*DiffFile `json:"files"`
	IsFinish      bool        `json:"isFinish"`
}

Diff 对比数据

type DiffFile

type DiffFile struct {
	Name    string `json:"name"`
	OldName string `json:"oldName"`

	// 40-byte SHA, Changed/New: new SHA; Deleted: old SHA
	Index       string         `json:"index"`
	Addition    int            `json:"addition"`
	Deletion    int            `json:"deletion"`
	Type        string         `json:"type"`
	IsBin       bool           `json:"isBin"`
	IsSubmodule bool           `json:"isSubmodule"`
	Sections    []*DiffSection `json:"sections"`
	HasMore     bool           `json:"hasMore"`
	OldMode     string         `json:"oldMode"`
	NewMode     string         `json:"newMode"`
}

DiffFile 单文件对比数据

type DiffLine

type DiffLine struct {
	OldLineNo int    `json:"oldLineNo"`
	NewLineNo int    `json:"newLineNo"`
	Type      string `json:"type"`
	Content   string `json:"content"`
}

DiffLine 差异行

type DiffSection

type DiffSection struct {
	Lines []*DiffLine `json:"lines"`
}

DiffSection 对比块

type DimDTO

type DimDTO struct {
	ExtBaseParam
	Relations []RelationDTO `json:"relations"`
}

type DisableNotifyResponse

type DisableNotifyResponse struct {
	Header
	Data *NotifyDetail `json:"data"`
}

DisableNotifyResponse 禁用通知响应

type Docker

type Docker struct {
	DataRoot  string `json:"dataRoot"`
	ExecRoot  string `json:"execRoot"`
	BIP       string `json:"bip"`
	FixedCIDR string `json:"fixedCIDR"`
}

Docker Docker 配置

type Domain

type Domain struct {
	AppName      string `json:"appName"`
	DomainID     uint64 `json:"domainId"` // Deprecated
	Domain       string `json:"domain"`
	DomainType   string `json:"domainType"`
	CustomDomain string `json:"customDomain"`
	RootDomain   string `json:"rootDomain"` // Deprecated
	UseHttps     bool   `json:"useHttps"`   // Deprecated
}

type DomainGroup

type DomainGroup = map[string][]*Domain

type DomainListRequest

type DomainListRequest struct {
	// 应用实例 ID
	RuntimeID uint64 `path:"runtimeId"`
}

DomainListRequest 域名查询请求

type DomainListResponse

type DomainListResponse struct {
	Header
	Data DomainGroup `json:"data"`
}

DomainListResponse 域名查询响应

type DomainUpdateRequest

type DomainUpdateRequest struct {
	// 应用实例 ID
	RuntimeID uint64 `path:"runtimeId"`
	Body      DomainGroup
}

DomainUpdateRequest 域名更新请求

type DomainUpdateResponse

type DomainUpdateResponse struct {
	Header
	Data DomainGroup `json:"data"`
}

DomainUpdateResponse 域名更新响应

type DownloadSpecTextQueryParams

type DownloadSpecTextQueryParams struct {
	SpecProtocol string
}

type DownloadSpecTextReq

type DownloadSpecTextReq struct {
	OrgID       uint64
	Identity    *IdentityInfo
	URIParams   *DownloadSpecTextURIParams
	QueryParams *DownloadSpecTextQueryParams
}

type DownloadSpecTextURIParams

type DownloadSpecTextURIParams struct {
	AssetID   string
	VersionID uint64
}

type DrainNodeRequest

type DrainNodeRequest struct {
	NodeName string `json:"nodeName"`

	// Continue even if there are pods not managed by a ReplicationController, ReplicaSet, Job, DaemonSet or StatefulSet
	Force bool `json:"force"`
	// Ignore DaemonSet-managed pods
	IgnoreAllDaemonSets bool `json:"ignoreAllDaemonSets"`
	// Continue even if there are pods using emptyDir (local data that will be deleted when the node is drained)
	DeleteLocalData bool `json:"deleteLocalData"`
	// The length of time to wait before giving up, zero means infinite
	Timeout time.Duration `json:"timeout"`
	// Period of time in seconds given to each pod to terminate gracefully. If negative, the default value specified in the pod will be use
	GracePeriodSeconds int `json:"gracePeriodSeconds"`
	// Label selector to filter pods on the node
	PodSelector string `json:"podSelector"`

	Selector string `json:"selector"`
	// DisableEviction forces drain to use delete rather than evict
	DisableEviction bool `json:"disableEviction"`
	// SkipWaitForDeleteTimeoutSeconds ignores pods that have a
	// DeletionTimeStamp > N seconds. It's up to the user to decide when this
	// option is appropriate; examples include the Node is unready and the pods
	// won't drain otherwise
	SkipWaitForDeleteTimeoutSeconds int
}

type DurationUnit

type DurationUnit string
const (
	DurationSecond DurationUnit = "s"
	DurationMinute DurationUnit = "m"
	DurationHour   DurationUnit = "h"
	DurationDay    DurationUnit = "d"
)

func (DurationUnit) Valid

func (s DurationUnit) Valid() bool

type EcsInfoReq

type EcsInfoReq struct {
	BasicCloudConf
	InstanceIds []string `json:"instanceIds"`
	PrivateIPs  []string `json:"privateIPs"`
}

ecs

type EdasContainerListRequest

type EdasContainerListRequest struct {
	ProjectID  uint64   `query:"projectId"`
	AppID      uint64   `query:"appId"`
	RuntimeID  uint64   `query:"runtimeId"`
	Workspace  string   `query:"workspace"` // DEV/TEST/STAGING/PROD
	Service    string   `query:"service"`
	EdasAppIDs []string `query:"edasAppId"` // 可传多个
}

EdasContainerListRequest edas 实例列表请求

type EdgeAppCreateRequest

type EdgeAppCreateRequest struct {
	ID                  int64     `json:"id"`
	OrgID               int64     `json:"orgID"`
	Name                string    `json:"name"`
	ClusterID           int64     `json:"clusterID"`
	Type                string    `json:"type"`
	Image               string    `json:"image"`
	ProductID           int64     `json:"productID"`
	AddonName           string    `json:"addonName"`
	AddonVersion        string    `json:"addonVersion"`
	RegistryAddr        string    `json:"registryAddr"`
	RegistryUser        string    `json:"registryUser"`
	RegistryPassword    string    `json:"registryPassword"`
	ConfigSetName       string    `json:"configSetName"`
	Replicas            int32     `json:"replicas"`
	HealthCheckType     string    `json:"healthCheckType"`
	HealthCheckHttpPort int       `json:"healthCheckHttpPort"`
	HealthCheckHttpPath string    `json:"healthCheckHttpPath"`
	HealthCheckExec     string    `json:"healthCheckExec"`
	Description         string    `json:"description"`
	EdgeSites           []string  `json:"edgeSites"`
	DependApp           []string  `json:"dependApp"`
	LimitCpu            float64   `json:"limitCpu"`
	RequestCpu          float64   `json:"requestCpu"`
	LimitMem            float64   `json:"limitMem"`
	RequestMem          float64   `json:"requestMem"`
	PortMaps            []PortMap `json:"portMaps"`
}

EdgeAppCreateRequest 创建边缘应用请求

type EdgeAppDeleteRequest

type EdgeAppDeleteRequest struct {
	ID           int64  `json:"id"`
	OrgID        int64  `json:"orgID"`
	Name         string `json:"name"`
	ClusterID    int64  `json:"clusterID"`
	Type         string `json:"type"`
	AddonName    string `json:"addonName"`
	AddonVersion string `json:"addonVersion"`
}

EdgeAppDeleteRequest 删除边缘应用请求

type EdgeAppInfo

type EdgeAppInfo struct {
	ID                  uint64            `json:"id"`
	OrgID               int64             `json:"orgID"`
	Name                string            `json:"name"`
	ClusterID           int64             `json:"clusterID"`
	Type                string            `json:"type"`
	Image               string            `json:"image"`
	RegistryAddr        string            `json:"registryAddr"`
	RegistryUser        string            `json:"registryUser"`
	RegistryPassword    string            `json:"registryPassword"`
	HealthCheckType     string            `json:"healthCheckType"`
	HealthCheckHttpPort int               `json:"healthCheckHttpPort"`
	HealthCheckHttpPath string            `json:"healthCheckHttpPath"`
	HealthCheckExec     string            `json:"healthCheckExec"`
	ProductID           int64             `json:"productID"`
	AddonName           string            `json:"addonName"`
	AddonVersion        string            `json:"addonVersion"`
	ConfigSetName       string            `json:"configSetName"`
	Replicas            int32             `json:"replicas"`
	Description         string            `json:"description"`
	EdgeSites           []string          `json:"edgeSites"`
	DependApp           []string          `json:"dependApp,omitempty"`
	LimitCpu            float64           `json:"limitCpu"`
	RequestCpu          float64           `json:"requestCpu"`
	LimitMem            float64           `json:"limitMem"`
	RequestMem          float64           `json:"requestMem"`
	PortMaps            []PortMap         `json:"portMaps"`
	ExtraData           map[string]string `json:"extraData"`
}

EdgeAppInfo 边缘应用信息

type EdgeAppListPageRequest

type EdgeAppListPageRequest struct {
	OrgID     int64
	ClusterID int64
	PageNo    int `query:"pageNo"`
	PageSize  int `query:"pageSize"`
}

EdgeAppListPageRequest 分页查询请求

type EdgeAppListResponse

type EdgeAppListResponse struct {
	Total int           `json:"total"`
	List  []EdgeAppInfo `json:"list"`
}

EdgeAppListResponse 边缘应用列表响应体

type EdgeAppSiteRequest

type EdgeAppSiteRequest struct {
	SiteName string `json:"siteName"`
}

type EdgeAppSiteStatus

type EdgeAppSiteStatus struct {
	SITE   string `json:"site"`
	STATUS string `json:"status"`
}

type EdgeAppState

type EdgeAppState struct {
	AppID         uint64 `json:"appID"`
	PageNo        int    `json:"pageNo,omitempty"`
	PageSize      int    `json:"pageSize,omitempty"`
	Visible       bool   `json:"visible,omitempty"`
	FormClear     bool   `json:"formClear,omitempty"`
	OperationType string `json:"operationType,omitempty"`
}

type EdgeAppStatusListRequest

type EdgeAppStatusListRequest struct {
	AppID     int64
	PageSize  int
	PageNo    int
	NotPaging bool
}

type EdgeAppStatusResponse

type EdgeAppStatusResponse struct {
	ID        int64               `json:"id"`
	OrgID     int64               `json:"orgID"`
	Name      string              `json:"name"`
	ClusterID int64               `json:"clusterID"`
	Type      string              `json:"type"`
	Total     int                 `json:"total"`
	SiteList  []EdgeAppSiteStatus `json:"siteList"`
}

type EdgeAppUpdateRequest

type EdgeAppUpdateRequest struct {
	ID                  int64     `json:"id"`
	OrgID               int64     `json:"orgID"`
	Name                string    `json:"name"`
	ClusterID           int64     `json:"clusterID"`
	Type                string    `json:"type"`
	Image               string    `json:"image"`
	ProductID           int64     `json:"productID"`
	AddonName           string    `json:"addonName"`
	AddonVersion        string    `json:"addonVersion"`
	RegistryAddr        string    `json:"registryAddr"`
	RegistryUser        string    `json:"registryUser"`
	RegistryPassword    string    `json:"registryPassword"`
	HealthCheckType     string    `json:"healthCheckType"`
	HealthCheckHttpPort int       `json:"healthCheckHttpPort"`
	HealthCheckHttpPath string    `json:"healthCheckHttpPath"`
	HealthCheckExec     string    `json:"healthCheckExec"`
	ConfigSetName       string    `json:"configSetName"`
	Replicas            int32     `json:"replicas"`
	Description         string    `json:"description"`
	EdgeSites           []string  `json:"edgeSites"`
	DependApp           []string  `json:"dependApp"`
	LimitCpu            float64   `json:"limitCpu"`
	RequestCpu          float64   `json:"requestCpu"`
	LimitMem            float64   `json:"limitMem"`
	RequestMem          float64   `json:"requestMem"`
	PortMaps            []PortMap `json:"portMaps"`
}

EdgeAppUpdateRequest 更新边缘应用请求

type EdgeButtonOption

type EdgeButtonOption struct {
	Text   string `json:"text"`
	Status string `json:"status"`
	Key    string `json:"key"`
}

type EdgeButtonProps

type EdgeButtonProps struct {
	Type string `json:"type"`
	Text string `json:"text"`
}

type EdgeCfgSetItemCreateRequest

type EdgeCfgSetItemCreateRequest struct {
	ConfigSetID int64   `json:"configSetID"`
	Scope       string  `json:"scope"`
	SiteIDs     []int64 `json:"siteIDs"`
	ItemKey     string  `json:"itemKey"`
	ItemValue   string  `json:"itemValue"`
}

EdgeCfgSetItemCreateRequest 创建边缘站点请求

type EdgeCfgSetItemInfo

type EdgeCfgSetItemInfo struct {
	ID              int64     `json:"id"`
	ConfigSetID     int64     `json:"configSetID"`
	SiteID          int64     `json:"siteID"`
	SiteName        string    `json:"siteName"`
	SiteDisplayName string    `json:"siteDisplayName"`
	ItemKey         string    `json:"itemKey"`
	ItemValue       string    `json:"itemValue"`
	Scope           string    `json:"scope"`
	CreatedAt       time.Time `json:"createdAt"`
	UpdatedAt       time.Time `json:"updatedAt"`
}

EdgeCfgSetItemInfo 边缘站点配置信息

type EdgeCfgSetItemListPageRequest

type EdgeCfgSetItemListPageRequest struct {
	Scope       string
	ConfigSetID int64
	Search      string
	SiteID      int64
	NotPaging   bool
	PageNo      int `query:"pageNo"`
	PageSize    int `query:"pageSize"`
}

EdgeCfgSetItemListPageRequest 分页查询请求

type EdgeCfgSetItemListResponse

type EdgeCfgSetItemListResponse struct {
	Total int                  `json:"total"`
	List  []EdgeCfgSetItemInfo `json:"list"`
}

EdgeCfgSetItemListResponse 站点列表响应体

type EdgeCfgSetItemUpdateRequest

type EdgeCfgSetItemUpdateRequest struct {
	EdgeCfgSetItemCreateRequest
}

EdgeCfgSetItemUpdateRequest 更新边缘站点请求

type EdgeCfgSetState

type EdgeCfgSetState struct {
	ConfigSetItemID int64 `json:"configSetItemID"`
	PageNo          int   `json:"pageNo,omitempty"`
	PageSize        int   `json:"pageSize,omitempty"`
	Visible         bool  `json:"visible,omitempty"`
	FormClear       bool  `json:"formClear,omitempty"`
}

type EdgeColumns

type EdgeColumns struct {
	Title     string `json:"title"`
	DataIndex string `json:"dataIndex"`
	Width     int    `json:"width"`
}

type EdgeConditions

type EdgeConditions struct {
	Fixed       bool                     `json:"fixed"`
	EmptyText   string                   `json:"emptyText,omitempty"`
	Key         string                   `json:"key"`
	Label       string                   `json:"label"`
	Type        string                   `json:"type"`
	Placeholder string                   `json:"placeholder"`
	ShowIndex   int                      `json:"showIndex,omitempty"`
	Options     []map[string]interface{} `json:"options,omitempty"`
}

type EdgeConfigSetCreateRequest

type EdgeConfigSetCreateRequest struct {
	ClusterID   int64  `json:"clusterID"`
	OrgID       int64  `json:"orgID"`
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`
	Description string `json:"description"`
}

EdgeConfigSetCreateRequest 创建边缘站点请求

type EdgeConfigSetInfo

type EdgeConfigSetInfo struct {
	ID          int64     `json:"id"`
	OrgID       int64     `json:"orgID"`
	Name        string    `json:"name"`
	DisplayName string    `json:"displayName"`
	ClusterID   int64     `json:"clusterID"`
	ClusterName string    `json:"clusterName"`
	Description string    `json:"description"`
	CreatedAt   time.Time `json:"createdAt"`
	UpdatedAt   time.Time `json:"updatedAt"`
}

EdgeConfigSetInfo 边缘站点配置信息

type EdgeConfigSetListPageRequest

type EdgeConfigSetListPageRequest struct {
	OrgID     int64
	ClusterID int64
	NotPaging bool
	PageNo    int `query:"pageNo"`
	PageSize  int `query:"pageSize"`
}

EdgeConfigSetListPageRequest 分页查询请求

type EdgeConfigSetListResponse

type EdgeConfigSetListResponse struct {
	Total int                 `json:"total"`
	List  []EdgeConfigSetInfo `json:"list"`
}

EdgeConfigSetListResponse 站点列表响应体

type EdgeConfigSetUpdateRequest

type EdgeConfigSetUpdateRequest struct {
	DisplayName string `json:"displayName"`
	Description string `json:"description"`
}

EdgeConfigSetUpdateRequest 更新边缘站点请求

type EdgeDrawerProps

type EdgeDrawerProps struct {
	Size  string `json:"size"`
	Title string `json:"title"`
}

type EdgeEventMeta

type EdgeEventMeta struct {
	Meta map[string]int64 `json:"meta"`
}

type EdgeFormModalField

type EdgeFormModalField struct {
	Key            string                     `json:"key"`
	Label          string                     `json:"label"`
	LabelTip       string                     `json:"labelTip,omitempty"`
	Component      string                     `json:"component"`
	Required       bool                       `json:"required"`
	Rules          []EdgeFormModalFieldRule   `json:"rules,omitempty"`
	Group          string                     `json:"group,omitempty"`
	Disabled       bool                       `json:"disabled"`
	InitialValue   string                     `json:"initialValue,omitempty"`
	DefaultValue   string                     `json:"defaultValue,omitempty"`
	RemoveWhen     [][]map[string]interface{} `json:"removeWhen,omitempty"`
	ComponentProps map[string]interface{}     `json:"componentProps,omitempty"`
	Operations     EdgeOperations             `json:"operations,omitempty"`
	IsPassword     bool                       `json:"isPassword,omitempty"`
}

type EdgeFormModalFieldRule

type EdgeFormModalFieldRule struct {
	Pattern string `json:"pattern"`
	Message string `json:"msg"`
}

type EdgeFormModalPointProps

type EdgeFormModalPointProps struct {
	Title       string                `json:"title,omitempty"`
	Name        string                `json:"name,omitempty"`
	Fields      []*EdgeFormModalField `json:"fields"`
	ReadOnly    bool                  `json:"readOnly,omitempty"`
	FooterAlign string                `json:"footerAlign,omitempty"`
}

type EdgeFormModalProps

type EdgeFormModalProps struct {
	Title       string               `json:"title,omitempty"`
	Name        string               `json:"name,omitempty"`
	Fields      []EdgeFormModalField `json:"fields"`
	FooterAlign string               `json:"footerAlign,omitempty"`
}

type EdgeItemOperation

type EdgeItemOperation struct {
	ShowIndex   int                    `json:"showIndex,omitempty"`
	Key         string                 `json:"key"`
	Text        string                 `json:"text"`
	Reload      bool                   `json:"reload"`
	Disabled    bool                   `json:"disabled,omitempty"`
	DisabledTip string                 `json:"disabledTip,omitempty"`
	Confirm     string                 `json:"confirm,omitempty"`
	Meta        map[string]interface{} `json:"meta,omitempty"`
	Command     EdgeJumpCommand        `json:"command,omitempty"`
}

type EdgeItemOperations

type EdgeItemOperations struct {
	RenderType string                       `json:"renderType"`
	Value      string                       `json:"value,omitempty"`
	Operations map[string]EdgeItemOperation `json:"operations,omitempty"`
	Status     string                       `json:"status,omitempty"`
}

type EdgeJumpCommand

type EdgeJumpCommand struct {
	Key     string               `json:"key,omitempty"`
	Target  string               `json:"target,omitempty"`
	JumpOut bool                 `json:"jumpOut"`
	State   EdgeJumpCommandState `json:"state,omitempty"`
}

type EdgeJumpCommandState

type EdgeJumpCommandState struct {
	Params   map[string]interface{} `json:"params,omitempty"`
	Query    map[string]interface{} `json:"query,omitempty"`
	Visible  bool                   `json:"visible"`
	FormData map[string]interface{} `json:"formData,omitempty"`
	ReadOnly bool                   `json:"readOnly,omitempty"`
}

type EdgeKVListColumns

type EdgeKVListColumns struct {
	EdgeColumns
	ColSpan int `json:"colSpan"`
}

type EdgeKVListProps

type EdgeKVListProps struct {
	Visible    bool                `json:"visible"`
	Pagination bool                `json:"pagination"`
	RowKey     string              `json:"rowKey"`
	Columns    []EdgeKVListColumns `json:"columns"`
}

type EdgeKVListTitleProps

type EdgeKVListTitleProps struct {
	Visible bool   `json:"visible"`
	Title   string `json:"title"`
	Level   int    `json:"level"`
}

type EdgeOperation

type EdgeOperation struct {
	Key      string                 `json:"key"`
	Reload   bool                   `json:"reload"`
	Command  EdgeJumpCommand        `json:"command,omitempty"`
	FillMeta string                 `json:"fillMeta,omitempty"`
	Meta     map[string]interface{} `json:"meta,omitempty"`
}

type EdgeOperations

type EdgeOperations = map[string]interface{}

type EdgePageState

type EdgePageState struct {
	Total    int `json:"total"`
	PageSize int `json:"pageSize"`
	PageNo   int `json:"pageNo"`
}

type EdgeRadioProps

type EdgeRadioProps struct {
	RadioType   string             `json:"radioType"`
	ButtonStyle string             `json:"buttonStyle"`
	Size        string             `json:"size"`
	Options     []EdgeButtonOption `json:"options"`
}

type EdgeRenderingID

type EdgeRenderingID struct {
	ID int64 `json:"id"`
}

type EdgeSearchCondition

type EdgeSearchCondition struct {
	Values struct {
		Condition string `json:"condition"`
	} `json:"values"`
}

type EdgeSearchState

type EdgeSearchState struct {
	SearchCondition string `json:"searchCondition"`
}

type EdgeSiteCreateRequest

type EdgeSiteCreateRequest struct {
	OrgID       int64  `json:"orgID"`
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`
	ClusterID   int64  `json:"clusterID"`
	Description string `json:"description"`
	Status      int64  `json:"status"`
}

EdgeSiteCreateRequest 创建边缘站点请求

type EdgeSiteInfo

type EdgeSiteInfo struct {
	ID          int64     `json:"id"`
	OrgID       int64     `json:"orgID"`
	Name        string    `json:"name"`
	DisplayName string    `json:"displayName"`
	ClusterID   int64     `json:"clusterID"`
	ClusterName string    `json:"clusterName"`
	Description string    `json:"description"`
	NodeCount   string    `json:"nodeCount"`
	Status      int64     `json:"status"`
	CreatedAt   time.Time `json:"createdAt"`
	UpdatedAt   time.Time `json:"updatedAt"`
}

type EdgeSiteListPageRequest

type EdgeSiteListPageRequest struct {
	OrgID     int64
	ClusterID int64
	NotPaging bool
	Search    string
	PageNo    int `query:"pageNo"`
	PageSize  int `query:"pageSize"`
}

EdgeSiteListPageRequest 分页查询请求, NotPaging 参数默认为 false,开启分页

type EdgeSiteListResponse

type EdgeSiteListResponse struct {
	Total int            `json:"total"`
	List  []EdgeSiteInfo `json:"list"`
}

EdgeSiteListResponse 站点列表响应体

type EdgeSiteState

type EdgeSiteState struct {
	SiteID          int64  `json:"siteID"`
	PageNo          int    `json:"pageNo,omitempty"`
	PageSize        int    `json:"pageSize,omitempty"`
	Visible         bool   `json:"visible,omitempty"`
	FormClear       bool   `json:"formClear,omitempty"`
	SearchCondition string `json:"searchCondition"`
}

type EdgeSiteUpdateRequest

type EdgeSiteUpdateRequest struct {
	DisplayName string `json:"displayName"`
	Description string `json:"description"`
	Status      int64  `json:"status"`
}

EdgeSiteUpdateRequest 更新边缘站点请求

type EdgeTableProps

type EdgeTableProps struct {
	PageSizeOptions []string      `json:"pageSizeOptions"`
	RowKey          string        `json:"rowKey"`
	Columns         []EdgeColumns `json:"columns"`
}

type EdgeTextBadge

type EdgeTextBadge struct {
	RenderType string `json:"renderType"`
	Value      string `json:"value"`
	Status     string `json:"status,omitempty"`
}

type EdgeViewGroupSelectState

type EdgeViewGroupSelectState struct {
	ViewGroupSelected string `json:"viewGroupSelected"`
}

type EditActionItem

type EditActionItem struct {
	//支持操作 add/delete
	Action  string `json:"action"`
	Content string `json:"content"`
	Path    string `json:"path"`

	//支持类型 tree/blob
	PathType string `json:"pathType"`
}

EditActionItem 编辑操作

type EditOrCreateModalData

type EditOrCreateModalData struct {
	Name     string   `json:"name"`   //通知名称
	Target   int      `json:"target"` //选中的通知群组id
	Items    []string `json:"items"`  //选中的通知模版id
	Id       int      `json:"id"`
	Channels []string `json:"channels"` //通知方式
}

type EffectivenessRequest

type EffectivenessRequest struct {
	// 插件参数
	PluginParamDto PluginParamDto `query:"remoteUri"`
}

Request for API: `POST /api/bi/questions/plugin/execute`

type EffectivenessResponse

type EffectivenessResponse struct {
	Header
	Data WidgetResponse `json:"data"`
}

type ElfMetadata

type ElfMetadata struct {
	ID               uint64    `json:"id"`
	Name             string    `json:"name"`
	Description      string    `json:"description"`
	Workspace        string    `json:"workspace"`
	OwnerName        string    `json:"ownerName"`
	OwnerID          uint64    `json:"ownerID"`
	OrganizationID   uint64    `json:"organizationID"`
	OrganizationName string    `json:"organizationName"`
	CreatedAt        time.Time `json:"createdAt"`
	UpdatedAt        time.Time `json:"updatedAt"`
}

type ElfResource

type ElfResource struct {
	CPU    float64 `json:"cpu"`    // CPU 资源大小
	Memory int     `json:"memory"` // 内存资源大小
}

type EnableNotifyResponse

type EnableNotifyResponse struct {
	Header
	Data *NotifyDetail `json:"data"`
}

EnableNotifyResponse 启用通知响应

type EndpointDomainsItem

type EndpointDomainsItem struct {
	// Domain 域名
	Domain string `json:"domain"`
	// Type 域名类型,CUSTOM or DEFAULT
	Type string `json:"type"`
}

EndpointDomainsItem 对外暴露地址信息

type EndpointInfoResponse

type EndpointInfoResponse struct {
	Header
	Data PackageInfoDto `json:"data"`
}

type Enumerate

type Enumerate struct {
	ID    int64  `json:"id"`
	Name  string `json:"name"`
	Index int64  `json:"index"`
}

字段枚举值

type EnvConfig

type EnvConfig struct {
	Key   string `json:"key"`
	Value string `json:"value"`
	// ENV, FILE
	ConfigType string `json:"configType"`
	Comment    string `json:"comment"`
	Status     string `json:"status"`
	Source     string `json:"source"`
	Type       string `json:"type"` // dice-file/kv
	Encrypt    bool   `json:"encrypt"`
	// Operations 配置项操作,若为 nil,则使用默认配置: canDownload=false, canEdit=true, canDelete=true
	Operations *PipelineCmsConfigOperations `json:"operations"`
	CreateTime time.Time                    `json:"createTime,omitempty"`
	UpdateTime time.Time                    `json:"updateTime,omitempty"`
}

EnvConfig 环境变量配置

type EnvConfigAddOrUpdateRequest

type EnvConfigAddOrUpdateRequest struct {
	Configs []EnvConfig `json:"configs"`
}

EnvConfigAddOrUpdateRequest 配置新增/更新请求 POST /api/config

type EnvConfigFetchRequest

type EnvConfigFetchRequest struct {
	Namespace string // required
	Decrypt   bool   // optional, default false

	AutoCreateIfNotExist bool                   // optional, default false
	CreateReq            NamespaceCreateRequest // 当 AutoCreateIfNotExist == true 时需要
}

EnvConfigFetchRequest namespace 配置获取请求

type EnvConfigFetchResponse

type EnvConfigFetchResponse struct {
	Header
	Data []EnvConfig `json:"data"`
}

EnvConfigFetchResponse namespace 配置获取响应

type EnvConfigPublishResponse

type EnvConfigPublishResponse struct {
	Header
}

EnvConfigPublishResponse 发布配置

type EnvMultiConfigFetchRequest

type EnvMultiConfigFetchRequest struct {
	NamespaceParams []NamespaceParam `json:"namespaceParams"`
}

EnvMultiConfigFetchRequest 获取多个 namespace 配置请求

type EnvMultiConfigFetchResponse

type EnvMultiConfigFetchResponse struct {
	Header
	Data map[string][]EnvConfig `json:"data"`
}

EnvMultiConfigFetchResponse 多个 namespace 配置响应

type Environment

type Environment struct {
	ElfMetadata
	EnvironmentSpec
}

type EnvironmentList

type EnvironmentList struct {
	ListMetadata
	EnvironmentListSpec
}

type EnvironmentListResponse

type EnvironmentListResponse struct {
	Header
	Data EnvironmentList `json:"data"`
}

type EnvironmentListSpec

type EnvironmentListSpec struct {
	Items []Environment `json:"data"`
}

type EnvironmentResponse

type EnvironmentResponse struct {
	Header
	Data Environment `json:"data"`
}

type EnvironmentSpec

type EnvironmentSpec struct {
	Requires      []Require         `json:"requires"`
	DBRequires    string            `json:"-"`
	Labels        map[string]string `json:"labels"`
	DBLabels      string            `json:"-"`
	NotebookCount int               `json:"notebook_count"`
}

type ErrMsg

type ErrMsg struct {
	Msg   string `json:"msg"`
	Stack string `json:"stack"`
}

ErrMsg 错误消息结构

type ErrorLog

type ErrorLog struct {
	ID             int64             `json:"id"`
	Level          ErrorLogLevel     `json:"level"`
	ResourceType   ErrorResourceType `json:"resourceType"`
	ResourceID     string            `json:"resourceId"`
	OccurrenceTime string            `json:"occurrenceTime"`
	HumanLog       string            `json:"humanLog"`
	PrimevalLog    string            `json:"primevalLog"`
	DedupID        string            `json:"deDupId,omitempty"`
}

ErrorLog 错误日志具体信息

func (*ErrorLog) FormartTime

func (el *ErrorLog) FormartTime() (*time.Time, error)

FormartTime 返回time.Time

type ErrorLogBatchCreateRequest

type ErrorLogBatchCreateRequest struct {
	Audits []Audit `json:"audits"`
}

ErrorLogBatchCreateRequest 错误批量创建请求

type ErrorLogBatchCreateResponse

type ErrorLogBatchCreateResponse struct {
	Header
	Data string `json:"data"`
}

ErrorLogBatchCreateResponse 错误批量创建响应

type ErrorLogCreateRequest

type ErrorLogCreateRequest struct {
	ErrorLog `json:"errorLog"`
}

ErrorLogCreateRequest 错误日志创建接口

func (*ErrorLogCreateRequest) Check

func (el *ErrorLogCreateRequest) Check() error

Check 检查错误日志创建请求是否合法

type ErrorLogCreateResponse

type ErrorLogCreateResponse struct {
	Header
	Data string `json:"data"`
}

ErrorLogCreateResponse 错误日志创建响应

type ErrorLogLevel

type ErrorLogLevel string
const (
	SuccessLevel ErrorLogLevel = "success"
	InfoLevel    ErrorLogLevel = "info"
	ErrorLevel   ErrorLogLevel = "error"
)

type ErrorLogListRequest

type ErrorLogListRequest struct {
	// +required 鉴权需要
	ScopeType ScopeType `schema:"scopeType"`
	// +required 鉴权需要
	ScopeID uint64 `schema:"scopeId"`
	// +required 资源类型
	ResourceType ErrorResourceType `schema:"resourceType"`
	// +required 资源id
	ResourceID string `schema:"resourceId"`
	// +option 根据时间过滤错误日志
	StartTime string `schema:"startTime"`
}

ErrorLogListRequest 错误日志查询请求

func (*ErrorLogListRequest) Check

func (el *ErrorLogListRequest) Check() error

Check 检查错误日志创建请求是否合法

func (*ErrorLogListRequest) GetFormartStartTime

func (el *ErrorLogListRequest) GetFormartStartTime() (*time.Time, error)

GetFormartStartTime 获取格式化的开始时间

type ErrorLogListResponse

type ErrorLogListResponse struct {
	Header
	UserInfoHeader
	Data *AuditsListResponseData `json:"data"`
}

ErrorLogListResponse 错误日志查询具体响应

type ErrorLogListResponseData

type ErrorLogListResponseData struct {
	List []ErrorLog `json:"list"`
}

ErrorLogListResponseData 错误日志查询具体响应

type ErrorResourceType

type ErrorResourceType string
const (
	PipelineError ErrorResourceType = "pipeline"
	RuntimeError  ErrorResourceType = "runtime"
	AddonError    ErrorResourceType = "addon"
)

type ErrorResponse

type ErrorResponse struct {
	Code string      `json:"code"`
	Msg  string      `json:"msg"`
	Ctx  interface{} `json:"ctx"`
}

ErrorResponse 统一的 response 的 err 部分

type EssActivityContent

type EssActivityContent struct {
	Cause       string    `json:"cause"`
	Description string    `json:"description"`
	EndTime     time.Time `json:"endTime"`
	StartTime   time.Time `json:"startTime"`
	InstanceIds []string  `json:"instanceIds"`
}

type EssActivityMsg

type EssActivityMsg struct {
	Content       EssActivityContent `json:"content"`
	Event         string             `json:"event"`
	EventStatus   string             `json:"eventStatus"`
	Product       string             `json:"product"`
	RegionId      string             `json:"regionId"`
	ReceiptHandle string             `json:"receiptHandle"` // mark received msg, used when delete this msg in mns
}

type EventBoxGroupNotifyRequest

type EventBoxGroupNotifyRequest struct {
	Sender        string
	GroupID       int64
	NotifyItem    *NotifyItem
	Channels      string
	NotifyContent *GroupNotifyContent
	Params        map[string]string
}

type EventBoxRequest

type EventBoxRequest struct {
	Sender  string                 `json:"sender"`
	Content interface{}            `json:"content"`
	Labels  map[string]interface{} `json:"labels"`
}

type EventBoxResponse

type EventBoxResponse struct {
	Header
}

type EventCreateRequest

type EventCreateRequest struct {
	EventHeader
	Sender  string
	Content interface{}
}

EventCreateRequest 用于发送 event 的 json request (非 OPENAPI) POST: <eventbox>/api/dice/eventbox/message/create

func (EventCreateRequest) MarshalJSON

func (r EventCreateRequest) MarshalJSON() ([]byte, error)

MarshalJSON EventCreateRequest 的自定义 marshal 方法 将 EventCreateRequest 序列化的结果匹配 internal/eventbox/webhook.EventMessage 也就是 使用者只要构造 EventCreateRequest, 而不用去构造 EventMessage

type EventHeader

type EventHeader struct {
	Event         string `json:"event"`
	Action        string `json:"action"`
	OrgID         string `json:"orgID"`
	ProjectID     string `json:"projectID"`
	ApplicationID string `json:"applicationID"`
	Env           string `json:"env"`
	// Content   PlaceHolder `json:"content"`
	TimeStamp string `json:"timestamp"`
}

EventHeader event 公共 header

type ExecHealthCheck

type ExecHealthCheck struct {
	Cmd string `json:"cmd,omitempty"`
	//单位是秒
	Duration int `json:"duration,omitempty"`
}

type ExistsMysqlExec

type ExistsMysqlExec struct {
	// MysqlHost host地址
	MysqlHost string `json:"mysqlHost"`
	// MysqlPort mysqlPort
	MysqlPort string `json:"mysqlPort"`
	// User 登录用户
	User string `json:"user"`
	// Password 登录密码
	Password string `json:"password"`
	// Options 额外信息
	Options map[string]string `json:"options"`
}

ExistsMysqlExec 已存在的mysql,createdb、init.sql等信息

type ExtBaseParam

type ExtBaseParam struct {
	BaseParam
	Table string `json:"table"`
	File  string `json:"file"`
}

onedata扩展参数

type Extension

type Extension struct {
	ID          uint64    `json:"id"`
	Type        string    `json:"type"`
	Name        string    `json:"name"`
	Desc        string    `json:"desc"`
	DisplayName string    `json:"displayName"`
	Category    string    `json:"category"`
	LogoUrl     string    `json:"logoUrl"`
	Public      bool      `json:"public"`
	CreatedAt   time.Time `json:"createdAt"`
	UpdatedAt   time.Time `json:"updatedAt"`
}

Extension

type ExtensionCreateRequest

type ExtensionCreateRequest struct {
	// 类型 addon|action
	Type        string `json:"type"`
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`
	Desc        string `json:"desc"`
	Category    string `json:"category"`
	LogoUrl     string `json:"logoUrl"`
	Public      bool   `json:"public"`
	Labels      string `json:"labels"`
}

ExtensionCreateRequest 创建Extension

type ExtensionCreateResponse

type ExtensionCreateResponse struct {
	Header
	Data Extension `json:"data"`
}

ExtensionCreateResponse 创建扩展返回数据

type ExtensionMenu

type ExtensionMenu struct {
	Name        string       `json:"name"`
	DisplayName string       `json:"displayName"`
	Items       []*Extension `json:"items"`
}

type ExtensionPushEvent

type ExtensionPushEvent struct {
	EventHeader
	Content ExtensionPushEventData `json:"content"`
}

ExtensionPushEvent 扩展更新事件 event: addon_extension_push |action_extension_push action: create delete update

type ExtensionPushEventData

type ExtensionPushEventData struct {
	Name    string `json:"name"`
	Version string `json:"version"`
	Type    string `json:"type"`
}

type ExtensionQueryRequest

type ExtensionQueryRequest struct {
	//默认false查询公开的扩展, true查询所有扩展
	All string `query:"all"`
	// 可选值: action、addon
	Type string `query:"type"`
	// 根据标签查询 key:value 查询满足条件的 ^key:value 查询不满足条件的
	Labels string `query:"labels"`
}

ExtensionQueryRequest 查询extension请求

type ExtensionQueryResponse

type ExtensionQueryResponse struct {
	Header
	Data []Extension `json:"data"`
}

ExtensionQueryResponse 查询extension响应

type ExtensionSearchRequest

type ExtensionSearchRequest struct {
	YamlFormat bool `json:"yamlFormat"`
	// 支持格式 name:获取默认版本 name@version:获取指定版本
	Extensions []string `json:"extensions"`
}

ExtensionSearchRequest 批量查询extension请求

type ExtensionSearchResponse

type ExtensionSearchResponse struct {
	Header
	Data map[string]ExtensionVersion `json:"data"`
}

ExtensionSearchResponse 批量查询extension响应

type ExtensionVersion

type ExtensionVersion struct {
	Name      string      `json:"name"`
	Version   string      `json:"version"`
	Type      string      `json:"type"`
	Spec      interface{} `json:"spec"`
	Dice      interface{} `json:"dice"`
	Swagger   interface{} `json:"swagger"`
	Readme    string      `json:"readme"`
	CreatedAt time.Time   `json:"createdAt"`
	UpdatedAt time.Time   `json:"updatedAt"`
	IsDefault bool        `json:"isDefault"`
	Public    bool        `json:"public"`
}

ExtensionVersion

func (*ExtensionVersion) NotExist

func (v *ExtensionVersion) NotExist() bool

type ExtensionVersionCreateRequest

type ExtensionVersionCreateRequest struct {
	Name       string `json:"name"`
	Version    string `json:"version"`
	SpecYml    string `json:"specYml"`
	DiceYml    string `json:"diceYml"`
	SwaggerYml string `json:"swaggerYml"`
	Readme     string `json:"readme"`
	//是否公开
	Public bool `json:"public"`
	// 为true的情况如果已经存在相同版本会覆盖更新,不会报错
	ForceUpdate bool `json:"forceUpdate"`
	//是否一起更新ext和version,默认只更新version,只在forceUpdate=true有效
	All       bool `json:"all"`
	IsDefault bool `json:"isDefault"`
}

ExtensionVersionCreateRequest 创建Extension版本

type ExtensionVersionCreateResponse

type ExtensionVersionCreateResponse struct {
	Header
	Data ExtensionVersion `json:"data"`
}

ExtensionVersionCreateResponse 创建扩展版本返回数据

type ExtensionVersionGetRequest

type ExtensionVersionGetRequest struct {
	Name       string `path:"name"`
	Version    string `path:"version"`
	YamlFormat bool   `json:"yamlFormat"`
}

ExtensionVersionGetRequest 获取指定extension版本信息

type ExtensionVersionGetResponse

type ExtensionVersionGetResponse struct {
	Header
	Data ExtensionVersion `json:"data"`
}

ExtensionVersionGetResponse Extension详情API返回数据结构

type ExtensionVersionQueryRequest

type ExtensionVersionQueryRequest struct {
	Name       string
	YamlFormat bool
	//默认false查询有效版本, true查询所有版本
	All string `query:"all"`
}

ExtensionVersionQueryRequest 查询extension版本

type ExtensionVersionQueryResponse

type ExtensionVersionQueryResponse struct {
	Header
	Data []ExtensionVersion `json:"data"`
}

ExtensionVersionQueryResponse 查询ExtensionVersion列表返回数据

type ExtraResource

type ExtraResource struct {
	Type     string                       `json:"type"`
	Usage    ExtraUsage                   `json:"usage"`
	Resource []ContainerFetchResponseData `json:"resource"`
}

ExtraResource 额外的资源,例如中间件,组件

type ExtraResourceKey

type ExtraResourceKey string

ResourceKey member关联字段的key

const (
	// LabelResourceKey 成员的标签
	LabelResourceKey ExtraResourceKey = "label"
	// RoleResourceKey 成员的角色
	RoleResourceKey ExtraResourceKey = "role"
)

func (ExtraResourceKey) String

func (rk ExtraResourceKey) String() string

type ExtraUsage

type ExtraUsage struct {
	Name     string  `json:"name"`
	Instance int     `json:"instance"`
	Memory   float64 `json:"memory"` // 分配的内存大小单位(MB)
	Disk     float64 `json:"disk"`   // 分配的磁盘大小单位(MB)
	CPU      float64 `json:"cpu"`
}

ExtraUsage 额外资源占用率

type FPS

type FPS struct {
	Host  string `json:"host"`
	Port  int    `json:"port"`
	Proxy bool   `json:"proxy"`
}

FPS 文件代理服务器配置

type File

type File struct {
	ID          uint64     `json:"id"`
	UUID        string     `json:"uuid"`
	DisplayName string     `json:"name"`
	ByteSize    int64      `json:"size"`
	DownloadURL string     `json:"url"`
	Type        FileType   `json:"type"`
	From        string     `json:"from"`
	Creator     string     `json:"creator"`
	CreatedAt   time.Time  `json:"createdAt"`
	UpdatedAt   time.Time  `json:"updatedAt"`
	ExpiredAt   *time.Time `json:"expiredAt,omitempty"`
}

FileUploadResponseData 文件上传响应数据

type FileDownloadFailResponse

type FileDownloadFailResponse struct {
	Header
	Data File `json:"data"`
}

FileDownloadFailResponse 文件下载失败响应

type FileTreeActionURI

type FileTreeActionURI struct {
	TreeName string
	Inode    string
	Action   string
}

type FileTreeDetailURI

type FileTreeDetailURI struct {
	TreeName string
	Inode    string
}

type FileTreeNodeRspData

type FileTreeNodeRspData struct {
	Type      NodeType        `json:"type"`
	Inode     string          `json:"inode"`
	Pinode    string          `json:"pinode"`
	Scope     string          `json:"scope"`
	ScopeID   string          `json:"scopeID"`
	Name      string          `json:"name"`
	CreatorID string          `json:"creatorID"`
	UpdaterID string          `json:"updaterID"`
	Meta      json.RawMessage `json:"meta,omitempty"`
}

type FileTreeQueryParameters

type FileTreeQueryParameters struct {
	Pinode  string `json:"pinode"`
	Scope   string `json:"scope"`
	ScopeID string `json:"scopeID"`
}

type FileType

type FileType string
var (
	FileTypePicture FileType = "picture"
	FileTypeOther   FileType = "other"
)

func GetFileTypeByExt

func GetFileTypeByExt(ext string) FileType

GetFileTypeByExt ext has dot

type FileUploadRequest

type FileUploadRequest struct {
	FileNameWithExt string        `json:"fileNameWithExt,omitempty"`
	ByteSize        int64         `json:"byteSize,omitempty"`
	FileReader      io.ReadCloser `json:"fileReader,omitempty"`
	From            string        `json:"from,omitempty"`     // 文件来源,例如 issue / gittar mr
	IsPublic        bool          `json:"isPublic,omitempty"` // 是否可以无需登录直接下载
	Encrypt         bool          `json:"encrypt,omitempty"`  // 是否需要加密存储
	Creator         string        `json:"creator,omitempty"`
	ExpiredAt       *time.Time    `json:"expiredAt,omitempty"` // 过期时间
}

FileUploadRequest 文件上传请求数据

type FileUploadResponse

type FileUploadResponse struct {
	Header
	Data *File `json:"data"`
}

FileUploadResponse 文件上传响应

type FlinkConf

type FlinkConf struct {
	Kind                FlinkKind       `json:"kind"`
	Parallelism         int32           `json:"parallelism"`
	JobManagerResource  BigdataResource `json:"jobManagerResource"`
	TaskManagerResource BigdataResource `json:"taskManagerResource"`
}

type FlinkKind

type FlinkKind string
const (
	FlinkJob     FlinkKind = "FlinkJob"
	FlinkSession FlinkKind = "FlinkSession"
)

type FormPropItem

type FormPropItem struct {
	Label          string      `json:"label,omitempty" yaml:"label,omitempty"`
	Component      string      `json:"component,omitempty" yaml:"component,omitempty"`
	Required       bool        `json:"required,omitempty" yaml:"required,omitempty"`
	Key            string      `json:"key,omitempty" yaml:"key,omitempty"`
	ComponentProps interface{} `json:"componentProps,omitempty" yaml:"componentProps,omitempty"`
	Group          string      `json:"group,omitempty" yaml:"group,omitempty"`
	DefaultValue   interface{} `json:"defaultValue,omitempty" yaml:"defaultValue,omitempty"`
	LabelTip       string      `json:"labelTip,omitempty" yaml:"labelTip,omitempty"`
}

type FuzzyQueryNotifiesBySourceRequest

type FuzzyQueryNotifiesBySourceRequest struct {
	SourceType string
	OrgID      int64
	Locale     *i18n.LocaleResource
	Label      string

	// 查询条件
	PageNo      int64
	PageSize    int64
	ClusterName string
	SourceName  string
	NotifyName  string
	ItemName    string
	Channel     string
}

FuzzyQueryNotifiesBySourceRequest 模糊查询通知请求

type GenerateEdgeServiceRequest

type GenerateEdgeServiceRequest struct {
	Name      string
	Namespace string
	PortMaps  []PortMap
}

GenerateUnitedDeploymentRequest

type GenerateHeathCheckRequest

type GenerateHeathCheckRequest struct {
	HealthCheckType     string
	HealthCheckHttpPort int
	HealthCheckHttpPath string
	HealthCheckExec     string
}

EdgeAppHeathCheckRequest 生成健康检查的接口请求

type GenerateUnitedDeploymentRequest

type GenerateUnitedDeploymentRequest struct {
	Name       string
	Namespace  string
	RequestCPU string
	LimitCPU   string
	RequestMem string
	LimitMem   string
	Image      string
	Type       string
	ConfigSet  string
	EdgeSites  []string
	Replicas   int32
}

EdgeAppCreateRequest 生成UD的接口请求

type GetAPIAssetReq

type GetAPIAssetReq struct {
	OrgID     uint64
	Identity  *IdentityInfo
	URIParams *GetAPIAssetURIPrams
}

type GetAPIAssetResponse

type GetAPIAssetResponse struct {
	Asset      *APIAssetsModel `json:"asset"`
	Permission map[string]bool `json:"permission"`
}

type GetAPIAssetURIPrams

type GetAPIAssetURIPrams struct {
	AssetID string `json:"assetID"`
}

type GetAPIAssetVersionQueryParams

type GetAPIAssetVersionQueryParams struct {
	Asset bool `json:"asset" schema:"asset"`
	Spec  bool `json:"spec" schema:"spec"`
}

type GetAPIAssetVersionReq

type GetAPIAssetVersionReq struct {
	OrgID       uint64 `json:"orgID"`
	Identity    *IdentityInfo
	URIParams   *AssetVersionDetailURI
	QueryParams *GetAPIAssetVersionQueryParams
}

type GetAccessReq

type GetAccessReq struct {
	OrgID     uint64
	Identity  *IdentityInfo
	URIParams *GetAccessURIParams
}

type GetAccessRspAccess

type GetAccessRspAccess struct {
	ID              uint64         `json:"id"`
	AssetID         string         `json:"assetID"`
	AssetName       string         `json:"assetName"`
	OrgID           uint64         `json:"orgID"`
	SwaggerVersion  string         `json:"swaggerVersion"`
	Major           uint64         `json:"major"`
	Minor           uint64         `json:"minor"`
	ProjectID       uint64         `json:"projectID"`
	ProjectName     string         `json:"projectName"`
	Workspace       string         `json:"workspace"`
	EndpointID      string         `json:"endpointID"`
	Authentication  Authentication `json:"authentication"`
	Authorization   Authorization  `json:"authorization"`
	AddonInstanceID string         `json:"addonInstanceID"`
	BindDomain      []string       `json:"bindDomain"`
	CreatorID       string         `json:"creatorID"`
	UpdaterID       string         `json:"updaterID"`
	CreatedAt       time.Time      `json:"createdAt"`
	UpdatedAt       time.Time      `json:"updatedAt"`
	TenantGroupID   string         `json:"tenantGroupID"`
	EndpointName    string         `json:"endpointName"`
}

type GetAccessRspTenantGroup

type GetAccessRspTenantGroup struct {
	TenantGroupID string
}

type GetAccessURIParams

type GetAccessURIParams struct {
	AccessID string
}

type GetAddonInstanceDetailRequest

type GetAddonInstanceDetailRequest struct {
	AddonInstanceID string `query:"addonInstanceId" desc:"addon实例ID"`
	ProjectID       string `query:"projectId" desc:"项目ID"`
	IsReal          string `query:"isReal" desc:"是否真实ID"`
}

GetAddonInstanceDetailRequest 获取addon实例详情信息request,/api/addons/<addonInstanceId>/info

type GetAddonInstanceDetailResponse

type GetAddonInstanceDetailResponse struct {
	Header
	Data InstanceDetailRes `json:"data"`
}

GetAddonInstanceDetailResponse 获取addon实例详情信息response,/api/addons/<addonInstanceId>/info

type GetAddonListGroupedResponse

type GetAddonListGroupedResponse struct {
	Header
	Data map[string][]AddonRes `json:"data"`
}

GetAddonListGroupedResponse 获取addon共享信息接口列表 GET /application/{application_id}/addons/grouped?org_id={orgID}&project_id={projectId}&env={env}

type GetAllOrganizationalData

type GetAllOrganizationalData struct {
	Organization map[string]map[string][]string          `json:"organization"` // [org_name][prj_name][]app_name
	Members      map[string]map[string]map[string]Member `json:"memberList"`   // [userID][scope_type][scope_name]member
}

GetAllOrganizationalData 获取所有人员组织架构数据

func (*GetAllOrganizationalData) IsInApp

func (od *GetAllOrganizationalData) IsInApp(scopeNames []string, scopeType, userID string) bool

IsInApp 判断用户是否在某个App下

func (*GetAllOrganizationalData) IsInPrj

func (od *GetAllOrganizationalData) IsInPrj(scopeNames map[string][]string, scopeType, userID string) bool

IsInPrj 判断用户是否在某个Prj下

type GetAllOrganizationalResponse

type GetAllOrganizationalResponse struct {
	Header
	Data GetAllOrganizationalData
}

GetAllOrganizationalResponse 获取所有人员组织架构响应

type GetAssetVersionRsp

type GetAssetVersionRsp struct {
	Asset            *APIAssetsModel            `json:"asset"`
	Version          *APIAssetVersionsModel     `json:"version"`
	Spec             *APIAssetVersionSpecsModel `json:"spec"`
	HasInstantiation bool                       `json:"hasInstantiation"`
	HasAccess        bool                       `json:"hasAccess"`
	Access           *APIAccessesModel          `json:"access,omitempty"`
}

type GetAuthorityByUserIdRequest

type GetAuthorityByUserIdRequest struct {
	Operator int64 `json:"operator"`
	OrgId    int64 `json:"orgId"`
	TaskId   int64 `json:"TaskId"`
}

type GetAuthorityByUserIdResponse

type GetAuthorityByUserIdResponse struct {
	Authority string `json:"authority"`
}

type GetClientReq

type GetClientReq struct {
	OrgID     uint64
	Identity  *IdentityInfo
	URIParams *GetClientURIParams
}

查询客户端详情的参数结构

type GetClientURIParams

type GetClientURIParams struct {
	ClientID string `json:"clientID" schema:"clientID"`
}

type GetCloudResourceECSTrendResponse

type GetCloudResourceECSTrendResponse struct {
	Header
	Data MonthAddTrend `json:"data"`
}

type GetClusterResponse

type GetClusterResponse struct {
	Header
	Data ClusterInfo `json:"data"`
}

GetClusterResponse 根据集群名称或集群ID获取集群信息 GET /api/clusters/{idOrName}

type GetContractReq

type GetContractReq struct {
	OrgID     uint64
	Identity  *IdentityInfo
	URIParams *GetContractURIParams
}

查询合约详情的参数结构

type GetContractURIParams

type GetContractURIParams struct {
	ClientID   string
	ContractID string
}

type GetInstantiationRsp

type GetInstantiationRsp struct {
	InstantiationModel
	ProjectName string `json:"projectName"`
	RuntimeName string `json:"runtimeName"`
}

type GetInstantiationsReq

type GetInstantiationsReq struct {
	OrgID     uint64
	Identity  *IdentityInfo
	URIParams *GetInstantiationsURIParams
}

查询实例化记录列表的参数

type GetInstantiationsURIParams

type GetInstantiationsURIParams struct {
	AssetID        string
	SwaggerVersion string
	Minor          uint64
}

type GetLogsResponse

type GetLogsResponse struct {
	Success bool      `json:"success"`
	Err     string    `json:"err"`
	Data    LogDetail `json:"data"`
}

type GetMarketAddonResponse

type GetMarketAddonResponse struct {
	Header
	Data []AddonRes `json:"data"`
}

GetMarketAddonResponse 获取服务市场接口列表 GET /market/addons/grouped?org_id={orgID}&project_id={projectId}

type GetMemberByOrgRequest

type GetMemberByOrgRequest struct {
	OrgID string `query:"orgId"`
}

GetMemberByOrgRequest 根据企业查询用户 GET api/members/actions/get-by-org

type GetMemberByOrgResponse

type GetMemberByOrgResponse struct {
	Header
	UserInfoHeader
}

GetMemberByOrgResponse 根据企业查询用户 GET /api/members/actions/get-by-org

type GetMemberByTokenRequest

type GetMemberByTokenRequest struct {
	Token string `query:"token"`
}

GetMemberByTokenRequest 根据token查询成员

type GetMemberByTokenResponse

type GetMemberByTokenResponse struct {
	Header
	Data Member `json:"data"`
}

GetMemberByTokenResponse

type GetMicroProjectListResponse

type GetMicroProjectListResponse struct {
	Header
	Data []MicroProjectRes `json:"data"`
}

GetMicroProjectListResponse 微服务管理平台列表返回response,/addons/microservice

type GetMicroServiceMenusRequest

type GetMicroServiceMenusRequest struct {
	OrgID string `query:"orgId" desc:"企业ID"`
	Env   string `query:"env" desc:"所属环境"`
}

GetMicroServiceMenusRequest 微服务菜单界面,请求信息,project/<projectId>/microservice/menus

type GetMicroServiceMenusResponse

type GetMicroServiceMenusResponse struct {
	Header
	Data []MicroProjectMenuRes `json:"data"`
}

GetMicroServiceMenusResponse 微服务管理平台列表返回response,/project/{projectId}/microservice/menus

type GetMonitorAlertResponse

type GetMonitorAlertResponse struct {
	Header
	Data *Alert `json:"data"`
}

GetMonitorResponse .

type GetMonitorReportTaskResponse

type GetMonitorReportTaskResponse struct {
	Header
	Data *ReportTask `json:"data"`
}

GetMonitorReportTaskResponse .

type GetMysqlCheckResponse

type GetMysqlCheckResponse struct {
	Header
	Data map[string]string `json:"data"`
}

GetMysqlCheckResponse mysql主从状态同步检测返回 POST /api/mysql/check

type GetNotifyGroupDetailResponse

type GetNotifyGroupDetailResponse struct {
	Header
	Data NotifyGroupDetail `json:"data"`
}

GetNotifyGroupResponse 查询通知组详情响应

type GetNotifyGroupResponse

type GetNotifyGroupResponse struct {
	Header
	UserInfoHeader
	Data NotifyGroup `json:"data"`
}

GetNotifyGroupResponse 查询通知组响应

type GetOperationReq

type GetOperationReq struct {
	OrgID     uint64
	Identity  *IdentityInfo
	URIParams GetOperationURIParameters
}

type GetOperationResp

type GetOperationResp struct {
	ID          uint64          `json:"id"`
	AssetID     string          `json:"assetID"`
	AssetName   string          `json:"assetName"`
	Version     string          `json:"version"`
	Path        string          `json:"path"`
	Method      string          `json:"method"`
	OperationID string          `json:"operationID"`
	Operation   json.RawMessage `json:"operation"`
}

type GetOperationURIParameters

type GetOperationURIParameters struct {
	ID uint64
}

type GetOrgBenchServiceAddonRequest

type GetOrgBenchServiceAddonRequest struct {
	OrgID string `query:"orgId" desc:"企业ID"`
}

GetOrgBenchServiceAddonRequest 企业服务目录,请求信息,/api/orgCenter/service/addons

type GetProjectServiceAddonRequest

type GetProjectServiceAddonRequest struct {
	OrgID     string `query:"orgId" desc:"企业ID"`
	ProjectID string `query:"projectId" desc:"项目ID"`
}

GetProjectServiceAddonRequest 项目服务目录,请求信息,/api/project/service/addons

type GetPublishItemLatestVersionData

type GetPublishItemLatestVersionData struct {
	AppVersion *PublishItemVersion            `json:"appVerison"`
	H5Versions map[string]*PublishItemVersion `json:"h5Versions"`
}

GetPublishItemLatestVersionData 发布内容的最新版本信息数据

type GetPublishItemLatestVersionRequest

type GetPublishItemLatestVersionRequest struct {
	AK             string        `json:"ak"`
	AI             string        `json:"ai"`
	CurrentAppInfo VersionInfo   `json:"currentAppInfo"`
	CurrentH5Info  []VersionInfo `json:"currentH5Info"`
	MobileType     ResourceType  `json:"mobileType"`
	ForceBetaH5    bool          `json:"forceBetaH5"`
	Check          bool          `json:"check"`
}

GetPublishItemLatestVersionRequest 查询发布内容的最新版本信息请求

type GetPublishItemLatestVersionResponse

type GetPublishItemLatestVersionResponse struct {
	Header
	Data GetPublishItemLatestVersionData `json:"data"`
}

GetPublishItemLatestVersionResponse 查询发布内容的最新版本信息响应

type GetReviewByTaskIdIdRequest

type GetReviewByTaskIdIdRequest struct {
	TaskId int64 `json:"TaskId"`
}

type GetReviewByTaskIdIdResponse

type GetReviewByTaskIdIdResponse struct {
	Total          int    `json:"total"`
	ApprovalStatus string `json:"approvalStatus"`
	Id             int64  `json:"id"`
}

type GetReviewsBySponsorIdRequest

type GetReviewsBySponsorIdRequest struct {
	SponsorId      int64  `json:"sponsorId"`
	Id             int64  `json:"id"`
	ProjectId      int    `json:"projectId"`
	ApprovalStatus string `json:"approvalStatus"`
	OrgId          int64  `json:"orgId"`
	PageNo         int    `json:"pageNo"`
	PageSize       int    `json:"pageSize"`
	IdentityInfo
}

type GetReviewsBySponsorIdResponse

type GetReviewsBySponsorIdResponse struct {
	Id              int64    `json:"id"`
	ProjectId       int      `json:"projectId"`
	ProjectName     string   `json:"projectName"`
	ApplicationId   int      `json:"applicationId"`
	ApplicationName string   `json:"applicationName"`
	BuildId         int      `json:"buildId"`
	BranchName      string   `json:"branchName"`
	CommitId        string   `json:"commitId"`
	CommitMessage   string   `json:"commitMessage"`
	Approver        []string `json:"approver"`
	ApprovalContent string   `json:"approvalContent"`
	ApprovalReason  string   `json:"approvalReason"`
}

type GetReviewsByUserIdRequest

type GetReviewsByUserIdRequest struct {
	UserId         int64  `json:"userId"`
	Id             int64  `json:"id"`
	ProjectId      int    `json:"buildId"`
	Operator       int64  `json:"operator"`
	ApprovalStatus string `json:"approvalStatus"`
	OrgId          int64  `json:"orgId"`
	PageNo         int    `json:"pageNo"`
	PageSize       int    `json:"pageSize"`
}

type GetReviewsByUserIdResponse

type GetReviewsByUserIdResponse struct {
	Id              int64  `json:"id"`
	ProjectName     string `json:"projectName"`
	ApplicationName string `json:"applicationName"`
	ProjectId       int    `json:"projectId"`
	ApplicationId   int    `json:"applicationId"`
	BuildId         int    `json:"buildId"`
	BranchName      string `json:"branchName"`
	CommitId        string `json:"commitId"`
	CommitMessage   string `json:"commitMessage"`
	Operator        string `json:"operator"`
	ApprovalStatus  string `json:"approvalStatus"`
	ApprovalContent string `json:"approvalContent"`
	ApprovalReason  string `json:"approvalReason"`
}

type GetRuntimeAddonConfigRequest

type GetRuntimeAddonConfigRequest struct {
	// runtimeId
	RuntimeID uint64 `path:"runtimeID"`
	// 项目Id
	ProjectID uint64 `query:"project_id"`
	// 环境
	Workspace string `query:"env"`
	// 集群名称
	ClusterName string `query:"az"`
}

GetRuntimeAddonConfigRequest 查询 Addon 配置请求

type GetRuntimeAddonConfigResponse

type GetRuntimeAddonConfigResponse struct {
	Header
	Data []AddonConfigRes `json:"data"`
}

GetRuntimeAddonConfigResponse 获取runtime中addon环境变量列表

type GetRuntimeAddonDeployStatusResponse

type GetRuntimeAddonDeployStatusResponse struct {
	Header
	Data string `json:"data"`
}

GetRuntimeAddonDeployStatusResponse 获取runtime下addon发布状态接口res

type GetSLAReq

type GetSLAReq struct {
	OrgID     uint64
	Identity  *IdentityInfo
	URIParams *SLADetailURI
}

type GetSLARsp

type GetSLARsp ListSLAsRspObj

type GetSceneSetResponse

type GetSceneSetResponse struct {
	Header
	Data SceneSet
}

type GetSceneSetsResponse

type GetSceneSetsResponse struct {
	Header
	Data []SceneSet
}

type GetScriptInfoResponse

type GetScriptInfoResponse struct {
	Header
	Data ScriptInfo `json:"data"`
}

GetScriptInfoResponse GET /api/script/info

type GetServiceAddonListGroupResponse

type GetServiceAddonListGroupResponse struct {
	Header
	Data map[string][]ServiceAddonRes `json:"data"`
}

GetServiceAddonListGroupResponse addon服务目录,按照分类返回

type GetServiceAddonListResponse

type GetServiceAddonListResponse struct {
	Header
	Data []ServiceAddonRes `json:"data"`
}

GetServiceAddonListResponse addon服务目录

type GetTasksInfoResponse

type GetTasksInfoResponse struct {
	Header
	Data []TaskInfo `json:"data"`
}

GetTasksInfoResponse 前端获取任务运行状态列表返回

type GitRepoConfig

type GitRepoConfig struct {
	// 类型, 支持类型:general
	Type string `json:"type"`
	// 仓库地址
	Url string `json:"url"`

	Desc string `json:"desc"`
	// 仓库用户名
	Username string `json:"username"`
	// 仓库密码
	Password string `json:"password"`
}

type GittarBlameResponse

type GittarBlameResponse struct {
	Header
	Data []*Blame `json:"data"`
}

GittarBlameResponse GET /<projectName>/<appName>/blame/* blame响应

type GittarBlobData

type GittarBlobData struct {
	Binary  bool   `json:"binary"`
	Content string `json:"content"`
}

GittarBlobData blob响应数据

type GittarBlobResponse

type GittarBlobResponse struct {
	Header
	Data GittarBlobData `json:"data"`
}

GittarBlobResponse GET /<projectName>/<appName>/blob/<*> 获取blob信息

type GittarBlobRspData

type GittarBlobRspData struct {
	Binary  bool   `json:"binary"`
	Content string `json:"content"`
	RefName string `json:"refName"`
	Path    string `json:"path"`
	Size    uint64 `json:"size"`
}

type GittarBranchesResponse

type GittarBranchesResponse struct {
	Header
	Data []Branch `json:"data"`
}

GittarBranchesResponse GET /<projectName>/<appName>/branches 获取分支列表

type GittarCommitResponse

type GittarCommitResponse struct {
	Header
	Data GittarDiffData `json:"data"`
}

GittarCommitResponse GET /<projectName>/<appName>/commit/<commitId> 获取commit详情

type GittarCommitsListResponse

type GittarCommitsListResponse struct {
	Header
	Data []Commit `json:"data"`
}

GittarCommitsListResponse GET /<repo>/commits/<ref> 根据 branch 获取 commit 历史信息

type GittarCommitsRequest

type GittarCommitsRequest struct {
	//commit message过滤条件
	Search   string `query:"search"`
	PageNo   int    `query:"pageNo"`
	PageSize int    `query:"pageSize"`
}

GittarCommitsRequest commits请求

type GittarCommitsResponse

type GittarCommitsResponse struct {
	Header
	Data []Commit
}

GittarCommitsResponse GET /<projectName>/<appName>/commits/<ref> 获取指定ref的commits

type GittarCompareData

type GittarCompareData struct {
	From    string   `json:"from"`
	To      string   `json:"to"`
	Commits []Commit `json:"commits"`
	Diff    Diff     `json:"diff"`
}

GittarCompareData compare响应数据

type GittarCompareResponse

type GittarCompareResponse struct {
	Header
	Data GittarCompareData `json:"data"`
}

GittarCompareResponse GET /<projectName>/<appName>/compare/from...target 对比2个ref

type GittarCreateBranchRequest

type GittarCreateBranchRequest struct {
	Name string `json:"name"`

	// 引用, branch/tag/commit
	Ref string `json:"ref"`
}

GittarCreateBranchRequest POST /<projectName>/<appName>/branches 创建分支

type GittarCreateBranchResponse

type GittarCreateBranchResponse struct {
	Header
}

GittarCreateBranchResponse 创建分支响应

type GittarCreateCommitRequest

type GittarCreateCommitRequest struct {
	Message string `json:"message"`

	//变更操作列表
	Actions []EditActionItem `json:"actions"`

	//更新到的分支
	Branch string `json:"branch"`
}

GittarCreateCommitRequest POST /<projectName>/<appName>/commits 创建commit

type GittarCreateCommitResponse

type GittarCreateCommitResponse struct {
	Header
}

GittarCreateCommitResponse 创建commit响应

type GittarCreateMergeData

type GittarCreateMergeData struct {
	Title              string `json:"title"`
	Description        string `json:"description"`
	AssigneeID         string `json:"assigneeId"`
	SourceBranch       string `json:"sourceBranch"`
	TargetBranch       string `json:"targetBranch"`
	RemoveSourceBranch bool   `json:"removeSourceBranch"`
}

GittarCreateMergeData 创建mr响应数据

type GittarCreateMergeRequest

type GittarCreateMergeRequest struct {
	Title              string `json:"title"`
	Description        string `json:"description"`
	AssigneeID         string `json:"assigneeId"`
	SourceBranch       string `json:"sourceBranch"`
	TargetBranch       string `json:"targetBranch"`
	RemoveSourceBranch bool   `json:"removeSourceBranch"`
}

GittarCreateMergeRequest POST /<projectName>/<appName>/merge-requests 创建merge request

type GittarCreateMergeResponse

type GittarCreateMergeResponse struct {
	Header
	Data GittarCreateMergeData
}

GittarCreateMergeResponse 创建mr响应

type GittarCreateTagRequest

type GittarCreateTagRequest struct {
	Name    string `json:"name"`
	Message string `json:"message"`

	// 引用, branch/tag/commit
	Ref string `json:"ref"`
}

GittarCreateTagRequest POST /<projectName>/<appName>/tags 创建tag

type GittarCreateTagResponse

type GittarCreateTagResponse struct {
	Header
}

GittarCreateTagResponse 创建tag响应

type GittarDeleteBranchResponse

type GittarDeleteBranchResponse struct {
	Header
}

GittarDeleteBranchResponse 删除分支响应

type GittarDeleteResponse

type GittarDeleteResponse struct {
	Header
	Data DeleteEvent `json:"data"`
}

GittarDeleteResponse 删除响应

type GittarDiffData

type GittarDiffData struct {
	Commit Commit `json:"commit"`
	Diff   Diff   `json:"diff"`
}

GittarDiffData diff响应数据

type GittarFileData

type GittarFileData struct {
	//是否为二进制文件,如果是lines不会有内容
	Binary  bool   `json:"binary"`
	Content string `json:"content"`
	RefName string `json:"refName"`
	Path    string `json:"path"`
}

GittarFileData represents response data

type GittarFileResponse

type GittarFileResponse struct {
	Header
	Data GittarFileData `json:"data"`
}

GittarFileResponse GET /<projectName>/<appName>/raw/<fileName> 从gittar获取指定文件内容

type GittarLinesData

type GittarLinesData struct {
	//是否为二进制文件,如果是lines不会有内容
	Binary  bool     `json:"binary"`
	Lines   []string `json:"lines"`
	RefName string   `json:"refName"`
	Path    string   `json:"path"`
}

GittarLinesData represents response data

type GittarLinesResponse

type GittarLinesResponse struct {
	Header
	Data GittarLinesData `json:"data"`
}

GittarLinesResponse GET /<projectName>/<appName>/blob-range/<commitId>/<path> 从gittar获取指定区间的代码行数

type GittarMergeStatusData

type GittarMergeStatusData struct {
	HasConflict bool   `json:"hasConflict"`
	IsMerged    bool   `json:"isMerged"`
	HasError    bool   `json:"hasError"`
	ErrorMsg    string `json:"errorMsg"`
}

GittarMergeStatusData mr状态响应数据

type GittarMergeStatusRequest

type GittarMergeStatusRequest struct {
	//源分支
	SourceBranch string `query:"sourceBranch"`

	//将要合并到的目标分支
	TargetBranch string `query:"targetBranch"`
}

GittarMergeStatusRequest GET /<projectName>/<appName>/merge-stats 搜索指定ref下的文件

type GittarMergeStatusResponse

type GittarMergeStatusResponse struct {
	Header
	Data GittarMergeStatusData `json:"data"`
}

GittarMergeStatusResponse GET /<projectName>/<appName>/merge-stats merge状态检测

type GittarMergeTemplatesResponse

type GittarMergeTemplatesResponse struct {
	Header
	Data MergeTemplatesResponseData `json:"data"`
}

GittarMergeTemplatesResponse

type GittarPushEvent

type GittarPushEvent struct {
	EventHeader
	Content GittarPushEventRequest `json:"content"`
}

GittarPushEvent POST /callback/gittar eventbox回调的gittar事件结构体

type GittarPushEventRequest

type GittarPushEventRequest struct {
	TotalCommitsCount int         `json:"total_commits_count"`
	IsTag             bool        `json:"is_tag"`
	ObjectKind        string      `json:"object_kind"`
	Ref               string      `json:"ref"`
	After             string      `json:"after"`
	Before            string      `json:"before"`
	Repository        *Repository `json:"repository"`
	Pusher            *Pusher     `json:"pusher"`
}

GittarPushEventRequest 创建向gittar推事件的请求结构

type GittarPushEventResponse

type GittarPushEventResponse struct {
	Header
	Data string `json:"data"`
}

GittarPushEventResponse POST /callback/gittar 创建向gittar推事件的返回结构

type GittarQueryMrDetailResponse

type GittarQueryMrDetailResponse struct {
	Header
	Data MergeRequestInfo `json:"data"`
}

GittarQueryMrDetailResponse GET /<projectName>/<appName>/merge-requests 获取单个MR详情

type GittarQueryMrRequest

type GittarQueryMrRequest struct {
	//状态 open/closed/merged
	State string `query:"state"`
	// 查询title模糊匹配或者merge_id精确匹配
	Query string `query:"query"`
	//创建人
	AuthorId string `query:"authorId"`
	//分配人
	AssigneeId string `query:"assigneeId"`
	//评分
	Score int `query:"score"`
	//页数
	Page int `query:"pageNo"`
	//每页数量
	Size int `query:"pageSize" `
}

GittarQueryMrRequest GET /<projectName>/<appName>/merge-requests 查询MR列表

type GittarQueryMrResponse

type GittarQueryMrResponse struct {
	Header
	Data QueryMergeRequestsData `json:"data"`
}

GittarQueryMrResponse 查询mr响应

type GittarRegisterHookRequest

type GittarRegisterHookRequest struct {
	Name       string `json:"name"`
	URL        string `json:"url"`
	PushEvents bool   `json:"push_events"`
}

GittarRegisterHook POST /_system/hooks 请求

type GittarRegisterHookResponse

type GittarRegisterHookResponse struct {
	Header
	Data GittarRegisterHookResponseData `json:"data"`
}

GittarRegisterHookResponse POST /_system/hooks 响应

type GittarRegisterHookResponseData

type GittarRegisterHookResponseData struct {
	Id   int64  `json:"id"`
	UUId string `json:"uuid"`
}

GittarRegisterHookResponseData POST /_system/hooks 响应数据

type GittarStatsData

type GittarStatsData struct {
	CommitsCount int `json:"commitsCount"`

	// 提交的人数
	ContributorCount int      `json:"contributorCount"`
	Tags             []string `json:"tags"`
	Branches         []string `json:"branches"`
	DefaultBranch    string   `json:"defaultBranch"`

	// 仓库是否为空
	Empty    bool   `json:"empty"`
	CommitID string `json:"commitId"`

	// open状态的mr数量
	MergeRequestCount int    `json:"mergeRequestCount"`
	Size              int    `json:"size"`
	ReadmeFile        string `json:"readmeFile"`

	ApplicationID int64  `json:"applicationID"`
	ProjectID     uint64 `json:"projectID"`
}

GittarStatsData 仓库状态信息

type GittarStatsResponse

type GittarStatsResponse struct {
	Header
	Data GittarStatsData
}

GittarStatsResponse GET /<projectName>/<appName>/stats 获取仓库状态

type GittarTagsResponse

type GittarTagsResponse struct {
	Header
	Data []Tag `json:"data"`
}

GittarTagsResponse GET /<projectName>/<appName>/tags 获取标签列表

type GittarTreeData

type GittarTreeData struct {
	Type       string      `json:"type"`
	RefName    string      `json:"refName"`
	Path       string      `json:"path"`
	Binary     bool        `json:"binary"`
	Entries    []TreeEntry `json:"entries"`
	Commit     Commit      `json:"commit"`
	TreeID     string      `json:"treeId"`
	ReadmeFile string      `json:"readmeFile"`
	IsLocked   bool        `json:"isLocked"`
}

GittarTreeData tree响应数据

type GittarTreeResponse

type GittarTreeResponse struct {
	Header
	Data GittarTreeData `json:"data"`
}

GittarTreeResponse GET /<projectName>/<appName>/tree/* 获取目录内容

type GittarTreeRspData

type GittarTreeRspData struct {
	Binary     bool                     `json:"binary"`
	Commit     *GittarTreeRspDataCommit `json:"commit"`
	Entries    []interface{}            `json:"entries"`
	Path       string                   `json:"path"`
	ReadmeFile string                   `json:"readmeFile"`
	RefName    string                   `json:"refName"`
	TreeID     string                   `json:"treeId"`
	Type       string                   `json:"type"`
}

type GittarTreeRspDataCommit

type GittarTreeRspDataCommit struct {
	ID            string            `json:"id"`
	Author        map[string]string `json:"author"`
	Committer     map[string]string `json:"committer"`
	CommitMessage string            `json:"commitMessage"`
	Parent        interface{}       `json:"parent"`
}

type GittarTreeSearchRequest

type GittarTreeSearchRequest struct {
	//支持引用名: branch/tag/commit
	Ref string `query:"ref"`

	//文件通配符 例如 *.workflow
	Pattern string `query:"pattern"`
}

GittarTreeSearchRequest GET /<projectName>/<appName>/tree-search 搜索指定ref下的文件

type GittarTreeSearchResponse

type GittarTreeSearchResponse struct {
	Header
	Data []*TreeEntry `json:"data"`
}

GittarTreeSearchResponse 文件搜索响应

type GlobalStateData

type GlobalStateData map[string]interface{}

type Gluster

type Gluster struct {
	Version string   `json:"version"`
	Hosts   []string `json:"hosts"`
	Server  bool     `json:"server"`
	Replica int      `json:"replica"`
	Brick   string   `json:"brick"`
}

Gluster GlusterFS 配置

type GrantCloudResourceAccountPrivilegeRequest

type GrantCloudResourceAccountPrivilegeRequest struct {
	Vendor     string `json:"vendor"`
	Region     string `json:"region"`
	InstanceID string `json:"instanceID"`
}

type GrantMysqlAccountPrivilegeRequest

type GrantMysqlAccountPrivilegeRequest struct {
	Vendor            string                  `json:"vendor"`
	Region            string                  `json:"region"`
	InstanceID        string                  `json:"instanceID"`
	Account           string                  `json:"account"`
	AccountPrivileges []MysqlAccountPrivilege `json:"accountPrivileges"`
}

type GrantMysqlAccountPrivilegeResponse

type GrantMysqlAccountPrivilegeResponse CreateCloudResourceBaseResponse

type GroupNotifyChannel

type GroupNotifyChannel struct {
	Name     string            `json:"name"`
	Template string            `json:"template"`
	Type     string            `json:"type"` // 用于mail模式渲染 值为markdown会二次渲染html
	Tag      string            `json:"tag"`  //  用于webhook的附加信息
	Params   map[string]string `json:"params"`
}

type GroupNotifyContent

type GroupNotifyContent struct {
	SourceName            string               `json:"sourceName"`
	SourceType            string               `json:"sourceType"`
	SourceID              string               `json:"sourceId"`
	NotifyName            string               `json:"notifyName"`
	NotifyItemDisplayName string               `json:"notifyItemDisplayName"`
	Channels              []GroupNotifyChannel `json:"channels"`
	OrgID                 int64                `json:"orgId"`
	Label                 string               `json:"label"`
	ClusterName           string               `json:"clusterName"`
	CalledShowNumber      string               `json:"calledShowNumber"`
}

type GroupNotifyEvent

type GroupNotifyEvent struct {
	Sender  string                 `json:"sender"`
	Content GroupNotifyContent     `json:"content"`
	Lables  map[string]interface{} `json:"lables"`
}

type H5VersionInfo

type H5VersionInfo struct {
	VersionInfo
	TargetMobiles map[string][]string // H5对应的移动应用版本, key是应用类型,value是版本号
}

H5VersionInfo H5包的版本信息

type HandleCloudResourceECSData

type HandleCloudResourceECSData struct {
	FailedInstances []HandleCloudResourceECSDataResult `json:"failedInstances"`
}

type HandleCloudResourceECSDataResult

type HandleCloudResourceECSDataResult struct {
	Message    string `json:"message"`
	InstanceId string `json:"instanceId"`
}

type HandleCloudResourceECSResponse

type HandleCloudResourceECSResponse struct {
	Header
	Data HandleCloudResourceECSData `json:"data"`
}

type HandleCloudResourceEcsRequest

type HandleCloudResourceEcsRequest struct {
	Vendor      string   `json:"vendor"`
	Region      string   `json:"region"`
	InstanceIds []string `json:"instanceIds"`
}
type Header struct {
	Success bool          `json:"success" `
	Error   ErrorResponse `json:"err"`
}

Header 统一的 response 的除了接口数据的 header 部分

type HealthCheck

type HealthCheck struct {
	// healthCheck kinds: HTTP, HTTPS, TCP, COMMAND
	Kind string `json:"kind,omitempty"`
	// port for HTTP, HTTPS, TCP
	Port int `json:"port,omitempty"`
	// path for HTTP, HTTPS
	Path string `json:"path,omitempty"`
	// command for COMMAND
	Command string `json:"command,omitempty"`
}

health check to check container healthy

type Hierarchy

type Hierarchy struct {
	Version string `json:"version" yaml:"version"`
	Root    string `json:"root" yaml:"root"`
	// structure的结构可能是list、map
	Structure map[string]interface{} `json:"structure" yaml:"structure"`
}

Hierarchy只是前端关心,只读,且有些字结构是字典有些是列表,后端不需要关心这部分

type Hook

type Hook struct {
	// webhook ID
	ID        string `json:"id"`
	UpdatedAt string `json:"updatedAt"`
	CreatedAt string `json:"createdAt"`

	// 用于计算后续发送的事件内容的sha值,目前没有用
	Secret string `json:"secret"`

	CreateHookRequest
}

Hook 代表 webhook 的结构

type HookLocation

type HookLocation struct {
	// webhook 所属 orgID
	Org string `json:"orgID"`

	// webhook 所属 projectID
	Project string `json:"projectID"`

	// webhook 所属 applicationID
	Application string `json:"applicationID"`

	// webhook 所关心环境, nil 代表所有
	Env []string `json:"env"`
}

HookLocation 代表 webhook 归属

type Host

type Host struct {
	Name          string  `json:"hostname"`                               // 主机名
	OrgName       string  `json:"orgName"`                                // 企业名称
	Cluster       string  `json:"cluster_full_name" gorm:"index:cluster"` // 集群名字
	Cpus          float64 `json:"cpus"`                                   // 总CPU个数
	CpuUsage      float64 `json:"cpuUsage"`                               // CPU使用核数
	Memory        int64   `json:"memory"`                                 // 总内存数(字节)
	MemoryUsage   int64   `json:"memoryUsage"`                            // 内存使用
	Disk          int64   `json:"disk"`                                   // 磁盘大小(字节)
	DiskUsage     int64   `json:"diskUsage"`                              // 磁盘使用大小(字节)
	Load5         float64 `json:"load5"`                                  // 负载值
	PrivateAddr   string  `json:"private_addr"`                           // 内网地址
	Labels        string  `json:"labels"`                                 // 环境标签
	OS            string  `json:"os"`                                     // 操作系统类型
	KernelVersion string  `json:"kernel_version"`                         // 内核版本
	SystemTime    string  `json:"system_time"`                            // 系统时间
	Birthday      int64   `json:"created_at"`                             // 创建时间(operator定义)
	Deleted       bool    `json:"deleted"`                                // 资源是否被删除
	TimeStamp     int64   `json:"timestamp"`                              // 消息本身的时间戳
}

Host 主机元数据

type HostActualUsageDTO

type HostActualUsageDTO struct {
	ActualCPU   float64         `json:"actual_cpu"`
	ActualMem   float64         `json:"actual_mem"`
	ActualDisk  float64         `json:"actual_disk"`
	ActualLoad  float64         `json:"actual_load"`
	StatusLevel HostStatusLevel `json:"status_level"`
	AbnormalMsg string          `json:"abnormal_msg"`
}

HostActualUsageDTO 从监控系统获取实际运行指标值

type HostFetchRequest

type HostFetchRequest struct {
	ClusterName string `query:"clusterName"`
}

HostFetchRequest 主机详情请求

type HostFetchResponse

type HostFetchResponse struct {
	Header
	Data Host `json:"data"`
}

HostFetchResponse 主机详情响应

type HostListRequest

type HostListRequest struct {
	ClusterName string `query:"clusterName"`
}

HostListRequest 主机列表请求

type HostListResponse

type HostListResponse struct {
	Header
	Data []Host `json:"data"`
}

HostListResponse 主机列表响应

type HostMetric

type HostMetric struct {
	CPU    float64 // 百分比值, eg: 19%, 则cpu为19
	Memory float64 // 百分比
	Disk   float64 // 百分比
	Load   float64
}

HostMetric host metric bundle数据结构

type HostMetricResponse

type HostMetricResponse struct {
	Header
	Data HostMetricResponseData `json:"data"`
}

HostMetricResponse 主机监控资源响应

type HostMetricResponseData

type HostMetricResponseData struct {
	Results []HostMetricResult `json:"results"`
}

HostMetricResponseData 主机监控资源响应数据结构

"data": {
	"results": [{
		"data": [{
			"avg.load5": {
				"agg": "avg",
				"axisIndex": 0,
				"chartType": "",
				"data": 0.45545454545454545,
				"name": "load5",
				"tag": "10.168.0.101",
				"unit": "",
				"unitType": ""
			}
         }],
		"name": "system"
	}]
}

type HostMetricResult

type HostMetricResult struct {
	Name string                  `json:"name"`
	Data []map[string]MetricData `json:"data"`
}

HostMetricResult result结构

type HostStaticUsageDTO

type HostStaticUsageDTO struct {
	HostName          string  `json:"host_name"`
	IPAddress         string  `json:"ip_address"`
	TotalMemory       float64 `json:"total_memory"`
	TotalCPU          float64 `json:"total_cpu"`
	TotalDisk         float64 `json:"total_disk"`
	UsedMemory        float64 `json:"used_memory"`
	UsedCPU           float64 `json:"used_cpu"`
	UsedDisk          float64 `json:"used_disk"`
	Labels            string  `json:"labels"`
	Tasks             int     `json:"tasks"`
	CreatedAt         int64   `json:"created_at"`
	Services          int     `json:"services"`
	UnhealthyServices int     `json:"unhealthy_services"`
}

HostStaticUsageDTO 根据调度情况获取静态资源分配量

type HostStaticUsageFetchRequest

type HostStaticUsageFetchRequest struct {
	Cluster string `query:"cluster"`
}

HostStaticUsageFetchRequest 主机资源使用请求

type HostStaticUsageFetchResponse

type HostStaticUsageFetchResponse struct {
	Header
	Data HostStaticUsageDTO `json:"data"`
}

HostStaticUsageFetchResponse 获取指定宿主机调度资源分配详情的返回值

type HostStaticUsageListResponse

type HostStaticUsageListResponse struct {
	Header
	Data []HostStaticUsageDTO `json:"data"`
}

HostStaticUsageListResponse 列举宿主机调度资源分配详情的返回值

type HostStatusLevel

type HostStatusLevel string

HostStatusLevel 宿主机运行状态

const (
	// HostStatusLevelFatal 异常无法工作
	HostStatusLevelFatal HostStatusLevel = "fatal"
	// HostStatusLevelWarnning 异常告警
	HostStatusLevelWarnning HostStatusLevel = "warning"
	// HostStatusLevelNormal 正常
	HostStatusLevelNormal HostStatusLevel = "normal"
)

type HostStatusListData

type HostStatusListData struct {
	HostIP      string          `json:"host_ip"`
	StatusLevel HostStatusLevel `json:"status_level"`
	AbnormalMsg string          `json:"abnormal_msg"`
}

HostStatusListData 根据机器IP列表获取机器状态信息响应数据

type HostStatusListRequest

type HostStatusListRequest struct {
	OrgName string   `json:"org_name"`
	Hosts   []string `json:"hosts"`
}

HostStatusListRequest 根据机器IP列表获取机器状态信息请求

type HostStatusListResponse

type HostStatusListResponse struct {
	Header
	Data []HostStatusListData `json:"data"`
}

HostStatusListResponse 根据机器IP列表获取机器状态信息响应

type HostUsageDTO

type HostUsageDTO struct {
	HostStaticUsageDTO
	HostActualUsageDTO
}

HostUsageDTO 主机资源分配

type HostUsageFetchResponse

type HostUsageFetchResponse struct {
	Header
	Data HostUsageDTO `json:"data"`
}

HostUsageFetchResponse 宿主机资源使用情况

type HostUsageListRequest

type HostUsageListRequest struct {
	Cluster string `query:"cluster"`
}

HostUsageListRequest 主机资源使用列表请求

type HostUsageListResponse

type HostUsageListResponse struct {
	Header
	Data []HostUsageDTO `json:"data"`
}

HostUsageListResponse 列举宿主机资源使用情况

type HttpHealthCheck

type HttpHealthCheck struct {
	Port int    `json:"port,omitempty"`
	Path string `json:"path,omitempty"`
	//单位是秒
	Duration int `json:"duration,omitempty"`
}

type IOSCertificateDTO

type IOSCertificateDTO struct {
	DebugProvisionFile   CertificateFileDTO           `json:"debugProvision"`
	ReleaseProvisionFile CertificateFileDTO           `json:"releaseProvision"`
	KeyChainP12          IOSCertificateKeyChainP12DTO `json:"keyChainP12"`
}

IOSCertificateDTO IOS 证书信息

type IOSCertificateKeyChainP12DTO

type IOSCertificateKeyChainP12DTO struct {
	CertificateFileDTO
	Password string `json:"password"`
}

IOSCertificateKeyChainP12DTO IOS 证书 KeyChainP12DTO

type IOSCertificateKeyDTO

type IOSCertificateKeyDTO struct {
	KeyChainP12File        string `json:"keyChainP12File,omitempty"`
	KeyChainP12Password    string `json:"keyChainP12Password,omitempty"`
	DebugMobileProvision   string `json:"debugMobileProvision,omitempty"`
	ReleaseMobileProvision string `json:"releaseMobileProvision,omitempty"`
}

IOSCertificateKeyDTO IOS 证书 k-v

type IRComment

type IRComment struct {
	IterationID uint64    `json:"iterationID"`
	IssueID     int64     `json:"issueID"`
	IssueTitle  string    `json:"issueTitle"`
	IssueType   IssueType `json:"issueType"`
	ProjectID   uint64    `json:"projectID"`
}

IRComment 事件关联评论

func (*IRComment) Scan

func (i *IRComment) Scan(value interface{}) error

Scan gorm Unmarshal

func (IRComment) Value

func (i IRComment) Value() (driver.Value, error)

Value gorm Marshal

type ISTParam

type ISTParam struct {
	Comment  string `json:",omitempty"` // 评论内容
	UserName string `json:",omitempty"` // 用户名

	MRInfo MRCommentInfo `json:",omitempty"` // MR 类型评论内容

	CurrentState string `json:",omitempty"` // 当前状态
	NewState     string `json:",omitempty"` // 新状态

	CurrentTitle string `json:",omitempty"` // 当前标题
	NewTitle     string `json:",omitempty"` // 新标题

	CurrentPlanStartedAt string `json:",omitempty"` // 当前计划开始时间
	NewPlanStartedAt     string `json:",omitempty"` // 新计划开始时间

	CurrentPlanFinishedAt string `json:",omitempty"` // 当前计划结束时间
	NewPlanFinishedAt     string `json:",omitempty"` // 新计划结束时间

	CurrentAssignee string `json:",omitempty"` // 当前处理人
	NewAssignee     string `json:",omitempty"` // 新处理人

	CurrentIteration string `json:",omitempty"` // 当前迭代
	NewIteration     string `json:",omitempty"` // 新迭代

	CurrentEstimateTime  string `json:",omitempty"` //当前预估时间
	CurrentElapsedTime   string `json:",omitempty"` //当前已用时间
	CurrentRemainingTime string `json:",omitempty"` //当前剩余时间
	CurrentStartTime     string `json:",omitempty"` //当前开始时间
	CurrentWorkContent   string `json:",omitempty"` //当前工作内容
	NewEstimateTime      string `json:",omitempty"` //新预估时间
	NewElapsedTime       string `json:",omitempty"` //新已用时间
	NewRemainingTime     string `json:",omitempty"` //新剩余时间
	NewStartTime         string `json:",omitempty"` //新开始时间
	NewWorkContent       string `json:",omitempty"` //新工作内容

	CurrentOwner string `json:",omitempty"` // 当前责任人
	NewOwner     string `json:",omitempty"` // 新责任人

	CurrentStage string `json:",omitempty"` // 当前任务类型/引用源
	NewStage     string `json:",omitempty"` // 新任务类型/引用源

	CurrentPriority string `json:",omitempty"` // 当前优先级
	NewPriority     string `json:",omitempty"` // 新优先级

	CurrentComplexity string `json:",omitempty"` // 当前复杂度
	NewComplexity     string `json:",omitempty"` // 新复杂度

	CurrentSeverity string `json:",omitempty"` // 当前严重性
	NewSeverity     string `json:",omitempty"` // 新严重性

	CurrentContent string `json:",omitempty"` // 当前内容
	NewContent     string `json:",omitempty"` // 新内容

	CurrentLabel string `json:",omitempty"` // 当前标签
	NewLabel     string `json:",omitempty"` // 新标签
}

ISTParam issue stream template params, 字段名称须与模板内占位符匹配

func (*ISTParam) Localize

func (p *ISTParam) Localize(locale string) *ISTParam

func (*ISTParam) Scan

func (p *ISTParam) Scan(value interface{}) error

func (ISTParam) Value

func (p ISTParam) Value() (driver.Value, error)

type ISummary

type ISummary struct {
	Requirement ISummaryState `json:"requirement"`
	Task        ISummaryState `json:"task"`
	Bug         ISummaryState `json:"bug"`
}

ISummary 与迭代相关的事件完成状态的统计信息

type ISummaryState

type ISummaryState struct {
	Done   int `json:"done"`
	UnDone int `json:"undone"`
}

type Identity

type Identity struct {
	UserID string
	OrgID  string
}

type IdentityInfo

type IdentityInfo struct {
	// UserID is user id. It must be provided in some cases.
	// Cannot be null if InternalClient is null.
	// +optional
	UserID string `json:"userID"`

	// InternalClient records the internal client, such as: bundle.
	// Cannot be null if UserID is null.
	// +optional
	InternalClient string `json:"-"`
}

IdentityInfo represents operator identity info. Fields will not be json marshal/unmarshal.

func (*IdentityInfo) Empty

func (info *IdentityInfo) Empty() bool

func (*IdentityInfo) IsInternalClient

func (info *IdentityInfo) IsInternalClient() bool

type ImageCreateRequest

type ImageCreateRequest struct {
	// 关联release
	ReleaseID string `json:"releaseId"`

	//
	ImageName string `json:"imageName"`
	ImageTag  string `json:"imageTag"`
	Image     string `json:"image"`
}

ImageCreateRequest 创建镜像API(POST api/images)使用。此API暂无人用,后续可下线

type ImageCreateResponse

type ImageCreateResponse struct {
	Header
	Data ImageCreateResponseData `json:"data"`
}

ImageCreateResponse 创建镜像API返回结构

type ImageCreateResponseData

type ImageCreateResponseData struct {
	ImageID int64 `json:"imageId"`
}

ImageCreateResponseData 创建镜像API实际返回数据

type ImageGetRequest

type ImageGetRequest struct {
	ImageIDOrImage string `json:"-" path:"imageIdOrImage"`
}

ImageGetRequest 镜像详情API(GET /api/imagges/{imageId}),打包去重使用

type ImageGetResponse

type ImageGetResponse struct {
	Header
	Data ImageGetResponseData `json:"data"`
}

ImageGetResponse 镜像详情API返回数据结构

type ImageGetResponseData

type ImageGetResponseData struct {
	ID        int64     `json:"id"`
	ReleaseID string    `json:"releaseId"` // 关联release
	ImageName string    `json:"imageName"` // 镜像名称
	ImageTag  string    `json:"imageTag"`  // 镜像Tag
	Image     string    `json:"image"`     // 镜像地址
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

ImageGetResponseData 镜像详情实际返回数据

type ImageListRequest

type ImageListRequest struct {
	// 分页大小,默认值20
	PageSize int64 `json:"-" query:"pageSize"`

	// 当前页号,默认值1
	PageNum int64 `json:"-" query:"pageNum"`
}

ImageListRequest 镜像列表API(GET /api/images)

type ImageListResponse

type ImageListResponse struct {
	Header
	Data ImageListResponseData `json:"data"`
}

ImageListResponse 镜像列表API返回数据结构

type ImageListResponseData

type ImageListResponseData struct {
	Total int64                  `json:"total"`
	List  []ImageGetResponseData `json:"list"`
}

ImageListResponseData 镜像列表响应数据

type ImageSearchRequest

type ImageSearchRequest struct {
	// 查询参数,eg:app:test
	Query string `json:"-" query:"q"`

	// 分页大小,默认值20
	PageSize int64 `json:"-" query:"pageSize"`

	// 当前页号,默认值1
	PageNum int64 `json:"-" query:"pageNum"`
}

ImageSearchRequest 镜像搜索API(GET /api/search/images?q=xxx)

type ImageSearchResponse

type ImageSearchResponse struct {
	Header
	Data []ImageGetResponseData `json:"data"`
}

ImageSearchResponse 镜像搜索API返回数据结构

type ImageUpdateRequest

type ImageUpdateRequest struct {
	ImageIDOrImage string `json:"-" path:"imageIdOrImage"`
	Body           struct {
		ID int64 `json:"id"`
		ImageCreateRequest
	} `json:"body"`
}

ImageUpdateRequest 更新镜像API(PUT api/images)使用。此API暂无人用,后续可下线

type ImageUpdateResponse

type ImageUpdateResponse struct {
	Header
	Data interface{} `json:"data"`
}

ImageUpdateResponse 更新镜像API返回结构

type ImageUploadResponse

type ImageUploadResponse struct {
	Header
	Data ImageUploadResponseData `json:"data"`
}

ImageUploadResponse 图片上传响应

type ImageUploadResponseData

type ImageUploadResponseData struct {
	URL string `json:"url"`
}

ImageUploadResponseData 图片上传响应数据

type InParams

type InParams struct {
	ScopeType string `json:"scopeType"`
	ScopeId   string `json:"scopeId"`
}

type IngressRoute

type IngressRoute struct {
	Domain string
	Path   string
}

type InstallStatus

type InstallStatus string

InstallStatus

const (
	InstallInit          InstallStatus = "INIT"
	InstallApplying      InstallStatus = "APPLYING"
	InstallApplyOK       InstallStatus = "APPLY_OK"
	InstallApplyFailed   InstallStatus = "APPLY_FAILED"
	InstallCanceling     InstallStatus = "CANCELING"
	InstallCanceled      InstallStatus = "CANCELED"
	InstallDestroying    InstallStatus = "DESTROYING"
	InstallDestroyFailed InstallStatus = "DESTROY_FAILED"
	InstallDestroyed     InstallStatus = "DESTRORYED"
)

type InstanceDetailRes

type InstanceDetailRes struct {
	// addon实例名称
	InstanceName string `json:"instanceName"`

	// addon名称
	AddonName string `json:"addonName"`

	// 项目名称
	ProjectName string `json:"projectName"`

	// logo图片地址
	LogoURL string `json:"logoUrl"`

	// addon状态
	Status string `json:"status"`

	// 集群名称
	ClusterName string `json:"clusterName"`

	// 所属环境
	Env string `json:"env"`

	// 所属环境中文描述
	EnvCn string `json:"envCn"`

	// 版本
	Version string `json:"version"`

	// 被引用次数
	AttachCount int `json:"attachCount"`

	// 规格中文说明
	PlanCnName string `json:"planCnName"`

	// 创建时间
	CreateAt string `json:"createAt"`

	// 是否平台属性
	Platform bool `json:"platform"`

	// 项目ID
	ProjectID string `json:"projectId"`

	// 环境变量
	Config map[string]string `json:"config"`

	// 引用信息
	ReferenceInfo []InstanceReferenceRes `json:"referenceInfo"`

	// 是否可被删除
	CanDel bool `json:"canDel"`
}

InstanceDetailRes addon详情信息

type InstanceInfo

type InstanceInfo struct {
	Id     string `json:"id,omitempty"`
	Status string `json:"status,omitempty"`
	Ip     string `json:"ip,omitempty"`
	Alive  string `json:"alive,omitempty"`
}

type InstanceInfoData

type InstanceInfoData struct {
	Cluster   string `json:"cluster"`
	Namespace string `json:"namespace"`
	Name      string `json:"name"`

	OrgName             string `json:"orgName"`
	OrgID               string `json:"orgID"`
	ProjectName         string `json:"projectName"`
	ProjectID           string `json:"projectID"`
	ApplicationName     string `json:"applicationName"`
	EdgeApplicationName string `json:"edgeApplicationName"`
	EdgeSite            string `json:"edgeSite"`
	ApplicationID       string `json:"applicationID"`
	RuntimeName         string `json:"runtimeName"`
	RuntimeID           string `json:"runtimeID"`
	ServiceName         string `json:"serviceName"`
	Workspace           string `json:"workspace"`
	ServiceType         string `json:"serviceType"`
	AddonID             string `json:"addonID"`

	Meta   string `json:"meta"`
	TaskID string `json:"taskID"`

	Phase       string  `json:"phase"`
	Message     string  `json:"message"`
	ContainerID string  `json:"containerID"`
	ContainerIP string  `json:"containerIP"`
	HostIP      string  `json:"hostIP"`
	ExitCode    int     `json:"exitCode"`
	CpuOrigin   float64 `json:"cpuOrigin"`
	MemOrigin   int     `json:"memOrigin"`
	CpuRequest  float64 `json:"cpuRequest"`
	MemRequest  int     `json:"memRequest"`
	CpuLimit    float64 `json:"cpuLimit"`
	MemLimit    int     `json:"memLimit"`
	Image       string  `json:"image"`

	StartedAt  time.Time  `json:"startedAt"`
	FinishedAt *time.Time `json:"finishedAt"`
}

type InstanceInfoDataList

type InstanceInfoDataList []InstanceInfoData

type InstanceInfoRequest

type InstanceInfoRequest struct {
	Cluster         string `query:"cluster"`
	OrgName         string `query:"orgName"`
	OrgID           string `query:"orgID"`
	ProjectName     string `query:"projectName"`
	ProjectID       string `query:"projectID"`
	ApplicationName string `query:"applicationName"`
	ApplicationID   string `query:"applicationID"`
	RuntimeName     string `query:"runtimeName"`
	RuntimeID       string `query:"runtimeID"`
	ServiceName     string `query:"serviceName"`
	// enum: dev, test, staging, prod
	Workspace   string `query:"workspace"`
	ContainerID string `query:"containerID"`
	// ip1,ip2,ip3
	InstanceIP string `query:"instanceIP"`
	HostIP     string `query:"hostIP"`
	// enum: addon, stateless-service, job
	ServiceType string `query:"serviceType"`
	AddonID     string `query:"addonID"`
	// enum: unhealthy, healthy, dead, running
	Phases []string `query:"phases"`

	Limit int `query:"limit"`
}

type InstanceInfoResponse

type InstanceInfoResponse struct {
	Header
	Data InstanceInfoDataList `json:"data"`
}

type InstanceReferenceRes

type InstanceReferenceRes struct {
	// 企业ID
	OrgID string `json:"orgId"`

	// 项目ID
	ProjectID string `json:"projectId"`

	// 项目名称
	ProjectName string `json:"projectName"`

	// 应用ID
	ApplicationID string `json:"applicationId"`

	// 应用名称
	ApplicationName string `json:"applicationName"`

	// runtime ID
	RuntimeID string `json:"runtimeId"`

	// runtime名称
	RuntimeName string `json:"runtimeName"`
}

InstanceReferenceRes addon引用信息

type InstanceStatusData

type InstanceStatusData struct {
	ClusterName string `json:"clusterName,omitempty"`
	RuntimeName string `json:"runtimeName,omitempty"`
	ServiceName string `json:"serviceName,omitempty"`

	// 事件id
	// k8s 中是 containerID
	// marathon 中是 taskID
	ID string `json:"id,omitempty"`

	// 容器ip
	IP string `json:"ip,omitempty"`

	// 包含Running,Killed,Failed,Healthy,UnHealthy等状态
	InstanceStatus string `json:"instanceStatus,omitempty"`

	// 宿主机ip
	Host string `json:"host,omitempty"`

	// 事件额外描述,可能为空
	Message string `json:"message,omitempty"`

	// 时间戳到纳秒级
	Timestamp int64 `json:"timestamp"`
}

InstanceStatusData 是调度器为实例状态变化事件而定义的结构体

type InstanceStatusEvent

type InstanceStatusEvent struct {
	EventHeader
	Content InstanceStatusData `json:"content"`
}

InstanceStatusEvent 事件,展示实例的状态变化 event: instances-status

type InstantiationModel

type InstantiationModel struct {
	BaseModel

	OrgID          uint64 `json:"orgID"`
	Name           string `json:"name"`
	AssetID        string `json:"assetID"`
	SwaggerVersion string `json:"swaggerVersion"`
	Major          uint64 `json:"major"`
	Minor          uint64 `json:"minor"`
	Type           string `json:"type"`
	URL            string `json:"url"`
	ProjectID      uint64 `json:"projectID,omitempty"`
	AppID          uint64 `json:"appID,omitempty"`
	ServiceName    string `json:"serviceName"`
	RuntimeID      uint64 `json:"runtimeID"`
	Workspace      string `json:"workspace"`
}

dice_api_asset_version_instances

func (InstantiationModel) TableName

func (m InstantiationModel) TableName() string

type Issue

type Issue struct {
	ID               int64              `json:"id"`
	CreatedAt        time.Time          `json:"createdAt"`
	UpdatedAt        time.Time          `json:"updatedAt"`
	PlanStartedAt    *time.Time         `json:"planStartedAt"`
	PlanFinishedAt   *time.Time         `json:"planFinishedAt"`
	ProjectID        uint64             `json:"projectID"`
	IterationID      int64              `json:"iterationID"`
	AppID            *uint64            `json:"appID"`
	RequirementID    *int64             `json:"requirementID"` // 即将废弃
	RequirementTitle string             `json:"requirementTitle"`
	Type             IssueType          `json:"type"`
	Title            string             `json:"title"`
	Content          string             `json:"content"`
	State            int64              `json:"state"`
	Priority         IssuePriority      `json:"priority"`
	Complexity       IssueComplexity    `json:"complexity"`
	Severity         IssueSeverity      `json:"severity"`
	Creator          string             `json:"creator"`
	Assignee         string             `json:"assignee"`
	IssueButton      []IssueStateButton `json:"issueButton"` // 状态流转按钮
	IssueSummary     *IssueSummary      `json:"issueSummary"`
	Labels           []string           `json:"labels"` // label 列表
	ManHour          IssueManHour       `json:"issueManHour"`
	Source           string             `json:"source"`
	TaskType         string             `json:"taskType"` // 任务类型
	BugStage         string             `json:"bugStage"` // BUG阶段
	Owner            string             `json:"owner"`    // 责任人

	// 切换到已完成状态的时间 (等事件可以记录历史信息了 删除该字段)
	FinishTime *time.Time `json:"finishTime"`

	TestPlanCaseRels []TestPlanCaseRel `json:"testPlanCaseRels"`
}

func (Issue) ConvertToIssueUpdateReq

func (s Issue) ConvertToIssueUpdateReq() IssueUpdateRequest

func (*Issue) GetStage

func (s *Issue) GetStage() string

GetStage 获取任务状态或者Bug阶段

func (*Issue) ValidState

func (s *Issue) ValidState(newState string) bool

ValidState 校验新状态是否合法

type IssueAndPropertyAndValue

type IssueAndPropertyAndValue struct {
	IssueID  int64                        `json:"issueID"`
	Property []IssuePropertyExtraProperty `json:"property"`
}

type IssueBatchUpdateRequest

type IssueBatchUpdateRequest struct {
	All            bool     `json:"all"`      // 是否全选
	Mine           bool     `json:"mine"`     // all 为 true 时使用, mine 为 true,表示仅操作处理人为自己的
	IDs            []uint64 `json:"ids"`      // 待更新事件 id, 若全选,则此为空
	Assignee       string   `json:"assignee"` // 处理人
	State          int64    `json:"state"`    // 状态
	NewIterationID int64    `json:"newIterationID"`
	TaskType       string   `json:"taskType"` // 任务类型
	BugStage       string   `json:"bugStage"` // bug阶段
	Owner          string   `json:"owner"`    // 负责人

	// 以下字段用于鉴权, 不可更改
	CurrentIterationID  int64     `json:"currentIterationID"`
	CurrentIterationIDs []int64   `json:"currentIterationIDs"`
	Type                IssueType `json:"type"`
	ProjectID           uint64    `json:"projectID"`

	IdentityInfo
}

IssueBatchUpdateRequest 批量更新事件请求

func (*IssueBatchUpdateRequest) CheckValid

func (r *IssueBatchUpdateRequest) CheckValid() error

CheckValid 仅需求、缺陷的处理人/状态可批量更新

type IssueBugPercentageResponse

type IssueBugPercentageResponse struct {
	BugPercentage []Percentage `json:"bugPercentage"`
}

IssueBugPercentageResponse 缺陷率响应

type IssueBugSeverityPercentage

type IssueBugSeverityPercentage struct {
	Severity []Percentage `json:"severity"`
}

IssueBugSeverityPercentageResponse 缺陷等级分布响应

type IssueBugSeverityPercentageResponse

type IssueBugSeverityPercentageResponse struct {
	StageName string                     `json:"stageName"`
	Severity  IssueBugSeverityPercentage `json:"severity"`
}

type IssueBugStatusPercentage

type IssueBugStatusPercentage struct {
	Status []Percentage `json:"status"`
}

IssueBugStatusPercentageResponse 缺陷状态分布响应

type IssueBugStatusPercentageResponse

type IssueBugStatusPercentageResponse struct {
	StageName string                   `json:"stageName"`
	Status    IssueBugStatusPercentage `json:"status"`
}

type IssueButton

type IssueButton struct {
	CanOpen     bool `json:"canOpen"`     // op: 未开始
	CanWorking  bool `json:"canWorking"`  // op: 开始
	CanTesting  bool `json:"canTesting"`  // op: 测试中
	CanDone     bool `json:"canDone"`     // op: 完成
	CanResolved bool `json:"canResolved"` // op: 已修复
	CanReopen   bool `json:"canReOpen"`   // op: 重新打开
	CanWontfix  bool `json:"canWontfix"`  // op: 不修复
	CanDup      bool `json:"canDup"`      // op: 不修复,重复提交
	CanClosed   bool `json:"canClosed"`   // op: 关闭
}

IssueButton 状态流转按钮

type IssueCommentTestCaseInfo

type IssueCommentTestCaseInfo struct {
	TestCaseID   uint64 `json:"testCaseID"`
	TestCaseName string `json:"testCaseName"`
}

IssueCommentTestCaseInfo Issue 评论:关联测试用例

type IssueComplexity

type IssueComplexity string

IssueComplexity 事件复杂度

const (
	IssueComplexityHard   IssueComplexity = "HARD"   // 复杂
	IssueComplexityNormal IssueComplexity = "NORMAL" // 中
	IssueComplexityEasy   IssueComplexity = "EASY"   // 容易
)

func (IssueComplexity) GetEnName

func (is IssueComplexity) GetEnName(zh string) IssueComplexity

func (IssueComplexity) GetZhName

func (is IssueComplexity) GetZhName() string

type IssueCreateRequest

type IssueCreateRequest struct {
	// +optional 计划开始时间
	PlanStartedAt *time.Time `json:"planStartedAt"`
	// +optional 计划结束时间
	PlanFinishedAt *time.Time `json:"planFinishedAt"`
	// +required 所属项目 ID
	ProjectID uint64 `json:"projectID"`
	// +required 所属迭代 ID
	IterationID int64 `json:"iterationID"`
	// +optional 所属应用 ID
	AppID *uint64 `json:"appID"`
	// +optional 关联的测试计划用例关联 ID 列表
	TestPlanCaseRelIDs []uint64 `json:"testPlanCaseRelIDs"`
	// +required issue 类型
	Type IssueType `json:"type"`
	// +required 标题
	Title string `json:"title"`
	// +optional 内容
	Content string `json:"content"`
	// +optional 优先级
	Priority IssuePriority `json:"priority"`
	// +optional 复杂度
	Complexity IssueComplexity `json:"complexity"`
	// +optional 严重程度
	Severity IssueSeverity `json:"severity"`
	// +required 当前处理人
	Assignee string `json:"assignee"`
	// +optional 第三方创建时头里带不了userid,用这个参数显式指定一下
	Creator string `json:"creator"`
	// +optional 标签名称列表
	Labels []string `json:"labels"`
	// +optional 创建来源,目前只有工单使用了该字段
	Source string `json:"source"`
	// +optional 工时信息,当事件类型为任务和缺陷时生效
	ManHour *IssueManHour `json:"issueManHour"`
	// +optionaln 任务类型
	TaskType string `json:"taskType"`
	// +optionaln bug阶段
	BugStage string `json:"bugStage"`
	// +optionaln 负责人
	Owner string `json:"owner"`
	// internal use, get from *http.Request
	IdentityInfo
	// 用来区分是通过ui还是bundle创建的
	External bool `json:"-"`
}

IssueCreateRequest 事件创建请求

func (*IssueCreateRequest) GetDBManHour

func (icr *IssueCreateRequest) GetDBManHour() string

GetDBManHour 获取工时信息

func (*IssueCreateRequest) GetStage

func (icr *IssueCreateRequest) GetStage() string

GetStage 获取任务状态或者Bug阶段

type IssueCreateResponse

type IssueCreateResponse struct {
	Header
	Data uint64 `json:"data"` // issue id
}

IssueCreateResponse 事件创建响应

type IssueEvent

type IssueEvent struct {
	EventHeader
	Content IssueEventData `json:"content"`
}

IssueEvent

type IssueEventData

type IssueEventData struct {
	Title        string          `json:"title"`
	Content      string          `json:"content"`
	AtUserIDs    string          `json:"atUserIds"`
	StreamType   IssueStreamType `json:"streamType"`
	StreamParams ISTParam        `json:"streamParams"`
}

IssueEventData

type IssueExportExcelRequest

type IssueExportExcelRequest struct {
	IssuePagingRequest
	IsDownload bool `json:"isDownload"`
}

IssueExportExcelRequest 事件导出 excel 请求

type IssueGetRequest

type IssueGetRequest struct {
	ID uint64

	// internal use, get from *http.Request
	IdentityInfo
}

IssueGetRequest 事件查询请求

type IssueGetResponse

type IssueGetResponse struct {
	Header
	Data *Issue `json:"data"`
}

IssueGetResponse 事件查询响应

type IssueImportExcelRequest

type IssueImportExcelRequest struct {
	ProjectID uint64            `json:"projectID"`
	OrgID     int64             `json:"orgID"`
	Type      PropertyIssueType `json:"type"`
	IdentityInfo
}

IssueImportExcelRequest 事件导入excel请求

type IssueImportExcelResponse

type IssueImportExcelResponse struct {
	SuccessNumber int    `json:"successNumber"`
	FalseNumber   int    `json:"falseNumber"`
	UUID          string `json:"uuid"`
}

type IssueListRequest

type IssueListRequest struct {
	// +optional
	Title string `schema:"title" json:"title"`
	// +optional
	Type []IssueType `json:"type"`
	// +required
	ProjectID uint64 `schema:"projectID" json:"projectID"`
	// +required 迭代id为-1时,即是显示待办事件
	IterationID int64 `schema:"iterationID" json:"iterationID"`
	// +required 支持多迭代查询
	IterationIDs []int64 `schema:"iterationIDs" json:"iterationIDs"`
	// +optional
	AppID *uint64 `schema:"appID" json:"appID"`
	// +optional
	RequirementID *int64 `schema:"requirementID" json:"requirementID"`
	// +optional
	State []int64 `schema:"state" json:"state"`
	// +optional
	StateBelongs []IssueStateBelong `schema:"stateBelongs" json:"stateBelongs"`
	// +optional
	Creators []string `schema:"creator" json:"creator"`
	// +optional
	Assignees []string `schema:"assignee" json:"assignee"`
	// +optional
	Label []uint64 `schema:"label" json:"label"`
	// +optional ms
	StartCreatedAt int64 `schema:"startCreatedAt" json:"startCreatedAt"`
	// +optional ms
	EndCreatedAt int64 `schema:"endCreatedAt" json:"endCreatedAt"`
	// +optional ms
	StartFinishedAt int64 `schema:"startFinishedAt" json:"startFinishedAt"`
	// +optional ms
	EndFinishedAt int64 `schema:"endFinishedAt" json:"endFinishedAt"`
	// +optional 是否只筛选截止日期为空的事项
	IsEmptyPlanFinishedAt bool `schema:"isEmptyPlanFinishedAt" json:"isEmptyPlanFinishedAt"`
	// +optional 优先级
	Priority []IssuePriority `schema:"priority" json:"priority"`
	// +optional 复杂度
	Complexity []IssueComplexity `schema:"complexity" json:"complexity"`
	// +optional 严重程度
	Severity []IssueSeverity `json:"severity" json:"severity"`
	// +optional
	RelatedIssueIDs []uint64 `schema:"relatedIssueId" json:"relatedIssueId"`
	// +optional 来源
	Source string `schema:"source" json:"source"`
	// +optional 排序字段, 支持 planStartedAt & planFinishedAt
	OrderBy string `schema:"orderBy" json:"orderBy"`
	// +optionaln 任务类型
	TaskType []string `json:"taskType"`
	// +optionaln bug阶段
	BugStage []string `json:"bugStage"`
	// +optionaln 负责人
	Owner []string `json:"owner"`
	// +optional 是否需要进度统计
	WithProcessSummary bool `schema:"withProcessSummary"`
	// +optional 排除的id
	ExceptIDs []int64 `json:"exceptIDs"`
	// +optional 是否升序排列
	Asc bool `schema:"asc" json:"asc"`

	// +optional 包含的ID
	IDs []int64 `json:"IDs"`
	// internal use, get from *http.Request
	IdentityInfo
	// 用来区分是通过ui还是bundle创建的
	External bool `json:"-"`
}

IssueListRequest 事件列表查询请求

type IssueManHour

type IssueManHour struct {
	EstimateTime            int64  `json:"estimateTime"`            // 预估工时
	ThisElapsedTime         int64  `json:"thisElapsedTime"`         // 本次已用工时
	ElapsedTime             int64  `json:"elapsedTime"`             // 已用工时
	RemainingTime           int64  `json:"remainingTime"`           // 剩余工时
	StartTime               string `json:"startTime"`               // 这次录入工时的工作开始时间
	WorkContent             string `json:"workContent"`             // 工作内容
	IsModifiedRemainingTime bool   `json:"isModifiedRemainingTime"` // 剩余时间是否被修改过的标记
}

IssueManHour 工时信息,task和bug有该信息。单位统一是分钟

func (*IssueManHour) Clean

func (imh *IssueManHour) Clean() IssueManHour

Clean get,list事件返回时 开始时间,工作内容都需要为空

func (*IssueManHour) Convert2String

func (imh *IssueManHour) Convert2String() string

Convert2String .....

func (*IssueManHour) GetFormartTime

func (imh *IssueManHour) GetFormartTime(key string) string

GetFormartTime 时间修改时生成的活动记录需要将分钟带上单位

type IssueManHourSumResponse

type IssueManHourSumResponse struct {
	// Header
	DesignManHour    int64 `json:"designManHour"`
	DevManHour       int64 `json:"devManHour"`
	TestManHour      int64 `json:"testManHour"`
	ImplementManHour int64 `json:"implementManHour"`
	DeployManHour    int64 `json:"deployManHour"`
	OperatorManHour  int64 `json:"operatorManHour"`
	SumManHour       int64 `json:"sumManHour"`
}

IssueManHourSumResponse 事件下所有的任务总和响应

type IssuePagingRequest

type IssuePagingRequest struct {
	// +optional default 1
	PageNo uint64 `json:"pageNo"`
	// +optional default 10
	PageSize uint64 `json:"pageSize"`
	// +required 企业id
	OrgID int64 `json:"orgID"`
	IssueListRequest
}

IssuePagingRequest 事件分页查询请求

func (*IssuePagingRequest) GetUserIDs

func (ipr *IssuePagingRequest) GetUserIDs() []string

GetUserIDs 分页查询时,第一页就需要返回全量的 userInfo 给前端

func (*IssuePagingRequest) UrlQueryString

func (ipr *IssuePagingRequest) UrlQueryString() map[string][]string

type IssuePagingResponse

type IssuePagingResponse struct {
	Header
	UserInfoHeader
	Data *IssuePagingResponseData `json:"data"`
}

IssuePagingResponse 事件分页查询响应

type IssuePagingResponseData

type IssuePagingResponseData struct {
	Total uint64  `json:"total"`
	List  []Issue `json:"list"`
}

type IssuePanel

type IssuePanel struct {
	PanelName string `json:"panelName"`
	PanelID   int64  `json:"panelID"`
}

type IssuePanelDeleteResponse

type IssuePanelDeleteResponse struct {
	Header
	Data *IssuePanel `json:"data"`
}

自定义看板删除响应

type IssuePanelGetResponse

type IssuePanelGetResponse struct {
	Header
	Data []IssuePanelIssues `json:"data"`
}

自定义看板查询响应

type IssuePanelIssueIDs

type IssuePanelIssueIDs struct {
	Issues []Issue `json:"issues"`
	Total  uint64  `json:"total"`
}

type IssuePanelIssues

type IssuePanelIssues struct {
	IssuePanel
	Total int64 `json:"total"`
}

type IssuePanelIssuesCreateResponse

type IssuePanelIssuesCreateResponse struct {
	Header
	Data int64 `json:"data"`
}

自定义看板创建响应

type IssuePanelIssuesGetResponse

type IssuePanelIssuesGetResponse struct {
	Header
	Data *IssuePanelIssueIDs `json:"data"`
}

查询自定义看板内事件响应

type IssuePanelRequest

type IssuePanelRequest struct {
	IssuePanel
	IssueID int64 `json:"issueID"`
	IssuePagingRequest
	IdentityInfo
}

自定义看板请求

type IssuePriority

type IssuePriority string

IssuePriority 事件优先级

const (
	IssuePriorityUrgent IssuePriority = "URGENT" // 紧急
	IssuePriorityHigh   IssuePriority = "HIGH"   // 高
	IssuePriorityNormal IssuePriority = "NORMAL" // 中
	IssuePriorityLow    IssuePriority = "LOW"    // 低
)

func (IssuePriority) GetEnName

func (i IssuePriority) GetEnName(zh string) IssuePriority

func (IssuePriority) GetZhName

func (i IssuePriority) GetZhName() string

type IssuePropertiesGetRequest

type IssuePropertiesGetRequest struct {
	OrgID             int64             `json:"orgID"`             // 企业ID
	PropertyIssueType PropertyIssueType `json:"propertyIssueType"` // 任务类型
	PropertyName      string            `json:"propertyName"`
	IdentityInfo
}

查询企业下全部字段请求

type IssuePropertiesResponse

type IssuePropertiesResponse struct {
	Header
	Data []IssuePropertyIndex `json:"data"`
}

type IssuePropertyConfig

type IssuePropertyConfig struct {
	ID                int64             `json:"id"`
	PropertyID        int64             `json:"propertyID"`        // 字段ID
	ScopeID           int64             `json:"scopeID"`           // 系统管理员(sys)/企业(org)/项目(project)/应用(app)
	ScopeType         ScopeType         `json:"scopeType"`         // 企业ID/项目ID/应用ID
	OrgID             int64             `json:"orgID"`             // 企业ID
	ProjectID         int64             `json:"projectID"`         // 项目ID
	Index             int64             `json:"index"`             // 排序级
	PropertyIssueType PropertyIssueType `json:"propertyIssueType"` // 任务类型
}

type IssuePropertyConfigCreateRequest

type IssuePropertyConfigCreateRequest struct {
	ScopeID           int64             `json:"scopeID"`           // 系统管理员(sys)/企业(org)/项目(project)/应用(app)
	ScopeType         ScopeType         `json:"scopeType"`         // 企业ID/项目ID/应用ID
	OrgID             int64             `json:"orgID"`             // 企业ID
	ProjectID         int64             `json:"projectID"`         // 项目ID
	PropertyName      string            `json:"propertyName"`      // 属性名称
	PropertyType      PropertyType      `json:"propertyType"`      // 属性类型
	Required          bool              `json:"required"`          // 是否必填
	PropertyIssueType PropertyIssueType `json:"propertyIssueType"` // 任务类型
	IdentityInfo
}

配置字段请求

type IssuePropertyConfigDeleteRequest

type IssuePropertyConfigDeleteRequest struct {
	ConfigID int64 `json:"configID"` // 字段ID
	IdentityInfo
}

删除配置字段请求

type IssuePropertyConfigUpdateRequest

type IssuePropertyConfigUpdateRequest struct {
	Data              []IssuePropertyConfig
	OrgID             int64             `json:"orgID"`             // 企业ID
	ProjectID         int64             `json:"projectID"`         // 项目ID
	PropertyIssueType PropertyIssueType `json:"propertyIssueType"` // 任务类型
	IdentityInfo
}

更新配置字段请求

type IssuePropertyConfigsGetRequest

type IssuePropertyConfigsGetRequest struct {
	ProjectID         int64             `json:"projectID"`         // 项目ID
	OrgID             int64             `json:"orgID"`             // 企业ID
	PropertyIssueType PropertyIssueType `json:"propertyIssueType"` // 任务类型
	IdentityInfo
}

查询项目配置字段请求

type IssuePropertyCreateRequest

type IssuePropertyCreateRequest struct {
	ScopeID           int64             `json:"scopeID"`           // 系统管理员(sys)/企业(org)/项目(project)/应用(app)
	ScopeType         ScopeType         `json:"scopeType"`         // 企业ID/项目ID/应用ID
	OrgID             int64             `json:"orgID"`             // 企业ID
	PropertyName      string            `json:"propertyName"`      // 属性名称
	DisplayName       string            `json:"displayName"`       // 属性的展示名称
	PropertyType      PropertyType      `json:"propertyType"`      // 属性类型
	Required          bool              `json:"required"`          // 是否必填
	PropertyIssueType PropertyIssueType `json:"propertyIssueType"` // 任务类型
	EnumeratedValues  []Enumerate       `json:"enumeratedValues"`  // 枚举值
	Relation          int64             `json:"relation"`          // 关联的公用字段ID  公有字段则该值为0
	IdentityInfo
}

创建字段请求

type IssuePropertyDeleteRequest

type IssuePropertyDeleteRequest struct {
	OrgID      int64 `json:"orgID"`
	PropertyID int64 `json:"propertyID"` // 字段ID
	IdentityInfo
}

删除字段请求

type IssuePropertyExtraProperty

type IssuePropertyExtraProperty struct {
	PropertyID       int64        `json:"propertyID"`
	PropertyType     PropertyType `json:"propertyType"`
	PropertyName     string       `json:"propertyName"`
	Required         bool         `json:"required"`
	DisplayName      string       `json:"displayName"`
	ArbitraryValue   interface{}  `json:"arbitraryValue"`
	EnumeratedValues []Enumerate  `json:"enumeratedValues"`
	Values           []int64      `json:"values"`
}

用于自定义字段实例操作

type IssuePropertyIndex

type IssuePropertyIndex struct {
	PropertyID        int64             `json:"propertyID"`        // 字段ID
	ScopeID           int64             `json:"scopeID"`           // 系统管理员(sys)/企业(org)/项目(project)/应用(app)
	ScopeType         ScopeType         `json:"scopeType"`         // 企业ID/项目ID/应用ID
	OrgID             int64             `json:"orgID"`             // 企业ID
	PropertyName      string            `json:"propertyName"`      // 属性名称
	DisplayName       string            `json:"displayName"`       // 属性的展示名称
	PropertyType      PropertyType      `json:"propertyType"`      // 属性类型
	Required          bool              `json:"required"`          // 是否必填
	PropertyIssueType PropertyIssueType `json:"propertyIssueType"` // 任务类型
	Relation          int64             `json:"relation"`          // 关联的公用字段ID  公有字段则该值为0
	Index             int64             `json:"index"`             // 排序级
	EnumeratedValues  []Enumerate       `json:"enumeratedValues"`  // 枚举值
	Values            []int64           `json:"values"`            // 默认值
	RelatedIssue      []string          `json:"relatedIssue"`      // 使用该字段的模版任务类型
}

字段属性详情(包括排序级和枚举值)

type IssuePropertyIndexUpdateRequest

type IssuePropertyIndexUpdateRequest struct {
	OrgID int64                `json:"orgID"`
	Data  []IssuePropertyIndex `json:"data"`
	IdentityInfo
}

type IssuePropertyInstance

type IssuePropertyInstance struct {
	IssuePropertyIndex
	ArbitraryValue   interface{}         `json:"arbitraryValue"` // 自定义的值
	EnumeratedValues []PropertyEnumerate `json:"enumeratedValues"`
	Values           []int64             `json:"values"`
}

自定义字段详情

func (IssuePropertyInstance) GetArb

func (i IssuePropertyInstance) GetArb() string

type IssuePropertyRelationCreateRequest

type IssuePropertyRelationCreateRequest struct {
	OrgID     int64                   `json:"orgID"`
	ProjectID int64                   `json:"projectID"`
	IssueID   int64                   `json:"issueID"`  // 事件ID
	Property  []IssuePropertyInstance `json:"property"` // 自定义字段
	IdentityInfo
}

创建事件的自定义字段请求

type IssuePropertyRelationGetRequest

type IssuePropertyRelationGetRequest struct {
	OrgID             int64             `json:"orgID"`
	IssueID           int64             `json:"issueID"`           // 事件ID
	PropertyIssueType PropertyIssueType `json:"propertyIssueType"` // 任务类型
	IdentityInfo
}

查询事件的自定义字段请求

type IssuePropertyRelationGetResponse

type IssuePropertyRelationGetResponse struct {
	Header
	IssueAndPropertyAndValue
}

查询事件的自定义字段响应

type IssuePropertyRelationUpdateRequest

type IssuePropertyRelationUpdateRequest struct {
	OrgID     int64 `json:"orgID"`
	ProjectID int64 `json:"projectID"`
	IssueID   int64 `json:"issueID"`
	IssuePropertyExtraProperty
	IdentityInfo
}

更新事件的自定义字段请求

func (IssuePropertyRelationUpdateRequest) GetArb

type IssuePropertyResponse

type IssuePropertyResponse struct {
	Header
	Data IssuePropertyIndex `json:"data"`
}

type IssuePropertyTimeGetRequest

type IssuePropertyTimeGetRequest struct {
	OrgID int64 `json:"orgID"`
}

type IssuePropertyUpdateRequest

type IssuePropertyUpdateRequest struct {
	Header
	IssuePropertyIndex
	EnumeratedValues []Enumerate `json:"enumeratedValues"` // 枚举值
	IdentityInfo
}

更新字段请求

type IssuePropertyUpdateTimes

type IssuePropertyUpdateTimes struct {
	Task        string `json:"task"`
	Bug         string `json:"bug"`
	Epic        string `json:"epic"`
	Requirement string `json:"requirement"`
}

type IssuePropertyUpdateTimesResponse

type IssuePropertyUpdateTimesResponse struct {
	Header
	Data IssuePropertyUpdateTimes `json:"data"`
}

type IssuePropertyValueCreateRequest

type IssuePropertyValueCreateRequest struct {
	Value      string `json:"value"`
	PropertyID int64  `json:"propertyID"`
	IdentityInfo
}

创建字段枚举值请求

type IssuePropertyValueDeleteRequest

type IssuePropertyValueDeleteRequest struct {
	PropertyValueID int64 `json:"propertyID"` // 字段ID
	IdentityInfo
}

删除字段枚举值请求

type IssuePropertyValueGetRequest

type IssuePropertyValueGetRequest struct {
	PropertyID int64 `json:"propertyID"` // 企业
	IdentityInfo
}

查询字段枚举值请求

type IssuePropertyValueUpdateRequest

type IssuePropertyValueUpdateRequest struct {
	PropertyID int64  `json:"propertyID"` // 字段ID
	ID         int64  `json:"id"`
	Value      string `json:"value"`
	IdentityInfo
}

更新字段枚举值请求

type IssueRelationCreateRequest

type IssueRelationCreateRequest struct {
	IssueID      uint64 `json:"-"`
	RelatedIssue uint64 `json:"relatedIssues"`
	Comment      string `json:"comment"`
	ProjectID    int64  `json:"projectId"`
}

func (*IssueRelationCreateRequest) Check

func (irc *IssueRelationCreateRequest) Check() error

Check 检查请求参数是否合法

type IssueRelationGetResponse

type IssueRelationGetResponse struct {
	Header
	UserInfoHeader
	Data *IssueRelations `json:"data"`
}

IssueRelationGetResponse 事件关联关系响应

type IssueRelations

type IssueRelations struct {
	RelatingIssues []Issue
	RelatedIssues  []Issue
}

IssueRelations 事件关联关系

type IssueSeverity

type IssueSeverity string

IssueSeverity 事件严重程度

const (
	IssueSeverityFatal   IssueSeverity = "FATAL"   // 致命
	IssueSeveritySerious IssueSeverity = "SERIOUS" // 严重
	IssueSeverityNormal  IssueSeverity = "NORMAL"  // 一般
	IssueSeveritySlight  IssueSeverity = "SLIGHT"  // 轻微
	IssueSeverityLow     IssueSeverity = "SUGGEST" // 建议
)

func (IssueSeverity) GetEnName

func (is IssueSeverity) GetEnName(zh string) IssueSeverity

func (IssueSeverity) GetZhName

func (is IssueSeverity) GetZhName() string

type IssueStage

type IssueStage struct {
	ID    int64  `json:"id"`
	Name  string `json:"name"`
	Value string `json:"value"`
}

type IssueStageRequest

type IssueStageRequest struct {
	OrgID     int64        `json:"orgID"`
	IssueType IssueType    `json:"issueType"`
	List      []IssueStage `json:"list"`
	IdentityInfo
}

type IssueStageResponse

type IssueStageResponse struct {
	Header
	Data []IssueStage `json:"data"`
}

type IssueState

type IssueState string // 事件状态
const (
	IssueStateOpen    IssueState = "OPEN"    // 待处理
	IssueStateWorking IssueState = "WORKING" // 进行中
	IssueStateTesting IssueState = "TESTING" // 测试中
	IssueStateDone    IssueState = "DONE"    // 已完成 (requirement/task 唯一终态)

	IssueStateResolved IssueState = "RESOLVED" // 已解决
	IssueStateReopen   IssueState = "REOPEN"   // 重新打开
	IssueStateWontfix  IssueState = "WONTFIX"  // 拒绝修复
	IssueStateDup      IssueState = "DUP"      // 重复提交
	IssueStateClosed   IssueState = "CLOSED"   // 已关闭 (bug 唯一终态)
)

func (IssueState) Desc

func (state IssueState) Desc(locale string) string

func (IssueState) GetPermResForUpdate

func (state IssueState) GetPermResForUpdate() string

GetPermResForUpdate 获取 状态 用于权限校验的资源

func (IssueState) ValidBugState

func (state IssueState) ValidBugState() bool

func (IssueState) ValidEpicState

func (state IssueState) ValidEpicState() bool

func (IssueState) ValidRequirementState

func (state IssueState) ValidRequirementState() bool

func (IssueState) ValidTaskState

func (state IssueState) ValidTaskState() bool

func (IssueState) ValidTicketState

func (state IssueState) ValidTicketState() bool

type IssueStateBelong

type IssueStateBelong string

事件主状态

const (
	IssueStateBelongOpen     IssueStateBelong = "OPEN"     // 待处理
	IssueStateBelongWorking  IssueStateBelong = "WORKING"  // 进行中
	IssueStateBelongDone     IssueStateBelong = "DONE"     // 已完成
	IssueStateBelongWontfix  IssueStateBelong = "WONTFIX"  // 无需修复
	IssueStateBelongReopen   IssueStateBelong = "REOPEN"   // 重新打开
	IssueStateBelongResloved IssueStateBelong = "RESOLVED" // 已解决
	IssueStateBelongClosed   IssueStateBelong = "CLOSED"   // 已关闭
)

type IssueStateButton

type IssueStateButton struct {
	StateID     int64            `json:"stateID"`
	StateName   string           `json:"stateName"`
	StateBelong IssueStateBelong `json:"stateBelong"`
	Permission  bool             `json:"permission"`
}

type IssueStateCreateRequest

type IssueStateCreateRequest struct {
	ProjectID   uint64           `json:"projectID"`
	IssueType   IssueType        `json:"issueType"`
	StateName   string           `json:"stateName"`
	StateBelong IssueStateBelong `json:"stateBelong"`
	IdentityInfo
}

创建状态请求

type IssueStateDeleteRequest

type IssueStateDeleteRequest struct {
	ProjectID int64 `json:"projectID"`
	ID        int64 `json:"id"`
	IdentityInfo
}

删除状态请求

type IssueStateDeleteResponse

type IssueStateDeleteResponse struct {
	Header
	Data IssueStatus `json:"data"`
}

删除状态请求

type IssueStateName

type IssueStateName struct {
	Name string `json:"name"`
	ID   int64  `json:"id"`
}

type IssueStateNameGetResponse

type IssueStateNameGetResponse struct {
	Header
	Data []IssueStatus `json:"data"`
}

type IssueStateRelation

type IssueStateRelation struct {
	IssueStatus
	StateRelation []int64 `json:"stateRelation"`
}

type IssueStateRelationGetRequest

type IssueStateRelationGetRequest struct {
	ProjectID uint64    `json:"projectID"`
	IssueType IssueType `json:"issueType"`
	IdentityInfo
}

项目下工作流查询请求

type IssueStateRelationGetResponse

type IssueStateRelationGetResponse struct {
	Header
	Data []IssueStateRelation `json:"data"`
}

按项目下任务类型分类的工作流详情

type IssueStateState

type IssueStateState struct {
	StateBelong IssueStateBelong `json:"stateBelong"`
	States      []IssueStateName
}

type IssueStateTypeBelong

type IssueStateTypeBelong struct {
	Type   IssueType       `json:"type"`
	States IssueStateState `json:"states"`
}

type IssueStateTypeBelongGetResponse

type IssueStateTypeBelongGetResponse struct {
	Header
	Data []IssueStateState `json:"data"`
}

事件主状态列表

type IssueStateTypeBelongResponse

type IssueStateTypeBelongResponse struct {
	Header
	Data []IssueStateState `json:"data"`
}

type IssueStateUpdateRequest

type IssueStateUpdateRequest struct {
	ProjectID int64                `json:"projectID"`
	Data      []IssueStateRelation `json:"data"`
	IdentityInfo
}

更新工作流请求

type IssueStatesGetRequest

type IssueStatesGetRequest struct {
	ProjectID uint64 `json:"projectID"`
	IdentityInfo
}

获取项目下状态请求

type IssueStatesGetResponse

type IssueStatesGetResponse struct {
	Header
	Data []IssueTypeState `json:"data"`
}

项目下状态列表

type IssueStatus

type IssueStatus struct {
	ProjectID   uint64           `json:"projectID"`
	IssueType   IssueType        `json:"issueType"`
	StateID     int64            `json:"stateID"`
	StateName   string           `json:"stateName"`
	StateBelong IssueStateBelong `json:"stateBelong"`
	Index       int64            `json:"index"`
}

type IssueStream

type IssueStream struct {
	ID         int64           `json:"id"`
	IssueID    int64           `json:"issueID"`
	Operator   string          `json:"operator"`
	StreamType IssueStreamType `json:"streamType"`
	Content    string          `json:"content"` // 事件流展示内容
	MRInfo     MRCommentInfo   `json:"mrInfo"`
	CreatedAt  time.Time       `json:"createdAt"`
	UpdatedAt  time.Time       `json:"updatedAt"`
}

IssueStream 事件流返回数据结构

type IssueStreamCreateRequest

type IssueStreamCreateRequest struct {
	IssueID      int64           `json:"issueID"`
	Operator     string          `json:"operator"`
	StreamType   IssueStreamType `json:"streamType"`
	StreamParams ISTParam        `json:"streamParams"`

	// internal use, get from *http.Request
	IdentityInfo
}

IssueStreamCreateRequest 事件流创建请求

type IssueStreamPagingRequest

type IssueStreamPagingRequest struct {
	IssueID  uint64 `json:"issueID"`
	PageNo   uint64 `json:"pageNo"`
	PageSize uint64 `json:"pageSize"`
}

IssueStreamPagingRequest 事件流列表请求

type IssueStreamPagingResponse

type IssueStreamPagingResponse struct {
	Header
	UserInfoHeader
	Data IssueStreamPagingResponseData `json:"data"`
}

IssueStreamPagingResponse 事件流列表响应

type IssueStreamPagingResponseData

type IssueStreamPagingResponseData struct {
	Total int64         `json:"total"`
	List  []IssueStream `json:"list"`
}

IssueStreamPagingResponseData 事件流列表响应数据

type IssueStreamType

type IssueStreamType string

IssueStreamType issue 事件流类型

const (
	ISTCreate               IssueStreamType = "Create" // 创建事件
	ISTComment              IssueStreamType = "Comment"
	ISTRelateMR             IssueStreamType = "RelateMR" // 关联 MR
	ISTAssign               IssueStreamType = "Assign"
	ISTTransferState        IssueStreamType = "TransferState" // 状态迁移
	ISTChangeTitle          IssueStreamType = "ChangeTitle"
	ISTChangePlanStartedAt  IssueStreamType = "ChangePlanStartedAt"  // 更新计划开始时间
	ISTChangePlanFinishedAt IssueStreamType = "ChangePlanFinishedAt" // 更新计划结束时间
	ISTChangeAssignee       IssueStreamType = "ChangeAssignee"       // 更新处理人
	ISTChangeIteration      IssueStreamType = "ChangeIteration"      // 更新迭代
	ISTChangeManHour        IssueStreamType = "ChangeManHour"        // 更新工时信息
	ISTChangeOwner          IssueStreamType = "ChangeOwner"          // 更新责任人
	ISTChangeTaskType       IssueStreamType = "ChangeTaskType"       // 更新任务类型/引用源
	ISTChangeBugStage       IssueStreamType = "ChangeBugStage"       // 更新引用源
	ISTChangePriority       IssueStreamType = "ChangePriority"       // 更新优先级
	ISTChangeComplexity     IssueStreamType = "ChangeComplexity"     // 更新复杂度
	ISTChangeSeverity       IssueStreamType = "ChangeSeverity"       // 更新严重度
	ISTChangeContent        IssueStreamType = "ChangeContent"        // 更新内容
	ISTChangeLabel          IssueStreamType = "ChangeLabel"          // 更新标签
)

issue 事件流类型

type IssueSummary

type IssueSummary struct {
	ProcessingCount int `json:"processingCount"` // 需求下未完成的关联事件数
	DoneCount       int `json:"doneCount"`       // 需求下已完成的关联事件数
}

任务统计

type IssueTestCaseRelationsListRequest

type IssueTestCaseRelationsListRequest struct {
	IssueID           uint64 `json:"issueID"`
	TestPlanID        uint64 `json:"testPlanID"`
	TestPlanCaseRelID uint64 `json:"testPlanCaseRelID"`
	TestCaseID        uint64 `json:"testCaseID"`
}

IssueTestCaseRelationsListRequest 缺陷用例关联关系查询

type IssueType

type IssueType string

IssueType 事件类型

const (
	IssueTypeRequirement IssueType = "REQUIREMENT" // 需求
	IssueTypeTask        IssueType = "TASK"        // 任务
	IssueTypeBug         IssueType = "BUG"         // 缺陷
	IssueTypeTicket      IssueType = "TICKET"      // 工单
	IssueTypeEpic        IssueType = "EPIC"        // 史诗
)

func (IssueType) GetCorrespondingResource

func (t IssueType) GetCorrespondingResource() string

func (IssueType) GetEnName

func (t IssueType) GetEnName(s string) IssueType

func (IssueType) GetStateBelongIndex

func (t IssueType) GetStateBelongIndex() []IssueStateBelong

func (IssueType) GetZhName

func (t IssueType) GetZhName() string

func (IssueType) String

func (t IssueType) String() string

type IssueTypeState

type IssueTypeState struct {
	IssueType IssueType `json:"issueType"`
	State     []string  `json:"state"`
}

type IssueTypeStateID

type IssueTypeStateID struct {
	IssueType IssueType `json:"issueType"`
	State     []string  `json:"state"`
}

type IssueTypeUpdateRequest

type IssueTypeUpdateRequest struct {
	ProjectID int64     `json:"projectID"`
	ID        int64     `json:"id"`
	Type      IssueType `json:"type"`
	IdentityInfo
}

更新事件类型请求

type IssueUpdateRequest

type IssueUpdateRequest struct {
	Title          *string          `json:"title"`
	Content        *string          `json:"content"`
	State          *int64           `json:"state"`
	Priority       *IssuePriority   `json:"priority"`
	Complexity     *IssueComplexity `json:"complexity"`
	Severity       *IssueSeverity   `json:"severity"`
	PlanStartedAt  *time.Time       `json:"planStartedAt"`
	PlanFinishedAt *time.Time       `json:"planFinishedAt"`
	Assignee       *string          `json:"assignee"`
	IterationID    *int64           `json:"iterationID"`
	Source         *string          `json:"source"`        // 来源
	Labels         []string         `json:"labels"`        // label 名称列表
	RelatedIssues  []int64          `json:"relatedIssues"` // 已关联的issue
	TaskType       *string          `json:"taskType"`      // 任务类型
	BugStage       *string          `json:"bugStage"`      // bug阶段
	Owner          *string          `json:"owner"`         // 负责人
	//工时信息,当事件类型为任务和缺陷时生效
	ManHour *IssueManHour `json:"issueManHour"`

	TestPlanCaseRelIDs       []uint64 `json:"testPlanCaseRelIDs"`       // 关联的测试计划用例 ID 列表,全量更新
	RemoveTestPlanCaseRelIDs bool     `json:"removeTestPlanCaseRelIDs"` // 是否清空所有关联的测试计划用例

	ID uint64 `json:"-"`
	// internal use, get from *http.Request
	IdentityInfo
}

IssueUpdateRequest 事件更新请求

func (*IssueUpdateRequest) GetChangedFields

func (r *IssueUpdateRequest) GetChangedFields(manHour string) map[string]interface{}

GetChangedFields 从 IssueUpdateRequest 中找出需要更新(不为空)的字段 注意:map 的 value 需要与 dao.Issue 字段类型一致

func (*IssueUpdateRequest) GetFormartIssueRelations

func (r *IssueUpdateRequest) GetFormartIssueRelations() string

GetFormartIssueRelations 获取以逗号分割的字符串形式的issueID串

func (*IssueUpdateRequest) IsEmpty

func (r *IssueUpdateRequest) IsEmpty() bool

IsEmpty 判断更新请求里的字段是否均为空

type IssueUpdateResponse

type IssueUpdateResponse struct {
	Header
	Data uint64 `json:"data"`
}

IssueUpdateResponse 事件更新响应

type IssuesStageRequest

type IssuesStageRequest struct {
	StatisticRange string `json:"statisticRange"` //事件类型 项目/迭代
	RangeID        int64  `json:"rangeId"`        //项目id/迭代id
}

IssueManHourSumRequest 事件下所有的任务总和请求

type IstioInfo

type IstioInfo struct {
	Installed   bool
	Version     string
	IsAliyunASM bool
}

type Iteration

type Iteration struct {
	ID           int64          `json:"id"`
	CreatedAt    time.Time      `json:"createdAt"`
	UpdatedAt    time.Time      `json:"updatedAt"`
	StartedAt    *time.Time     `json:"startedAt"`
	FinishedAt   *time.Time     `json:"finishedAt"`
	ProjectID    uint64         `json:"projectID"`
	Title        string         `json:"title"`
	Content      string         `json:"content"`
	Creator      string         `json:"creator"`
	State        IterationState `json:"state"`
	IssueSummary ISummary       `json:"issueSummary"`
}

type IterationCreateRequest

type IterationCreateRequest struct {
	// +optional
	StartedAt *time.Time `json:"startedAt"`
	// +optional
	FinishedAt *time.Time `json:"finishedAt"`
	// +required
	ProjectID uint64 `json:"projectID"`
	// +required
	Title string `json:"title"`
	// +optional
	Content string `json:"content"`

	// internal use, get from *http.Request
	IdentityInfo
}

IterationCreateRequest 创建迭代请求

type IterationCreateResponse

type IterationCreateResponse struct {
	Header
	Data *Iteration `json:"data"`
}

IterationCreateResponse 创建迭代响应

type IterationGetResponse

type IterationGetResponse struct {
	Header
	UserInfoHeader
	Data Iteration `json:"data"`
}

IterationGetResponse 迭代详情响应

type IterationPagingRequest

type IterationPagingRequest struct {
	// +optional default 1
	PageNo uint64
	// +optional default 10
	PageSize uint64
	// +optional 根据迭代结束时间过滤
	Deadline string `schema:"deadline"`
	// +required
	ProjectID uint64 `schema:"projectID"`
	// +optional 根据归档状态过滤
	State IterationState `schema:"state"`
	// +optional 是否查询事项概览,默认查询
	WithoutIssueSummary bool `schema:"withoutIssueSummary"`
}

type IterationPagingResponse

type IterationPagingResponse struct {
	Header
	UserInfoHeader
	Data *IterationPagingResponseData `json:"data"`
}

type IterationPagingResponseData

type IterationPagingResponseData struct {
	Total uint64      `json:"total"`
	List  []Iteration `json:"list"`
}

type IterationState

type IterationState string

IterationState 迭代归档状态

const (
	IterationStateFiled   IterationState = "FILED"
	IterationStateUnfiled IterationState = "UNFILED"
)

type IterationUpdateRequest

type IterationUpdateRequest struct {
	// +required
	Title string `json:"title"`
	// +required
	Content string `json:"content"`
	// +required
	StartedAt *time.Time `json:"startedAt"`
	// +required
	FinishedAt *time.Time `json:"finishedAt"`
	// +required
	State IterationState `json:"state"`
	// internal use, get from *http.Request
	IdentityInfo
}

IterationUpdateRequest 更新迭代请求

type IterationUpdateResponse

type IterationUpdateResponse struct {
	Header
	Data uint64 `json:"data"`
}

IterationUpdateResponse 更新迭代响应

type Job

type Job struct {
	CreatedTime    int64         `json:"created_time"`
	LastStartTime  int64         `json:"last_start_time"`
	LastFinishTime int64         `json:"last_finish_time"`
	LastModify     string        `json:"last_modify"`
	Result         interface{}   `json:"result,omitempty"`
	ScheduleInfo   ScheduleInfo  `json:"scheduleInfo,omitempty"`  // 根据集群配置以及 label 所计算出的调度规则
	ScheduleInfo2  ScheduleInfo2 `json:"scheduleInfo2,omitempty"` // 将会代替 ScheduleInfo
	BigdataConf    `json:"bigdataConf,omitempty"`
	JobFromUser
	StatusDesc
}

Job defines a Job.

type JobBatchRequest

type JobBatchRequest struct {
	Names []string `json:"names"`
}

type JobBatchResponse

type JobBatchResponse struct {
	Names []string `json:"names"`
	Error string   `json:"error"`
	Jobs  []Job    `json:"jobs"`
}

type JobCreateRequest

type JobCreateRequest JobFromUser

type JobCreateResponse

type JobCreateResponse struct {
	Name  string `json:"name"`
	Error string `json:"error"`
	Job   Job    `json:"job"`
}

type JobDeleteResponse

type JobDeleteResponse struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
	Error     string `json:"error"`
}

type JobFromUser

type JobFromUser struct {
	Name         string                 `json:"name"`
	Namespace    string                 `json:"namespace"`    // the default namespace is "default"
	ID           string                 `json:"id,omitempty"` // if Job has owner, e.g. jobflow, it's ID can be specified.
	CallBackUrls []string               `json:"callbackurls,omitempty"`
	Image        string                 `json:"image,omitempty"`
	Resource     string                 `json:"resource,omitempty"`  // Flink时,为jarId;Spark时,为jar url
	MainClass    string                 `json:"mainClass,omitempty"` // 入口类, 主要用于Flink/Spark
	MainArgs     []string               `json:"mainArgs"`            // 入口类参数, 主要用于Flink/Spark
	Cmd          string                 `json:"cmd,omitempty"`
	CPU          float64                `json:"cpu,omitempty"`
	Memory       float64                `json:"memory,omitempty"`
	Labels       map[string]string      `json:"labels,omitempty"`
	Extra        map[string]string      `json:"extra,omitempty"`
	Env          map[string]string      `json:"env,omitempty"`
	Binds        []Bind                 `json:"binds,omitempty"`
	Volumes      []diceyml.Volume       `json:"volumes,omitempty"`
	Executor     string                 `json:"executor,omitempty"`
	ClusterName  string                 `json:"clusterName,omitempty"`
	Kind         string                 `json:"kind"`              // Metronome/FLink/Spark/LocalDocker/Swarm/Kubernetes
	Depends      []string               `json:"depends,omitempty"` // JobName
	PreFetcher   *PreFetcher            `json:"preFetcher,omitempty"`
	BackoffLimit int                    `json:"backoffLimit,omitempty"`
	Params       map[string]interface{} `json:"params,omitempty"`
}

type JobKind

type JobKind string
var (
	Metronome   JobKind = "Metronome"
	Flink       JobKind = "Flink"
	Spark       JobKind = "Spark"
	K8SSpark    JobKind = "K8SSpark"
	K8SFlink    JobKind = "K8SFlink"
	LocalDocker JobKind = "LocalDocker"
	LocalJob    JobKind = "LocalJob"
	Swarm       JobKind = "Swarm"
	Kubernetes  JobKind = "Kubernetes"
)

type JobStartResponse

type JobStartResponse struct {
	Name  string `json:"name"`
	Error string `json:"error"`
	Job   Job    `json:"job"`
}

type JobStopResponse

type JobStopResponse struct {
	Name  string `json:"name"`
	Error string `json:"error"`
}

type JobVolume

type JobVolume struct {
	Namespace string `json:"namespace"`
	// 用于生成volume id = <namespace>-<name:>
	Name string `json:"name"`
	// nfs | local
	Type string `json:"type"`

	Executor    string `json:"executor,omitempty"`
	ClusterName string `json:"clusterName,omitempty"`
	Kind        string `json:"kind"`
}

type JobVolumeCreateResponse

type JobVolumeCreateResponse struct {
	ID    string `json:"id"`
	Error string `json:"error"`
}

type JobsDeleteResponse

type JobsDeleteResponse []JobDeleteResponse

type KMSCreateKeyRequest

type KMSCreateKeyRequest struct {
	kmstypes.CreateKeyRequest
}

create key

type KMSCreateKeyResponse

type KMSCreateKeyResponse struct {
	Header
	Data *kmstypes.CreateKeyResponse `json:"data,omitempty"`
}

type KMSDecryptRequest

type KMSDecryptRequest struct {
	kmstypes.DecryptRequest
}

decrypt

type KMSDecryptResponse

type KMSDecryptResponse struct {
	Header
	Data *kmstypes.DecryptResponse `json:"data,omitempty"`
}

type KMSDescribeKeyRequest

type KMSDescribeKeyRequest struct {
	kmstypes.DescribeKeyRequest
}

describe key

type KMSDescribeKeyResponse

type KMSDescribeKeyResponse struct {
	Header
	Data *kmstypes.DescribeKeyResponse `json:"data,omitempty"`
}

type KMSEncryptRequest

type KMSEncryptRequest struct {
	kmstypes.EncryptRequest
}

encrypt

type KMSEncryptResponse

type KMSEncryptResponse struct {
	Header
	Data *kmstypes.EncryptResponse `json:"data,omitempty"`
}

type KMSGenerateDataKeyRequest

type KMSGenerateDataKeyRequest struct {
	kmstypes.GenerateDataKeyRequest
}

generate data key

type KMSGenerateDataKeyResponse

type KMSGenerateDataKeyResponse struct {
	Header
	Data *kmstypes.GenerateDataKeyResponse `json:"data,omitempty"`
}

type KMSRotateKeyVersionRequest

type KMSRotateKeyVersionRequest struct {
	kmstypes.RotateKeyVersionRequest
}

rotate key version

type KMSRotateKeyVersionResponse

type KMSRotateKeyVersionResponse struct {
	Header
	Data *kmstypes.RotateKeyVersionResponse `json:"data,omitempty"`
}

type LibReference

type LibReference struct {
	ID             uint64         `json:"id"`
	AppID          uint64         `json:"appID"`
	LibID          uint64         `json:"libID"`
	LibName        string         `json:"libName"`
	LibDesc        string         `json:"libDesc"`
	ApprovalID     uint64         `json:"approvalID"`
	ApprovalStatus ApprovalStatus `json:"approvalStatus"`
	Creator        string         `json:"creator"`
	CreatedAt      *time.Time     `json:"createdAt"`
	UpdatedAt      *time.Time     `json:"updatedAt"`
}

LibReference 库引用返回结构

type LibReferenceCreateRequest

type LibReferenceCreateRequest struct {
	AppID   uint64 `json:"appID"`
	AppName string `json:"appName"`
	LibID   uint64 `json:"libID"`
	LibName string `json:"libName"`
	LibDesc string `json:"libDesc"`

	OrgID uint64
	IdentityInfo
}

LibReferenceCreateRequest 库引用创建请求

type LibReferenceCreateResponse

type LibReferenceCreateResponse struct {
	Header
	Data uint64 `json:"data"`
}

LibReferenceCreateResponse 库引用创建响应

type LibReferenceListRequest

type LibReferenceListRequest struct {
	// +optional
	AppID uint64 `schema:"appID"`
	// +optional
	LibID uint64 `schema:"libID"`
	// +optional
	ApprovalStatus ApprovalStatus `schema:"approvalStatus"`
	// +optional
	PageNo uint64 `schema:"pageNo"`
	// +optional
	PageSize uint64 `schema:"pageSize"`

	IdentityInfo
}

LibReferenceListRequest 库引用请求

type LibReferenceListResponse

type LibReferenceListResponse struct {
	Header
	UserInfoHeader
	Data LibReferenceListResponseData `json:"data"`
}

LibReferenceListResponse 库引用响应

type LibReferenceListResponseData

type LibReferenceListResponseData struct {
	Total uint64         `json:"total"`
	List  []LibReference `json:"list"`
}

LibReferenceListResponseData 库引用响应数据

type LibReferenceVersion

type LibReferenceVersion struct {
	LibName string `json:"libName"`
	Version string `json:"version"`
}

LibReferenceVersion 库引用版本

type LicenseResponse

type LicenseResponse struct {
	Valid            bool             `json:"valid"`
	Message          string           `json:"message"`
	CurrentHostCount uint64           `json:"currentHostCount"`
	License          *license.License `json:"license"`
}

LicenseResponse 查询license响应数据

type LimitType

type LimitType struct {
	Day    *int `json:"qpd,omitempty"`
	Hour   *int `json:"qph,omitempty"`
	Minute *int `json:"qpm,omitempty"`
	Second *int `json:"qps,omitempty"`
}

type ListAPIGatewaysReq

type ListAPIGatewaysReq struct {
	OrgID     uint64
	Identity  *IdentityInfo
	URIParams *ListAPIGatewaysURIParams
}

type ListAPIGatewaysURIParams

type ListAPIGatewaysURIParams struct {
	AssetID string
}

type ListAccessObj

type ListAccessObj struct {
	AssetID       string                `json:"assetID"`
	AssetName     string                `json:"assetName"`
	TotalChildren uint64                `json:"totalChildren"`
	UpdatedAt     time.Time             `json:"-"`
	Children      []*ListAccessObjChild `json:"children"`
}

type ListAccessObjChild

type ListAccessObjChild struct {
	ID             uint64          `json:"id"`
	SwaggerVersion string          `json:"swaggerVersion"`
	AppCount       uint64          `json:"appCount"`
	ProjectID      uint64          `json:"-"`
	CreatorID      string          `json:"-"`
	CreatedAt      time.Time       `json:"createdAt"`
	UpdatedAt      time.Time       `json:"updatedAt"`
	Permission     map[string]bool `json:"permission"`
}

type ListAccessQueryParams

type ListAccessQueryParams struct {
	Paging   bool   `json:"paging" schema:"paging"`
	PageNo   uint64 `json:"pageNo" schema:"pageNo"`
	PageSize uint64 `json:"pageSize" schema:"pageSize"`
	Keyword  string `json:"keyword" schema:"keyword"`
}

type ListAccessReq

type ListAccessReq struct {
	OrgID       uint64
	Identity    *IdentityInfo
	QueryParams *ListAccessQueryParams
}

查询管理条目列表参数结构

type ListAccessRsp

type ListAccessRsp struct {
	OrgID uint64           `json:"orgID"`
	List  []*ListAccessObj `json:"list"`
	Total uint64           `json:"total"`
}

查询管理条目的响应

type ListCloudAccount

type ListCloudAccount struct {
	OrgID       string `json:"orgID"`
	Vendor      string `json:"vendor"`
	AccessKey   string `json:"accessKeyID"`
	Description string `json:"description"`
}

type ListCloudAccountData

type ListCloudAccountData struct {
	Total int                `json:"total"`
	List  []ListCloudAccount `json:"list"`
}

type ListCloudAccountResponse

type ListCloudAccountResponse struct {
	Header
	Data ListCloudAccountData `json:"data"`
}

type ListCloudAddonBasicRequest

type ListCloudAddonBasicRequest struct {
	Vendor string `query:"vendor"`
	Region string `query:"region"`
	// optional, by vpc
	VpcID string `query:"vpcID"`
	// optional, by project, e.g addon
	ProjectID string `query:"projectID"`
	// optional (addon ons request need: DEV/TEST/STAGING/PRO)
	Workspace string `json:"workspace"`
}

type ListCloudGateway

type ListCloudGateway struct {
	Slbs     []PrivateSlbInfo `json:"slbs"`
	Gateways []ApiGatewayInfo `json:"gateways"`
}

type ListCloudResourceECS

type ListCloudResourceECS struct {
	ID             string            `json:"id"`
	StartTime      string            `json:"startTime"`
	RegionID       string            `json:"regionID"`
	RegionName     string            `json:"regionName"`
	ChargeType     string            `json:"chargeType"`
	Vendor         string            `json:"vendor"`
	InnerIpAddress string            `json:"innerIpAddress"`
	HostName       string            `json:"hostname"`
	Memory         int               `json:"memory"`
	CPU            int               `json:"cpu"`
	ExpireTime     string            `json:"expireTime"`
	OsName         string            `json:"osName"`
	Status         string            `json:"status"`
	Tag            map[string]string `json:"tag"`
}

type ListCloudResourceECSData

type ListCloudResourceECSData struct {
	Total int                    `json:"total"`
	List  []ListCloudResourceECS `json:"list"`
}

type ListCloudResourceECSRequest

type ListCloudResourceECSRequest struct {
	// enum: aliyun
	Vendor string `query:"vendor"`
	// optional
	Region string `query:"region"`
	// optional
	Cluster string `query:"cluster"`
	// optional
	InnerIpAddress string `query:"innerIpAddress"`

	PageNo   int `query:"pageNo"`
	PageSize int `query:"pageSize"`
}

type ListCloudResourceECSResponse

type ListCloudResourceECSResponse struct {
	Header
	Data ListCloudResourceECSData `json:"data"`
}

type ListCloudResourceGatewayRequest

type ListCloudResourceGatewayRequest ListCloudAddonBasicRequest

Gateway list request

type ListCloudResourceGatewayResponse

type ListCloudResourceGatewayResponse struct {
	Header
	Data ListCloudGateway `json:"data"`
}

type ListCloudResourceMysqlRequest

type ListCloudResourceMysqlRequest ListCloudAddonBasicRequest

Mysql list request

type ListCloudResourceMysqlResponse

type ListCloudResourceMysqlResponse struct {
	Header
	Data CloudResourceMysqlData `json:"data"`
}

Mysql list response

type ListCloudResourceOnsRequest

type ListCloudResourceOnsRequest ListCloudAddonBasicRequest

List ons(rocket mq) request

type ListCloudResourceOnsResponse

type ListCloudResourceOnsResponse struct {
	Header
	Data CloudResourceOnsData `json:"data"`
}

List ons(rocket my) response

type ListCloudResourceOssRequest

type ListCloudResourceOssRequest struct {
	Vendor string `query:"vendor"`
	Name   string `query:"name"`
}

oss list request

type ListCloudResourceOssResponse

type ListCloudResourceOssResponse struct {
	Header
	Data CloudResourceOssData `json:"data"`
}

oss list response

type ListCloudResourceRedisData

type ListCloudResourceRedisData struct {
	Total int                           `json:"total"`
	List  []CloudResourceRedisBasicData `json:"list"`
}

type ListCloudResourceRedisRequest

type ListCloudResourceRedisRequest ListCloudAddonBasicRequest

Redis list request

type ListCloudResourceRedisResponse

type ListCloudResourceRedisResponse struct {
	Header
	Data ListCloudResourceRedisData `json:"data"`
}

Redis list response

type ListCloudResourceRegion

type ListCloudResourceRegion struct {
	RegionID  string `json:"regionID"`
	LocalName string `json:"localName"`
}

type ListCloudResourceRegionRequest

type ListCloudResourceRegionRequest struct {
	Vendor string `query:"vendor"`
}

type ListCloudResourceRegionResponse

type ListCloudResourceRegionResponse struct {
	Header
	Data []ListCloudResourceRegion `json:"data"`
}

type ListCloudResourceTypeData

type ListCloudResourceTypeData struct {
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`
}

type ListCloudResourceVPC

type ListCloudResourceVPC struct {
	Vendor     string            `json:"vendor"`
	Status     string            `json:"status"`
	RegionID   string            `json:"regionID"`
	RegionName string            `json:"regionName"`
	VpcID      string            `json:"vpcID"`
	VpcName    string            `json:"vpcName"`
	CidrBlock  string            `json:"cidrBlock"`
	VswNum     int               `json:"vswNum"`
	Tags       map[string]string `json:"tags"`
}

type ListCloudResourceVPCData

type ListCloudResourceVPCData struct {
	Total int                    `json:"total"`
	List  []ListCloudResourceVPC `json:"list"`
}

type ListCloudResourceVPCRequest

type ListCloudResourceVPCRequest struct {
	// enum: aliyun
	Vendor string `query:"vendor"`
	// optional
	Region string `query:"region"`
	// optional
	Cluster string `query:"cluster"`
}

type ListCloudResourceVPCResponse

type ListCloudResourceVPCResponse struct {
	Header
	Data ListCloudResourceVPCData `json:"data"`
}

type ListCloudResourceVSW

type ListCloudResourceVSW struct {
	VswName   string            `json:"vswName"`
	VSwitchID string            `json:"vSwitchID"`
	CidrBlock string            `json:"cidrBlock"`
	VpcID     string            `json:"vpcID"`
	Status    string            `json:"status"`
	Region    string            `json:"region"`
	ZoneID    string            `json:"zoneID"`
	ZoneName  string            `json:"zoneName"`
	Tags      map[string]string `json:"tags"`
}

type ListCloudResourceVSWData

type ListCloudResourceVSWData struct {
	Total int                    `json:"total"`
	List  []ListCloudResourceVSW `json:"list"`
}

type ListCloudResourceVSWRequest

type ListCloudResourceVSWRequest ListCloudResourceECSRequest

type ListCloudResourceVSWResponse

type ListCloudResourceVSWResponse struct {
	Header
	Data ListCloudResourceVSWData `json:"data"`
}

type ListCloudResourceZone

type ListCloudResourceZone struct {
	ZoneID    string `json:"zoneID"`
	LocalName string `json:"localName"`
}

type ListCloudResourceZoneRequest

type ListCloudResourceZoneRequest struct {
	Vendor string `query:"vendor"`
	Region string `query:"region"`
}

type ListCloudResourceZoneResponse

type ListCloudResourceZoneResponse struct {
	Header
	Data []ListCloudResourceZone `json:"data"`
}

type ListCloudResourcesResponse

type ListCloudResourcesResponse struct {
	Header
	Data []ListCloudResourceTypeData `json:"data"`
}

type ListContractQueryParams

type ListContractQueryParams struct {
	Paging   bool             `json:"paging" schema:"paging"`
	PageNo   uint64           `json:"pageNo" schema:"pageNo"`
	PageSize uint64           `json:"pageSize" schema:"pageSize"`
	Status   []ContractStatus `json:"status"`
}

type ListContractRecordsReq

type ListContractRecordsReq struct {
	OrgID     uint64
	Identity  *IdentityInfo
	URIParams *ListContractRecordsURIParams
}

查询合约操作记录参数结构

type ListContractRecordsRsp

type ListContractRecordsRsp struct {
	Total uint64                 `json:"total"`
	List  []*ContractRecordModel `json:"list"`
}

查询合约操作记录响应结构

type ListContractRecordsURIParams

type ListContractRecordsURIParams struct {
	ClientID   string
	ContractID string
}

type ListContractsReq

type ListContractsReq struct {
	OrgID       uint64
	Identity    *IdentityInfo
	URIParams   *ListContractsURIParams
	QueryParams *ListContractQueryParams
}

查询合约列表的参数结构

type ListContractsRsp

type ListContractsRsp struct {
	Total uint64                  `json:"total"`
	List  []*ContractModelAdvance `json:"list"`
}

查询合约列表响应结构

type ListContractsURIParams

type ListContractsURIParams struct {
	ClientID string
}

type ListLabelsData

type ListLabelsData struct {
	Name  string `json:"name"`
	Label string `json:"label"`
	Desc  string `json:"desc"`
	// 类似 org-, 都是前缀 label
	IsPrefix   bool   `json:"isPrefix"`
	Group      string `json:"group"`
	GroupName  string `json:"groupName"`
	GroupLevel int    `json:"groupLevel"`
	WithValue  bool   `json:"withValue"`
}

type ListLabelsResponse

type ListLabelsResponse struct {
	Header
	Data []ListLabelsData `json:"data"`
}

type ListMemberRolesByUserRequest

type ListMemberRolesByUserRequest struct {
	UserID    string    `schema:"userId"`
	ScopeType ScopeType `schema:"scopeType"`
	ParentID  int64     `schema:"parentId"`
	PageNo    int       `schema:"pageNo"`
	PageSize  int       `schema:"pageSize"`
}

ListMemberRolesByUserRequest 查询用户的角色列表请求

func (*ListMemberRolesByUserRequest) Check

func (lr *ListMemberRolesByUserRequest) Check() error

Check 检查request是否合法

type ListMemberRolesByUserResponse

type ListMemberRolesByUserResponse struct {
	Header
	UserInfoHeader
	Data UserRoleListResponseData `json:"data"`
}

ListMemberRolesByUserResponse 查询用户的角色列表响应

type ListMetadata

type ListMetadata struct {
	Total int `json:"total"`
}

type ListMyClientsQueryParams

type ListMyClientsQueryParams struct {
	Paging   bool   `json:"paging" schema:"paging"`
	PageNo   uint64 `json:"pageNo" schema:"pageNo"`
	PageSize uint64 `json:"pageSize" schema:"pageSize"`
	Keyword  string `json:"keyword" schema:"keyword"`
}

type ListMyClientsReq

type ListMyClientsReq struct {
	OrgID       uint64
	Identity    *IdentityInfo
	QueryParams *ListMyClientsQueryParams
}

type ListMyClientsRsp

type ListMyClientsRsp struct {
	Total uint64       `json:"total"`
	List  []*ClientObj `json:"list"`
}

type ListProjectAPIGatewaysReq

type ListProjectAPIGatewaysReq struct {
	OrgID     uint64
	Identity  *IdentityInfo
	URIParams *ListProjectAPIGatewaysURIParams
}

type ListProjectAPIGatewaysURIParams

type ListProjectAPIGatewaysURIParams struct {
	ProjectID string
}

type ListRuntimeServicesResp

type ListRuntimeServicesResp struct {
	RuntimeID     uint64   `json:"runtimeID"`
	RuntimeName   string   `json:"runtimeName"`
	Workspace     string   `json:"workspace"`
	ProjectID     uint64   `json:"projectID,omitempty"`
	AppID         uint64   `json:"appID,omitempty"`
	ServiceName   string   `json:"serviceName"`
	ServiceAddr   []string `json:"serviceAddr"`
	ServiceExpose []string `json:"serviceExpose"`
}

type ListSLAsQueries

type ListSLAsQueries struct {
	ClientID uint64 `json:"clientID" schema:"clientID"` // 库表主键, 不是 客户端 ID 字符串
}

type ListSLAsReq

type ListSLAsReq struct {
	OrgID       uint64
	Identity    *IdentityInfo
	URIParams   *ListSLAsURIs
	QueryParams *ListSLAsQueries
}

type ListSLAsRsp

type ListSLAsRsp struct {
	Total uint64            `json:"total"`
	List  []*ListSLAsRspObj `json:"list"`
}

type ListSLAsRspObj

type ListSLAsRspObj struct {
	SLAModel
	Limits         []*SLALimitModel  `json:"limits"`
	AssetID        string            `json:"assetID"`
	AssetName      string            `json:"assetName"`
	SwaggerVersion string            `json:"swaggerVersion"`
	UserTo         SLAUsedInContract `json:"userTo,omitempty"` // current, requesting
	Default        bool              `json:"default"`
	ClientCount    uint64            `json:"clientCount"`
}

type ListSLAsURIs

type ListSLAsURIs struct {
	AssetID        string
	SwaggerVersion string
}

type ListSchemasQueryParams

type ListSchemasQueryParams struct {
	// branch 节点的 inode,
	// 在实现中, 如果传了 branch 以下节点的 inode, 也会被处理成 branch 节点的 inode
	Inode string `json:"inode"`

	// 如果不传 inode, 就必须传 appID 和 branch
	AppID  string `json:"appID"`
	Branch string `json:"branch"`
}

type ListSchemasReq

type ListSchemasReq struct {
	OrgID       uint64
	Identity    *IdentityInfo
	QueryParams *ListSchemasQueryParams
}

type ListSwaggerVersionClientOjb

type ListSwaggerVersionClientOjb struct {
	Client     *ClientModel          `json:"client"`
	Contract   *ContractModelAdvance `json:"contract"`
	Permission map[string]bool       `json:"permission"`
}

type ListSwaggerVersionClientQueryParams

type ListSwaggerVersionClientQueryParams struct {
	Paging   bool   `json:"paging" schema:"paging"`
	PageNo   uint64 `json:"pageNo" schema:"pageNo"`
	PageSize uint64 `json:"pageSize" schema:"pageSize"`
	Status   string `json:"status" schema:"status"`
}

type ListSwaggerVersionClientRsp

type ListSwaggerVersionClientRsp struct {
	Total uint64                         `json:"total"`
	List  []*ListSwaggerVersionClientOjb `json:"list"`
}

type ListSwaggerVersionClientURIParams

type ListSwaggerVersionClientURIParams struct {
	AssetID        string
	SwaggerVersion string
}

type ListSwaggerVersionClientsReq

type ListSwaggerVersionClientsReq struct {
	OrgID       uint64
	Identity    *IdentityInfo
	URIParams   *ListSwaggerVersionClientURIParams
	QueryParams *ListSwaggerVersionClientQueryParams
}

查询 SwaggerVersion 下的客户端列表参数结构

type ListSwaggerVersionRsp

type ListSwaggerVersionRsp struct {
	Total uint64                      `json:"total"`
	List  []*ListSwaggerVersionRspObj `json:"list"`
}

查询版本树的响应体 Data 结构

type ListSwaggerVersionRspObj

type ListSwaggerVersionRspObj struct {
	SwaggerVersion string                   `json:"swaggerVersion"`
	Major          uint64                   `json:"-"`
	Versions       []map[string]interface{} `json:"versions"`
}

type ListSwaggerVersionsQueryParams

type ListSwaggerVersionsQueryParams struct {
	Patch         bool `json:"patch" schema:"patch"`                 // 返回结果是否到 patch 粒度
	Instantiation bool `json:"instantiation" schema:"instantiation"` // 返回的结果是否筛选有 instantiation 的记录
	Access        bool `json:"access" schema:"access"`               // 返回的结果是否筛选有 access 的记录
}

type ListSwaggerVersionsReq

type ListSwaggerVersionsReq struct {
	OrgID       uint64
	Identity    *IdentityInfo
	URIParams   *ListSwaggerVersionsURIParams
	QueryParams *ListSwaggerVersionsQueryParams
}

查询版本树的请求结构

type ListSwaggerVersionsURIParams

type ListSwaggerVersionsURIParams struct {
	AssetID string
}

type LockCluster

type LockCluster struct {
	OrgID       uint64 `json:"orgID"`
	ClusterName string `json:"clusterName"`
}

type LockClusterResponse

type LockClusterResponse struct {
	Header
}

type LockedRepoRequest

type LockedRepoRequest struct {
	AppID     int64  `json:"appId"`
	ProjectID int64  `json:"projectId"`
	IsLocked  bool   `json:"isLocked"`
	AppName   string `json:"appName"`
}

LockedRepoRequest 仓库锁定请求

type LockedRepoResponse

type LockedRepoResponse struct {
	Header
	Data LockedRepoRequest `json:"data"`
}

LockedRepoResponse 仓库锁定响应

type LogDetail

type LogDetail struct {
	Lines []LogLine `json:"lines"`
}

type LogLine

type LogLine struct {
	Source    string `json:"source"`
	ID        string `json:"id"`
	Timestamp string `json:"timestamp"`
	Offset    string `json:"offset"`
	Content   string `json:"content"`
	Level     string `json:"level"`
}

type LogPushLine

type LogPushLine struct {
	ID        string      `json:"id"`
	Source    string      `json:"source"`
	Timestamp int64       `json:"timestamp"`
	Content   string      `json:"content"`
	Stream    *string     `json:"stream,omitempty"`
	Offset    *int        `json:"offset,omitempty"`
	Tags      interface{} `json:"tags,omitempty"`
}

LogPushLine 推日志请求行

type LogPushRequest

type LogPushRequest struct {
	Lines []LogPushLine
}

LogPushRequest 推日志请求

type LoopStrategy

type LoopStrategy struct {
	MaxTimes        int64   `json:"max_times,omitempty" yaml:"max_times,omitempty"`                 // 最大重试次数,-1 表示不限制
	DeclineRatio    float64 `json:"decline_ratio,omitempty" yaml:"decline_ratio,omitempty"`         // 重试衰退速率  2s - 4s - 8s - 16s
	DeclineLimitSec int64   `json:"decline_limit_sec,omitempty" yaml:"decline_limit_sec,omitempty"` // 重试衰退最大值  2s - 4s - 8s - 8s - 8s
	IntervalSec     uint64  `json:"interval_sec,omitempty" yaml:"interval_sec,omitempty"`           // 重试间隔时间 2s - 2s - 2s - 2s
}

type MBox

type MBox struct {
	ID        int64      `json:"id"`
	Title     string     `json:"title"`
	Content   string     `json:"content"`
	Label     string     `json:"label"`
	Status    MBoxStatus `json:"status"`
	CreatedAt time.Time  `json:"createdAt"`
	ReadAt    *time.Time `json:"readAt"`
}

MBox 站内信结构

type MBoxStatus

type MBoxStatus string
const (
	MBoxReadStatus   MBoxStatus = "read"
	MBoxUnReadStatus MBoxStatus = "unread"
)

type MRCommentInfo

type MRCommentInfo struct {
	AppID   int64  `json:"appID"`
	MRID    int64  `json:"mrID"` // 应用内唯一
	MRTitle string `json:"mrTitle"`
}

MRCommentInfo MR 评论内容

type MarketDomainDTO

type MarketDomainDTO struct {
	BaseParam
}

type Member

type Member struct {
	UserID string `json:"userId"`
	Email  string `json:"email"`
	Mobile string `json:"mobile"`
	Name   string `json:"name"`
	Nick   string `json:"nick"`
	Avatar string `json:"avatar"`
	// Deprecated: 当前用户的状态,兼容老数据
	Status string `json:"status"`
	// 成员的归属
	Scope Scope `json:"scope"`
	// 成员角色,多角色
	Roles []string `json:"roles"`
	// 成员标签,多标签
	Labels []string `json:"labels"`
	// 被移除标记, 延迟删除
	Removed bool `json:"removed"`
	// uc注销用户的标记,用于分页查询member时的返回
	Deleted bool `json:"deleted"`
}

Member 成员信息

type MemberAddByInviteCodeRequest

type MemberAddByInviteCodeRequest struct {
	VerifyCode string   `json:"verifyCode"`
	UserIDs    []string `json:"userIds"`
	OrgID      string   `json:"orgId"`
}

MemberAddByInviteCodeRequest 通过邀请码添加成员请求

type MemberAddByInviteCodeResponse

type MemberAddByInviteCodeResponse struct {
	Header
	Data string `json:"data"`
}

MemberAddByInviteCodeResponse 通过邀请码添加成员响应

type MemberAddOptions

type MemberAddOptions struct {
	// 是否覆盖已存在的成员
	Rewrite bool `json:"rewrite"`
}

MemberAddOptions 新增成员参数

type MemberAddRequest

type MemberAddRequest struct {
	// 成员的归属
	Scope Scope `json:"scope"`
	// TargetScopeType,TargetScopeIDs 要加入的scope,当这个参数有时,scope 参数只用来鉴权,不作为目标scope加入
	TargetScopeType ScopeType `json:"targetScopeType"`
	TargetScopeIDs  []int64   `json:"targetScopeIds"`
	// 成员角色,多角色
	Roles []string `json:"roles"`
	// 要添加的用户id列表
	UserIDs []string `json:"userIds"`
	// Deprecated: 可选选项
	Options MemberAddOptions `json:"options"`
	// 成员标签,多标签
	Labels []string `json:"labels"`
	// 邀请成员加入验证码
	VerifyCode string `json:"verifyCode"`
}

MemberAddRequest 添加成员 POST /api/members

type MemberAddResponse

type MemberAddResponse struct {
	Header
}

MemberAddResponse 添加成员 POST /api/members

type MemberDestroyRequest

type MemberDestroyRequest struct {
	// 要添加的用户id列表
	UserIDs []string `json:"userIds"`
}

MemberDestroyRequest 删除一切成员信息响应请求

type MemberDestroyResponse

type MemberDestroyResponse struct {
	Header
	UserInfoHeader
}

MemberDestroyResponse 删除一切成员信息响应

type MemberLabelInfo

type MemberLabelInfo struct {
	Label MemeberLabelName `json:"label"`
	Name  string           `json:"name"`
}

MemberLabelInfo 成员标签

type MemberLabelList

type MemberLabelList struct {
	// 角色标签
	List []MemberLabelInfo `json:"list"`
}

MemberLabelList 成员标签列表

type MemberLabelListResponse

type MemberLabelListResponse struct {
	Header
	Data MemberLabelList `json:"data"`
}

MemberLabelListResponse 查询成员标签列表 GET /api/members/actions/list-labels

type MemberList

type MemberList struct {
	List  []Member `json:"list"`
	Total int      `json:"total"`
}

MemberList 成员列表

type MemberListRequest

type MemberListRequest struct {
	// 类型 sys, org, project, app
	ScopeType ScopeType `query:"scopeType"`
	// 对应的 orgId, projectId, applicationId
	ScopeID int64 `query:"scopeId"`
	// 过滤角色
	Roles []string `query:"roles"`
	// 过滤标签
	Labels []string `query:"label"`
	// 查询参数
	Q        string `query:"q"`
	PageNo   int    `query:"pageNo"`
	PageSize int    `query:"pageSize"`
}

MemberListRequest 查询成员 GET /api/members

type MemberListResponse

type MemberListResponse struct {
	Header
	Data MemberList `json:"data"`
}

MemberListResponse 查询成员 GET /api/members

type MemberRemoveRequest

type MemberRemoveRequest struct {
	// 成员的归属
	Scope Scope `json:"scope"`
	// 要添加的用户id列表
	UserIDs []string `json:"userIds"`
	IdentityInfo
}

MemberRemoveRequest 删除成员 POST /api/members/actions/remove

type MemberRemoveResponse

type MemberRemoveResponse struct {
	Header
	UserInfoHeader
}

MemberRemoveResponse 删除成员 POST /api/members/actions/remove

type MemberRoleListResponse

type MemberRoleListResponse struct {
	Header
	Data RoleList `json:"data"`
}

MemberRolesResponse 获取角色列表 GET /api/members/actions/list-roles

type MemberUserInfoUpdateRequest

type MemberUserInfoUpdateRequest struct {
	Members []Member `json:"members"`
}

MemberUserInfoUpdateRequest 成员用户信息更新请求

type MemberUserInfoUpdateResponse

type MemberUserInfoUpdateResponse struct {
	Header
}

MemberUserInfoUpdateResponse 成员用户信息更新响应

type MemeberLabelName

type MemeberLabelName string
const (
	// LabelNameOutsource 外包人员
	LabelNameOutsource MemeberLabelName = "Outsource"
	// LabelNamePartner 合作伙伴
	LabelNamePartner MemeberLabelName = "Partner"
)

type MergeRequestInfo

type MergeRequestInfo struct {
	Id                   int64        `json:"id"`
	RepoMergeId          int          `json:"mergeId"`
	AppID                int64        `json:"appId"`
	RepoID               int64        `json:"repoId"`
	Title                string       `json:"title"`
	AuthorId             string       `json:"authorId"`
	AuthorUser           *UserInfoDto `json:"authorUser"`
	Description          string       `json:"description"`
	AssigneeId           string       `json:"assigneeId"`
	AssigneeUser         *UserInfoDto `json:"assigneeUser"`
	MergeUserId          string       `json:"mergeUserId"`
	MergeUser            *UserInfoDto `json:"mergeUser"`
	CloseUserId          string       `json:"closeUserId"`
	CloseUser            *UserInfoDto `json:"closeUser"`
	SourceBranch         string       `json:"sourceBranch"`
	TargetBranch         string       `json:"targetBranch"`
	SourceSha            string       `json:"sourceSha"`
	TargetSha            string       `json:"targetSha"`
	RemoveSourceBranch   bool         `json:"removeSourceBranch"`
	State                string       `json:"state"`
	IsCheckRunValid      bool         `json:"isCheckRunValid"`
	TargetBranchRule     *ValidBranch `json:"targetBranchRule"`
	DefaultCommitMessage string       `json:"defaultCommitMessage"`
	CreatedAt            time.Time    `json:"createdAt"`
	UpdatedAt            *time.Time   `json:"updatedAt"`
	CloseAt              *time.Time   `json:"closeAt"`
	MergeAt              *time.Time   `json:"mergeAt"`
	Link                 string       `json:"link"`
	Score                int          `json:"score"`    //总评分
	ScoreNum             int          `json:"scoreNum"` // 评分人数
	RebaseBranch         string       `json:"rebaseBranch" default:"-"`
	EventName            string       `json:"eventName"`
	CheckRuns            CheckRuns    `json:"checkRuns,omitempty"`
}

type MergeStatusInfo

type MergeStatusInfo struct {
	HasConflict bool   `json:"hasConflict"`
	IsMerged    bool   `json:"isMerged"`
	HasError    bool   `json:"hasError"`
	ErrorMsg    string `json:"errorMsg"`
}

type MergeTemplatesResponseData

type MergeTemplatesResponseData struct {
	//所在分支
	Branch string `json:"branch"`
	//模板所在目录
	Path string `json:"path"`
	//模板文件列表
	Names []string `json:"names"`
}

MergeTemplatesResponseData mr模板数据

type MergeTrigger

type MergeTrigger struct {
	Branches []string `yaml:"branches,omitempty" json:"branches,omitempty"`
}

type MessageCertificateKeyDTO

type MessageCertificateKeyDTO struct {
	Key string `json:"key,omitempty"`
}

MessageCertificateKeyDTO Meaasge 证书 k-v

type MessageCreateRequest

type MessageCreateRequest struct {
	Sender  string                       `json:"sender"`
	Content interface{}                  `json:"content"`
	Labels  map[MessageLabel]interface{} `json:"labels"`
}

MessageCreateRequest see also `bundle/messages.go'

type MessageLabel

type MessageLabel = string

MessageLabel alias as string

const (
	// DingdingLabel "DINGDING": ["<url-1>", "<url-2>"]
	DingdingLabel MessageLabel = "DINGDING"

	// DingdingMarkdownLabel "MARKDOWN": {"title": "title"}
	DingdingMarkdownLabel MessageLabel = "MARKDOWN"

	// HTTPLabel "HTTP": ["<url-1>", "<url-2>"]
	HTTPLabel MessageLabel = "HTTP"

	// HTTPHeaderLabel "HTTP-HEADERS": {"k1": "v1", "k2": "v2"}
	HTTPHeaderLabel MessageLabel = "HTTP-HEADERS"

	// DingdingATLabel
	// "AT":
	// {
	//  "atMobiles": [
	//     "1825718XXXX"
	//   ],
	//   "isAtAll": false
	// }
	DingdingATLabel MessageLabel = "AT"

	// DingdingWorkNoticeLabel see also 'https://open-doc.dingtalk.com/microapp/serverapi2/pgoxpy'
	// "DINGDING-WORKNOTICE":
	// [{
	//   "url": "<worknotice-url>",
	//   "agent_id": "<agentid>",
	//   "userid_list": ["<id1>", "<id2>"]
	// }, ...]
	DingdingWorkNoticeLabel MessageLabel = "DINGDING-WORKNOTICE"

	// MySQLLabel "MYSQL": "<table-name>"
	MySQLLabel MessageLabel = "MYSQL"
)

type Metadata

type Metadata []MetadataField

func (Metadata) DedupByName

func (metadata Metadata) DedupByName() Metadata

func (Metadata) FilterNoErrorLevel

func (metadata Metadata) FilterNoErrorLevel() (notErrorLevel, errorLevel Metadata)

FilterNoErrorLevel filter by field level, return collection of NotErrorLevel and ErrorLevel.

type MetadataField

type MetadataField struct {
	Name     string            `json:"name"`
	Value    string            `json:"value"`
	Type     string            `json:"type,omitempty"`
	Optional bool              `json:"optional,omitempty"`
	Labels   map[string]string `json:"labels,omitempty"`
	Level    MetadataLevel     `json:"level,omitempty"`
}

func (MetadataField) GetLevel

func (field MetadataField) GetLevel() MetadataLevel

type MetadataFieldType

type MetadataFieldType string

type MetadataLevel

type MetadataLevel string
var (
	MetadataLevelError MetadataLevel = "ERROR"
	MetadataLevelWarn  MetadataLevel = "WARN"
	MetadataLevelInfo  MetadataLevel = "INFO"
)

type Metric

type Metric struct {
	Name      string                 `json:"name"`
	Timestamp int64                  `json:"timestamp"`
	Tags      map[string]string      `json:"tags"`
	Fields    map[string]interface{} `json:"fields"`
}

指标详情

type MetricData

type MetricData struct {
	Tag  string  `json:"tag"` // host ip
	Name string  `json:"name"`
	Data float64 `json:"data"`
	Agg  string  `json:"agg"`
}

MetricData metric结构

type Metrics

type Metrics struct {
	Metric []Metric `json:"metrics"`
}

指标集

type MicroProjectMenuRes

type MicroProjectMenuRes struct {
	// addon名称
	AddonName string `json:"addonName"`

	// 实例Id
	InstanceID string `json:"instanceId"`

	// 监控terminus key
	TerminusKey string `json:"terminusKey"`

	// console地址
	ConsoleURL string `json:"consoleUrl"`

	// 项目名称
	ProjectName string `json:"projectName"`

	// addon展示名称
	AddonDisplayName string `json:"addonDisplayName"`
}

MicroProjectMenuRes 微服务治理平台,菜单返回

type MicroProjectRes

type MicroProjectRes struct {
	// 项目ID
	ProjectID string `json:"projectId"`

	// 项目名称
	ProjectName string `json:"projectName"`

	// 所属环境
	Envs []string `json:"envs"`

	// project logo信息
	LogoURL string `json:"logoUrl"`

	// 数量
	MicroTotal string `json:"microTotal"`
}

MicroProjectRes 微服务治理平台

type MicroServiceMenuResponse

type MicroServiceMenuResponse struct {
	Header
	Data []MicroServiceMenuResponseData `json:"data"`
}

type MicroServiceMenuResponseData

type MicroServiceMenuResponseData struct {
	AddonName        string `json:"addonName"`
	AddonDisplayName string `json:"addonDisplayName"`
	InstanceId       string `json:"instanceId"`
	TerminusKey      string `json:"terminusKey"`
	ConsoleUrl       string `json:"consoleUrl"`
	ProjectName      string `json:"projectName"`
}

type MicroServiceProjectResponse

type MicroServiceProjectResponse struct {
	Header
	Data []MicroServiceProjectResponseData `json:"data"`
}

type MicroServiceProjectResponseData

type MicroServiceProjectResponseData struct {
	ProjectID    string   `json:"projectId"`
	ProjectName  string   `json:"projectName"`
	LogoURL      string   `json:"logoUrl"`
	Envs         []string `json:"envs"`
	TenantGroups []string `json:"tenantGroups"`
}

type MiddlewareFetchResponse

type MiddlewareFetchResponse struct {
	Data MiddlewareFetchResponseData `json:"data"`
}

MiddlewareFetchResponse middleware 详情响应

type MiddlewareFetchResponseData

type MiddlewareFetchResponseData struct {
	Name       string `json:"name"`
	IsOperator bool   `json:"isOperator"`
	// InstanceID 实例ID
	InstanceID string `json:"instanceId"`
	// AddonName addon 名称
	AddonName string `json:"addonName"`
	// LogoURL addon logo
	LogoURL string `json:"logoUrl"`
	// Plan addon 规格, basic/professional, etc
	Plan string `json:"plan"`
	// Version addon 版本
	Version string `json:"version"`
	// 项目ID
	ProjectID   string `json:"projectId"`
	ProjectName string `json:"projectName"`
	// Category addon 类别: 微服务/数据库/配置中心,etc
	Category string `json:"category"`
	// Workspace, DEV/TEST/STAGING/PROD
	Workspace string `json:"workspace"`
	// Status addon 状态
	Status string `json:"status"`
	// AttachCount 引用数量
	AttachCount int `json:"attachCount"`
	// Config addon 使用配置, eg: 地址/端口/账号
	Config map[string]interface{} `json:"config"`
	// ReferenceInfos 引用详情
	ReferenceInfos []AddonReferenceInfo `json:"referenceInfos"`
	// Cluster 集群名称
	Cluster string `json:"cluster,omitempty"`
	// CreatedAt 创建时间
	CreatedAt time.Time `json:"createdAt"`
	// UpdatedAt 更新时间
	UpdatedAt time.Time `json:"updatedAt"`
}

MiddlewareFetchResponseData middleware 详情响应数据

type MiddlewareListItem

type MiddlewareListItem struct {
	// 实例ID
	InstanceID string `json:"instanceId"`
	// addon名称
	AddonName string `json:"addonName"`
	// 项目ID
	ProjectID string `json:"projectId"`
	// 项目名称
	ProjectName string `json:"projectName"`
	// 环境
	Env string `json:"env"`
	// 环境
	ClusterName string `json:"clusterName"`
	// 名称
	Name string `json:"name"`
	// cpu
	CPU float64 `json:"cpu"` // 单位:core
	// 内存
	Mem uint64 `json:"mem"` // 单位:M
	// 节点数
	Nodes int `json:"nodes"`
	// 引用数
	AttachCount int64 `json:"attachCount"`

	IsOperator bool `json:"isOperator"`
}

MiddlewareListItem addon 真实实例列表项

type MiddlewareListRequest

type MiddlewareListRequest struct {
	// ProjectID 项目Id
	ProjectID uint64 `query:"projectId"`
	// AddonName addon 名称
	AddonName string `query:"addonName"`
	// Workspace 工作环境,可选值: DEV/TEST/STAGING/PROD
	Workspace string `query:"workspace"`
	// InstanceID addon真实例ID
	InstanceID string `query:"instanceId"`
	// ip1,ip2,ip3
	InstanceIP string `query:"instanceIP"`
	// PageNo 当前页,默认值: 1
	PageNo int `query:"pageNo"`
	// PageSize 分页大小,默认值: 20
	PageSize int `query:"pageSize"`
	// EndTime 截止时间
	EndTime *time.Time
}

MiddlewareListRequest addon 真实实例列表请求

type MiddlewareListResponse

type MiddlewareListResponse struct {
	Header
	Data MiddlewareListResponseData `json:"data"`
}

MiddlewareListResponse addon 真实实例列表响应

type MiddlewareListResponseData

type MiddlewareListResponseData struct {
	Total    int                  `json:"total"`
	Overview Overview             `json:"overview"`
	List     []MiddlewareListItem `json:"list"`
}

MiddlewareListResponseData addon 真实实例列表响应数据

type MiddlewareResourceFetchResponse

type MiddlewareResourceFetchResponse struct {
	Header
	Data []MiddlewareResourceFetchResponseData `json:"data"`
}

MiddlewareResourceFetchResponse middleware 资源详情响应

type MiddlewareResourceFetchResponseData

type MiddlewareResourceFetchResponseData struct {
	// InstanceID 实例ID
	InstanceID  string    `json:"instanceId"`
	ContainerID string    `json:"containerId"`
	ContainerIP string    `json:"containerIP"`
	ClusterName string    `json:"clusterName"`
	HostIP      string    `json:"hostIP"`
	Image       string    `json:"image"`
	CPURequest  float64   `json:"cpuRequest"`
	CPULimit    float64   `json:"cpuLimit"` // 单位: core
	MemRequest  uint64    `json:"memRequest"`
	MemLimit    uint64    `json:"memLimit"` // 单位: M
	Status      string    `json:"status"`
	StartedAt   time.Time `json:"startedAt"`
}

MiddlewareResourceFetchResponseData 资源详情响应数据

type MiddlewareResourceItem

type MiddlewareResourceItem struct {
	CPU float64 `json:"cpu"`
	Mem float64 `json:"mem"`
}

MiddlewareResourceItem addon使用资源信息

type MigrationStatusDesc

type MigrationStatusDesc struct {
	// Status 返回的运行状态
	Status StatusCode `json:"status"`
	// Desc 说明信息
	Desc string `json:"desc"`
}

MigrationStatus addon规格信息返回res

type MnsReq

type MnsReq struct {
	BasicCloudConf
	ClusterName string `json:"clusterName"`
	AccountId   string `json:"accountId"` //if empty, auto get it
}

type MonitorKeys

type MonitorKeys struct {
	AK    string `json:"ak"`
	AI    string `json:"ai"`
	Env   string `json:"env"`
	AppID int64  `json:"appId"`
}

type MonitorStatusMetricDetails

type MonitorStatusMetricDetails struct {
	ProjectID int64  `json:"projectId"`
	Name      string `json:"name"`
}

MonitorStatusMetricDetails .

type MonitorStatusMetricDetailsResponse

type MonitorStatusMetricDetailsResponse struct {
	Header
	Data MonitorStatusMetricDetails `json:"data"`
}

MonitorStatusMetricDetailsResponse .

type MonthAddTrend

type MonthAddTrend struct {
	Time    []int64               `json:"time"`
	Results []MonthAddTrendData_0 `json:"results"`
	Total   int                   `json:"total"`
	Title   string                `json:"title"`
}

type MonthAddTrendData

type MonthAddTrendData struct {
	AxisIndex int    `json:"axisIndex"`
	ChartType string `json:"chartType"`
	UnitType  string `json:"unitType"`
	Unit      string `json:"unit"`
	Name      string `json:"name"`
	Tag       string `json:"tag"`
	Data      []int  `json:"data"`
}

type MonthAddTrendData_0

type MonthAddTrendData_0 struct {
	Data []struct {
		MonthAdd MonthAddTrendData `json:"monthadd"`
	} `json:"data"`
}

type MultiLevelStatus

type MultiLevelStatus struct {
	// Namespace 指 runtime namespace
	Namespace string `json:"namespace"`
	// Name 指 runtime name
	Name string `json:"name"`
	// Status 指 runtime status
	Status string `json:"status,omitempty"`
	// More 是扩展字段,比如存储runtime下每个服务的名字及状态
	More map[string]string `json:"more,omitempty"`
}

MultiLevelStatus 定义多维度状态,如 runtime 状态,runtime下的service 状态,service下的实例状态

type MySQL

type MySQL struct {
	Host      string `json:"host,omitempty"`
	Port      int    `json:"port,omitempty"`
	Username  string `json:"username,omitempty"`
	Password  string `json:"password,omitempty"`
	DiceDB    string `json:"diceDB,omitempty"`
	PandoraDB string `json:"pandoraDB,omitempty"`
	SonarDB   string `json:"sonarDB,omitempty"`
}

MySQL 平台数据库配置

type MysqlAccountPrivilege

type MysqlAccountPrivilege struct {
	DBName           string `json:"dbName"`
	AccountPrivilege string `json:"accountPrivilege"`
}

type MysqlDBAccountPrivilege

type MysqlDBAccountPrivilege struct {
	DBName string `json:"dbName"`
}

type MysqlDataBaseInfo

type MysqlDataBaseInfo struct {
	DBName  string `json:"dbName"`
	AddonID string `json:"addonID"`
	// optional, default uft8mb4
	CharacterSetName string `json:"characterSetName" default:"utf8mb4"`
	Description      string `json:"description"`
	// optional, if come from addon, auto generate a read write account
	CloudResourceMysqlAccount
}

type MysqlExec

type MysqlExec struct {
	// Sqls 执行语句
	Sqls []string `json:"sqls"`
	// Host mysql host
	Host string `json:"host"`
	// URL url
	URL string `json:"url"`
	// User 登录用户
	User string `json:"user"`
	// Password 登录密码
	Password string `json:"password"`
	// OssURL init.sql地址
	OssURL string `json:"ossUrl"`
	// CreateDbs 要创建的数据库
	CreateDbs []string `json:"createDbs"`
}

MysqlExec mysql init相关

type NameValue

type NameValue struct {
	Name  string      `json:"name"`
	Value interface{} `json:"value"`
}

type NamespaceCreateRequest

type NamespaceCreateRequest struct {
	// 项目ID
	ProjectID int64 `json:"projectId"`

	// 该namespace下配置是否推送至远程配置中心
	Dynamic bool `json:"dynamic"`

	// namespace名称
	Name string `json:"name"`

	// 是否为default namespace
	IsDefault bool `json:"isDefault"`
}

NamespaceCreateRequest 配置中心 namespace 创建请求 Namespace接口文档: https://yuque.antfin-inc.com/terminus_paas_dev/middleware/gn9ezn

type NamespaceCreateResponse

type NamespaceCreateResponse struct {
	Header
}

NamespaceCreateResponse namespace响应

type NamespaceDeleteResponse

type NamespaceDeleteResponse struct {
	Header
}

NamespaceDeleteResponse namespace 删除响应

type NamespaceParam

type NamespaceParam struct {
	NamespaceName string `json:"namespace_name"`
	Decrypt       bool   `json:"decrypt"`
}

NamespaceParam namespace 参数信息

type NamespaceRelationCreateRequest

type NamespaceRelationCreateRequest struct {
	// dev/test/staging/prod四个环境namespace
	RelatedNamespaces []string `json:"relatedNamespaces"`

	// default namespace
	DefaultNamespace string `json:"defaultNamespace"`
}

NamespaceRelationCreateRequest namespace 关联关系创建请求

type NamespaceRelationCreateResponse

type NamespaceRelationCreateResponse struct {
	Header
}

NamespaceRelationCreateResponse namespace 关联关系创建响应

type NamespaceRelationDeleteResponse

type NamespaceRelationDeleteResponse struct {
	Header
}

NamespaceRelationDeleteResponse namespace 关联关系删除响应

type NetworkHookInfo

type NetworkHookInfo struct {
	Hook   string                 `json:"hook"`   // hook type
	Client string                 `json:"client"` // use network client
	Labels map[string]interface{} `json:"labels"` // additional information
}

type NewHealthCheck

type NewHealthCheck struct {
	HttpHealthCheck *HttpHealthCheck `json:"http,omitempty"`
	ExecHealthCheck *ExecHealthCheck `json:"exec,omitempty"`
}

暂定支持"HTTP" 和 "COMMAND"两种方式

type NexusDeploymentUserEnsureRequest

type NexusDeploymentUserEnsureRequest struct {
	RepoID   uint64
	Password string

	NexusServer            nexus.Server
	SyncConfigToPipelineCM NexusSyncConfigToPipelineCM
}

type NexusOrgReadonlyUserEnsureRequest

type NexusOrgReadonlyUserEnsureRequest struct {
	OrgID       uint64
	ClusterName string

	Name     string
	Password string
}

type NexusRepository

type NexusRepository struct {
	ID     uint64                 `json:"id"`
	Name   string                 `json:"name"`
	Format nexus.RepositoryFormat `json:"format"`
	URL    string                 `json:"url"`
	Type   nexus.RepositoryType   `json:"type"`

	OrgID       *uint64 `json:"orgID,omitempty"`
	PublisherID *uint64 `json:"publisherID,omitempty"`
	ClusterName string  `json:"clusterName,omitempty"`

	User *NexusUser `json:"user"`
}

type NexusRepositoryEnsureRequest

type NexusRepositoryEnsureRequest struct {
	OrgID       *uint64
	PublisherID *uint64
	ClusterName string

	NexusServer            nexus.Server
	NexusCreateRequest     nexus.RepositoryCreator
	SyncConfigToPipelineCM NexusSyncConfigToPipelineCM
}

type NexusRepositoryListRequest

type NexusRepositoryListRequest struct {
	IDs          []uint64                 `json:"ids"`
	PublisherID  *uint64                  `json:"publisherID"`
	OrgID        *uint64                  `json:"orgID"`
	Formats      []nexus.RepositoryFormat `json:"formats,omitempty"`
	Types        []nexus.RepositoryType   `json:"types,omitempty"`
	NameContains []string                 `json:"nameContains"`
}

type NexusSyncConfigToPipelineCM

type NexusSyncConfigToPipelineCM struct {
	SyncPublisher *NexusSyncConfigToPipelineCMItem
	SyncOrg       *NexusSyncConfigToPipelineCMItem
	SyncPlatform  *NexusSyncConfigToPipelineCMItem
}

type NexusSyncConfigToPipelineCMItem

type NexusSyncConfigToPipelineCMItem struct {
	ConfigPrefix string
}

type NexusUser

type NexusUser struct {
	ID          uint64  `json:"id,omitempty"`
	RepoID      *uint64 `json:"repoID,omitempty"`
	OrgID       *uint64 `json:"orgID,omitempty"`
	PublisherID *uint64 `json:"publisherID,omitempty"`
	Name        string  `json:"name"`
	Password    string  `json:"password"`
}

type NexusUserEnsureRequest

type NexusUserEnsureRequest struct {
	// ClusterName 属于哪个集群的 nexus
	// +required
	ClusterName string
	// RepoID 关联 repo 信息
	// +optional
	RepoID *uint64
	// OrgID 关联 org 信息
	// +optional
	OrgID *uint64

	// +required
	UserName string
	// +required
	Password string
	// +optional
	// 是否强制更新密码,ensure 场景一般需要保留原密码,因为原密码可能正在被打包使用中
	ForceUpdatePassword bool

	// RepoPrivileges 关联的 repo 权限
	// +optional
	RepoPrivileges map[uint64][]nexus.PrivilegeAction

	// +optional
	SyncConfigToPipelineCM NexusSyncConfigToPipelineCM

	NexusServer nexus.Server
}

type NexusUserGetResponse

type NexusUserGetResponse struct {
	Header
	Data *NexusUser `json:"data"`
}

type NexusUserListRequest

type NexusUserListRequest struct {
	UserIDs        []uint64 `json:"userIDs,omitempty"`
	PublisherID    *uint64  `json:"publisherID"`
	OrgID          *uint64  `json:"orgID"`
	RepoID         *uint64  `json:"repoID"`
	DecodePassword bool     `json:"decodePassword"`
}

type Node

type Node struct {
	IP   string `json:"ip"`
	Type string `json:"type"` // master, lb, app
	Tag  string `json:"tag"`
}

Node 节点配置

type NodePhase

type NodePhase string
const (
	NodePhaseInit      NodePhase = "init"
	NodePhasePlan      NodePhase = "plan"
	NodePhaseBuyNode   NodePhase = "buyNodes"
	NodePhaseAddNode   NodePhase = "addNodes"    //此状态只在添加机器时存在
	NodePhaseInstall   NodePhase = "diceInstall" //此状态只在创建安装集群时存在
	NodePhaseCompleted NodePhase = "completed"

	// delete ess instances
	NodePhaseEssInfo     NodePhase = "essInfo"
	NodePhaseRmNodes     NodePhase = "rmNodes"
	NodePhaseDeleteNodes NodePhase = "deleteNodes"
)

func (NodePhase) String

func (phase NodePhase) String() string

func (NodePhase) ToDesc

func (phase NodePhase) ToDesc() string

type NodeResourceInfo

type NodeResourceInfo struct {
	// only 'dice-' prefixed labels
	Labels []string `json:"labels"`
	// dcos, edas 缺少一些 label 或无法获取 label, 所以告诉上层忽略 labels
	IgnoreLabels bool `json:"ignoreLabels"`

	Ready bool `json:"ready"`

	CPUAllocatable float64 `json:"cpuAllocatable"`
	MemAllocatable int64   `json:"memAllocatable"`

	CPUReqsUsage float64 `json:"cpuRequestUsage"`
	MemReqsUsage int64   `json:"memRequestUsage"`

	CPULimitUsage float64 `json:"cpuLimitUsage"`
	MemLimitUsage int64   `json:"memLimitUsage"`
}

type NodeStatusData

type NodeStatusData struct {
	RecordID   uint64      `json:"recordID"`
	Conditions []Condition `json:"conditions"`
	LastPhase  NodePhase   `json:"lastPhase"`
	LastStatus PhaseStatus `json:"lastStatus"`
}

query node status response data

type NodeStatusRequest

type NodeStatusRequest struct {
	RecordID uint64 `query:"recordID"`
}

query node status request

type NodeStatusResponse

type NodeStatusResponse struct {
	Header
	Data NodeStatusData `json:"data"`
}

query node status response

type NodeType

type NodeType string
const (
	NodeTypeDir  NodeType = "d"
	NodeTypeFile NodeType = "f"
)

type Nodes

type Nodes []Node

Nodes 节点列表

type NodesRecordDetail

type NodesRecordDetail struct {
	Hosts       []string `json:"hosts"`
	InstanceIDs []string `json:"instanceIDs"`
}

type NoteBookList

type NoteBookList struct {
	ListMetadata
	NoteBookListSpec
}

type NoteBookListSpec

type NoteBookListSpec struct {
	Items []Notebook `json:"data"`
}

type Notebook

type Notebook struct {
	Metadata
	NotebookSpec
	NotebookStatus
}

type NotebookListResponse

type NotebookListResponse struct {
	Header
	Data NoteBookList `json:"data"`
}

type NotebookResponse

type NotebookResponse struct {
	Header
	Data Notebook `json:"data"`
}

type NotebookSpec

type NotebookSpec struct {
	Envs             []corev1.EnvVar `json:"envs"` // 环境变量
	ClusterName      string          `json:"clusterName"`
	ProjectName      string          `json:"projectName"`
	ApplicationName  string          `json:"applicationName"`
	DBEnvs           string          `json:"-"`
	Image            string          `json:"image"`
	RequirementEnvID uint64          `json:"requirementEnvID"`
	DataSourceID     uint64          `json:"datasourceID,omitempty"`
	GenericDomain    string          `json:"genericDomain,omitempty"`
	ClusterDomain    string          `json:"clusterDomain,omitempty"`
	ElfResource      `json:"resource"`
}

type NotebookStatus

type NotebookStatus struct {
	StartedAt time.Time `json:"startedAt"`
	State     string    `json:"state"`
}

type Notice

type Notice struct {
	ID        uint64       `json:"id"`
	OrgID     uint64       `json:"orgID"`
	Content   string       `json:"content"`
	Status    NoticeStatus `json:"status"`
	Creator   string       `json:"creator"`
	CreatedAt *time.Time   `json:"createdAt"`
	UpdateAt  *time.Time   `json:"updatedAt"`
}

Notice 平台公告

type NoticeCreateRequest

type NoticeCreateRequest struct {
	Content string `json:"content"`
	IdentityInfo
}

NoticeCreateRequest 公告创建请求

type NoticeCreateResponse

type NoticeCreateResponse struct {
	Header
	Data Notice `json:"data"`
}

NoticeCreateResponse 公告创建响应

type NoticeDeleteResponse

type NoticeDeleteResponse struct {
	Header
	Data Notice `json:"data"`
}

NoticeDeleteResponse 公告删除响应

type NoticeListRequest

type NoticeListRequest struct {
	// +required 后端赋值
	OrgID uint64
	// +optional
	Content string `schema:"content"`
	// +optional
	Status NoticeStatus `schema:"status"`
	// +optional
	PageNo uint64 `schema:"pageNo"`
	// +optional
	PageSize uint64 `schema:"pageSize"`

	IdentityInfo
}

NoticeListRequest 公告列表请求

type NoticeListResponse

type NoticeListResponse struct {
	Header
	UserInfoHeader
	Data NoticeListResponseData `json:"data"`
}

NoticeListResponse 公告列表响应

type NoticeListResponseData

type NoticeListResponseData struct {
	Total uint64   `json:"total"`
	List  []Notice `json:"list"`
}

NoticeListResponseData 公告列表响应数据

type NoticePublishResponse

type NoticePublishResponse struct {
	Header
	Data Notice `json:"data"`
}

NoticePublishResponse 公告删除响应

type NoticeStatus

type NoticeStatus string

NoticeStatus 平台公告状态

const (
	NoticeUnpublished NoticeStatus = "unpublished"
	NoticePublished   NoticeStatus = "published"
	NoticeDeprecated  NoticeStatus = "deprecated"
)

平台公告状态集

type NoticeUnPublishResponse

type NoticeUnPublishResponse struct {
	Header
	Data Notice `json:"data"`
}

NoticeUnPublishResponse 公告删除响应

type NoticeUpdateRequest

type NoticeUpdateRequest struct {
	Content string `json:"content"`

	ID uint64 `json:"-"`
}

NoticeUpdateRequest 公告更新请求

type NoticeUpdateResponse

type NoticeUpdateResponse struct {
	Header
	Data uint64 `json:"data"`
}

NoticeUpdateResponse 公告更新响应

type Notify

type Notify struct {
	Name      string    `json:"name"`
	ScopeType string    `json:"scopeType"`
	ScopeID   string    `json:"scopeID"`
	Channels  string    `json:"channels"`
	Enabled   bool      `json:"enabled"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

Notify 通知

type NotifyChannel

type NotifyChannel string

type NotifyConfigGetResponse

type NotifyConfigGetResponse struct {
	Header
	Data NotifyConfigUpdateRequestBody `json:"data"`
}

NotifyConfigUpdateRequestBody 通知配置更新请求Body

type NotifyConfigUpdateRequestBody

type NotifyConfigUpdateRequestBody struct {
	Config *OrgConfig `json:"config"`
}

NotifyConfigUpdateRequestBody 通知配置更新请求Body

type NotifyDetail

type NotifyDetail struct {
	ID            int64           `json:"id"`
	Name          string          `json:"name"`
	ScopeType     string          `json:"scopeType"`
	ScopeID       string          `json:"scopeId"`
	Channels      string          `json:"channels"`
	NotifyItems   []*NotifyItem   `json:"notifyItems"`
	NotifyGroup   *NotifyGroup    `json:"notifyGroup"`
	NotifySources []*NotifySource `json:"notifySources"`
	Enabled       bool            `json:"enabled"`
	Creator       string          `json:"creator"`
	CreatedAt     time.Time       `json:"createdAt"`
	UpdatedAt     time.Time       `json:"updatedAt"`
}

NotifyDetail 通知详情

type NotifyDetailResponse

type NotifyDetailResponse struct {
	Header
	Data DetailResponse `json:"data"`
}

type NotifyGroup

type NotifyGroup struct {
	ID        int64          `json:"id"`
	Name      string         `json:"name"`
	ScopeType string         `json:"scopeType,omitempty"`
	ScopeID   string         `json:"scopeId,omitempty"`
	Targets   []NotifyTarget `json:"targets"`
	CreatedAt time.Time      `json:"createdAt"`
	Creator   string         `json:"creator"`
}

NotifyGroup 通知组信息

type NotifyGroupDetail

type NotifyGroupDetail struct {
	ID                     int64          `json:"id"`
	Name                   string         `json:"name"`
	ScopeType              string         `json:"scopeType"`
	ScopeID                string         `json:"scopeId"`
	Users                  []NotifyUser   `json:"users"`
	Targets                []NotifyTarget `json:"targets"`
	DingdingList           []Target       `json:"dingdingList"`
	DingdingWorkNoticeList []Target       `json:"dingdingWorknoticeList"`
	WebHookList            []string       `json:"webhookList"`
}

NotifyGroupDetail 通知组详情信息

type NotifyHistory

type NotifyHistory struct {
	ID         int64  `json:"id"`
	NotifyName string `json:"notifyName"`
	// todo json key名需要cdp前端配合修改后再改
	NotifyItemDisplayName string         `json:"notifyItemName"`
	Channel               string         `json:"channel"`
	NotifyTargets         []NotifyTarget `json:"notifyTargets"`
	NotifySource          NotifySource   `json:"notifySource"`
	Status                string         `json:"status"`
	ErrorMsg              string         `json:"errorMsg"`
	Label                 string         `json:"label"`
	CreatedAt             time.Time      `json:"createdAt"`
}

NotifyHistory

type NotifyItem

type NotifyItem struct {
	ID               int64  `json:"id"`
	Name             string `json:"name"`
	DisplayName      string `json:"displayName"`
	Category         string `json:"category"`
	MarkdownTemplate string `json:"markdownTemplate"`
	EmailTemplate    string `json:"emailTemplate"`
	MobileTemplate   string `json:"mobileTemplate"`
	DingdingTemplate string `json:"dingdingTemplate"`
	MBoxTemplate     string `json:"mboxTemplate" gorm:"column:mbox_template"`
	// 语音通知模版
	VMSTemplate string `json:"vmsTemplate" gorm:"column:vms_template"`
	// 语音通知的被叫显号,语音模版属于公共号码池外呼的时候,被叫显号必须是空
	// 属于专属号码外呼的时候,被叫显号不能为空
	CalledShowNumber string `json:"calledShowNumber" gorm:"column:called_show_number"`
	ScopeType        string `json:"scopeType"`
	Label            string `json:"label"`
	Params           string `json:"params"`
}

NotifyItem 通知项

type NotifyLevel

type NotifyLevel string

type NotifyListBody

type NotifyListBody struct {
	List []DataItem `json:"list"`
}

type NotifyListResponse

type NotifyListResponse struct {
	Header
	Data NotifyListBody `json:"data"`
}

type NotifyPageRequest

type NotifyPageRequest struct {
	Scope   string `json:"scope"`
	ScopeId string `json:"scopeId"`
	UserId  string `json:"userId"`
	OrgId   string `json:"orgId"`
}

消息通知对接组件化

type NotifySource

type NotifySource struct {
	ID         int64       `json:"-"`
	Name       string      `json:"name"`
	SourceType string      `json:"sourceType"`
	SourceID   string      `json:"sourceId"`
	Params     interface{} `json:"params"`
}

type NotifyTarget

type NotifyTarget struct {
	Type   NotifyTargetType `json:"type"`
	Values []Target         `json:"values"`
}

NotifyTarget 通知目标

type NotifyTargetType

type NotifyTargetType string
const (
	RoleNotifyTarget               NotifyTargetType = "role"
	UserNotifyTarget               NotifyTargetType = "user"
	ExternalUserNotifyTarget       NotifyTargetType = "external_user"
	DingdingNotifyTarget           NotifyTargetType = "dingding"
	DingdingWorkNoticeNotifyTarget NotifyTargetType = "dingding_worknotice"
	WebhookNotifyTarget            NotifyTargetType = "webhook"
)

type NotifyUser

type NotifyUser struct {
	ID       string `json:"id"`
	Username string `json:"username"`
	Email    string `json:"email"`
	Mobile   string `json:"mobile"`
	Type     string `json:"type"` // inner external
}

type OfflineEdgeClusterData

type OfflineEdgeClusterData struct {
	RecordID uint64 `json:"recordID"`
}

type OfflineEdgeClusterRequest

type OfflineEdgeClusterRequest struct {
	OrgID       uint64 `json:"orgID"`
	ClusterName string `json:"clusterName"`
}

type OfflineEdgeClusterResponse

type OfflineEdgeClusterResponse struct {
	Header
	Data OfflineEdgeClusterData `json:"data"`
}

type OldNotifyTarget

type OldNotifyTarget struct {
	Type   NotifyTargetType `json:"type"`
	Values []string         `json:"values"`
}

OldNotifyTarget 兼容老版本通知组

func (*OldNotifyTarget) CovertToNewNotifyTarget

func (n *OldNotifyTarget) CovertToNewNotifyTarget() NotifyTarget

type OneDataAnalysisBussProcRequest

type OneDataAnalysisBussProcRequest struct {
	// 本地仓库文件绝对路径
	FilePath string `query:"filePath"`
}

type OneDataAnalysisBussProcResponse

type OneDataAnalysisBussProcResponse struct {
	Header
	Data BusinessProcessDTO `json:"data"`
}

type OneDataAnalysisBussProcsRequest

type OneDataAnalysisBussProcsRequest struct {
	// 模型远程仓库地址
	RemoteUri string `query:"remoteUri"`

	// 业务板块
	BusinessDomain string `query:"businessDomain"`

	// 数据域
	DataDomain string `query:"dataDomain"`

	// 搜索关键字
	KeyWord string `query:"keyWord"`

	// 行数
	PageSize uint32 `query:"pageSize"`

	// 页码
	PageNo uint32 `query:"pageNo"`
}

Request for API: `GET /api/analysis/businessProcesses`

type OneDataAnalysisBussProcsResponse

type OneDataAnalysisBussProcsResponse struct {
	Header
	Data BusinessProcessData `json:"data"`
}

type OneDataAnalysisDimRequest

type OneDataAnalysisDimRequest struct {
	// 本地仓库文件绝对路径
	FilePath string `query:"filePath"`
}

Request for API: `GET /api/analysis/dim`

type OneDataAnalysisDimResponse

type OneDataAnalysisDimResponse struct {
	Header
	Data DimDTO `json:"data"`
}

type OneDataAnalysisFuzzyAttrsRequest

type OneDataAnalysisFuzzyAttrsRequest struct {
	// 本地仓库文件绝对路径
	FilePath string `query:"filePath"`

	// 搜索关键字
	KeyWord string `query:"keyWord"`

	// 行数
	PageSize uint32 `query:"pageSize"`

	// 页码
	PageNo uint32 `query:"pageNo"`
}

Request for API: `GET /api/analysis/fuzzyAttrs`

type OneDataAnalysisFuzzyAttrsResponse

type OneDataAnalysisFuzzyAttrsResponse struct {
	Header
	Data AttrData `json:"data"`
}

type OneDataAnalysisOutputTablesRequest

type OneDataAnalysisOutputTablesRequest struct {
	// 模型远程仓库地址
	RemoteUri string `query:"remoteUri"`

	// 业务板块
	BusinessDomain string `query:"businessDomain"`

	// 集市域
	MarketDomain string `query:"marketDomain"`

	// 搜索关键字
	KeyWord string `query:"keyWord"`

	// 行数
	PageSize uint32 `query:"pageSize"`

	// 页码
	PageNo uint32 `query:"pageNo"`
}

Request for API: `GET /api/analysis/outputTables`

type OneDataAnalysisOutputTablesResponse

type OneDataAnalysisOutputTablesResponse struct {
	Header
	Data OutputTableData `json:"data"`
}

type OneDataAnalysisRequest

type OneDataAnalysisRequest struct {
	// 模型远程仓库地址
	RemoteUri string `query:"remoteUri"`
}

Request for API: `GET /api/analysis`

type OneDataAnalysisResponse

type OneDataAnalysisResponse struct {
	Header
	Data OneDataDTO `json:"data"`
}

type OneDataAnalysisStarRequest

type OneDataAnalysisStarRequest struct {
	// 本地仓库文件绝对路径
	FilePath string `query:"filePath"`
}

Request for API: `GET /api/analysis/star`

type OneDataAnalysisStarResponse

type OneDataAnalysisStarResponse struct {
	Header
	Data StarDTO `json:"data"`
}

type OneDataDTO

type OneDataDTO struct {
	BusinessDomain BusinessDomainDTO `json:"businessDomain"`
	DataDomains    []DataDomainDTO   `json:"dataDomains"`
	MarketDomains  []MarketDomainDTO `json:"marketDomains"`
}

type OnsEndpoints

type OnsEndpoints struct {
	// Tcp 协议客户端接入点
	TcpEndpoint string `json:"tcpEndpoint"`
	// Http 协议客户端接入点
	HttpInternalEndpoint       string `json:"httpInternalEndpoint"`
	HttpInternetEndpoint       string `json:"httpInternetEndpoint"`
	HttpInternetSecureEndpoint string `json:"httpInternetSecureEndpoint"`
}

type OnsTopic

type OnsTopic struct {
	// Topic 名称
	TopicName string `json:"topicName"`
	// 消息类型
	MessageType string `json:"messageType"`
	Relation    int    `json:"relation"`
	// 权限
	RelationName string `json:"relationName"`
	// 描述
	Remark     string            `json:"remark"`
	CreateTime string            `json:"createTime"`
	Tags       map[string]string `json:"tags"`
}

type OpLogsRequest

type OpLogsRequest struct {
	RecordID uint64        `query:"recordID"`
	TaskID   uint64        `query:"taskID"`
	Stream   string        `query:"stream"`
	Start    time.Duration `query:"start"`
	End      time.Duration `query:"end"`
	Count    int64         `query:"count"`
}

type OpLogsResponse

type OpLogsResponse DashboardSpotLogResponse

type OpenVPN

type OpenVPN struct {
	PeerSubnet string   `json:"peerSubnet,omitempty"`
	Subnets    []string `json:"subnets,omitempty"`
	ConfigOPVN string   `json:"configOPVN,omitempty"`
}

OpenVPN 平台 VPN 配置

type OpenapiDto

type OpenapiDto struct {
	ApiPath             string   `json:"apiPath"`
	RedirectType        string   `json:"redirectType"`
	RedirectAddr        string   `json:"redirectAddr"`
	RedirectPath        string   `json:"redirectPath"`
	RedirectApp         string   `json:"redirectApp"`
	RedirectService     string   `json:"redirectService"`
	RedirectRuntimeId   string   `json:"redirectRuntimeId"`
	RedirectRuntimeName string   `json:"redirectRuntimeName"`
	Method              string   `json:"method,omitempty"`
	AllowPassAuth       bool     `json:"allowPassAuth"`
	Description         string   `json:"description"`
	Hosts               []string `json:"hosts"`
}

type OpenapiInfoDto

type OpenapiInfoDto struct {
	ApiId       string `json:"apiId"`
	CreateAt    string `json:"createAt"`
	DiceApp     string `json:"diceApp"`
	DiceService string `json:"diceService"`
	Origin      string `json:"origin"`
	Mutable     bool   `json:"mutable"`
	OpenapiDto
}

type OpenapiOAuth2Token

type OpenapiOAuth2Token struct {
	AccessToken string `json:"access_token"`
	ExpiresIn   int64  `json:"expires_in"`
	Scope       string `json:"scope"`
	TokenType   string `json:"token_type"`
}

type OpenapiOAuth2TokenGetRequest

type OpenapiOAuth2TokenGetRequest struct {
	ClientID     string
	ClientSecret string
	Payload      OpenapiOAuth2TokenPayload `json:"payload"`
}

type OpenapiOAuth2TokenGetResponse

type OpenapiOAuth2TokenGetResponse OpenapiOAuth2Token

type OpenapiOAuth2TokenInvalidateRequest

type OpenapiOAuth2TokenInvalidateRequest struct {
	AccessToken string `json:"access_token"`
}

type OpenapiOAuth2TokenPayload

type OpenapiOAuth2TokenPayload struct {
	AccessTokenExpiredIn string            `json:"accessTokenExpiredIn"` // such as "300ms", "-1.5h" or "2h45m". "0" means it doesn't expire. Empty string is not allowed.
	AllowAccessAllAPIs   bool              `json:"allowAccessAllApIs,omitempty"`
	AccessibleAPIs       []AccessibleAPI   `json:"accessibleAPIs,omitempty"`
	Metadata             map[string]string `json:"metadata,omitempty"`
}

type OpenapiOauth2TokenInvalidateResponse

type OpenapiOauth2TokenInvalidateResponse OpenapiOAuth2Token

type Operation

type Operation struct {
	Key      string `json:"key"`
	Value    string `json:"value"`
	Reload   bool   `json:"reload"`
	FillMeta string `json:"fillMeta"`
}

type OperationKey

type OperationKey string
const (
	// 协议定义的操作
	// 用户通过URL初次访问
	InitializeOperation OperationKey = "__Initialize__"
	// 用于替换掉DefaultOperation,前端触发某组件,在协议Rending中定义了关联渲染组件,传递的事件是RendingOperation
	RenderingOperation OperationKey = "__Rendering__"
	// Action
	DefaultOperation          OperationKey = "default"
	ChangeOperation           OperationKey = "change"
	ClickOperation            OperationKey = "click"
	OnSearchOperation         OperationKey = "onSearch"
	OnChangeOperation         OperationKey = "onChange"
	OnLoadDataOperation       OperationKey = "onLoadData"
	OnSubmit                  OperationKey = "submit"
	OnCancel                  OperationKey = "cancel"
	OnChangePageNoOperation   OperationKey = "changePageNo"
	OnChangePageSizeOperation OperationKey = "changePageSize"
	// Issue
	MoveOutOperation        OperationKey = "MoveOut"
	DragOperation           OperationKey = "drag"
	MoveToOperation         OperationKey = "MoveTo"
	FilterOperation         OperationKey = "changeViewType"
	MoveToCustomOperation   OperationKey = "MoveToCustom"
	DragToCustomOperation   OperationKey = "DragToCustom"
	CreateCustomOperation   OperationKey = "CreateCustom"
	DeleteCustomOperation   OperationKey = "DeleteCustom"
	UpdateCustomOperation   OperationKey = "UpdateCustom"
	MoveToAssigneeOperation OperationKey = "MoveToAssignee"
	DragToAssigneeOperation OperationKey = "DragToAssignee"
	MoveToPriorityOperation OperationKey = "MoveToPriority"
	DragToPriorityOperation OperationKey = "DragToPriority"
	// filetree
	FileTreeSubmitOperationKey      OperationKey = "submit"
	FileTreeDeleteOperationKey      OperationKey = "delete"
	FileTreeAddDefaultOperationsKey OperationKey = "addDefault"
	// autotest space
	AutoTestSpaceCreateOperationKey         OperationKey = "addSpace"
	AutoTestSpaceUpdateOperationKey         OperationKey = "updateSpace"
	AutoTestSpaceDeleteOperationKey         OperationKey = "delete"
	AutoTestSpaceCopyOperationKey           OperationKey = "copy"
	AutoTestSpaceRetryOperationKey          OperationKey = "retry"
	AutoTestSpaceChangePageNoOperationKey   OperationKey = "changePageNo"
	AutoTestSpaceChangePageSizeOperationKey OperationKey = "changePageSize"
	AutoTestSpaceSubmitOperationKey         OperationKey = "submit"
	AutoTestSpaceClickRowOperationKey       OperationKey = "clickRow"
	// autotest scene
	AutoTestSceneListOperationKey OperationKey = "ListScene"
	// autotest scene input
	AutoTestSceneInputUpdateOperationKey   OperationKey = "save"
	AutoTestSceneInputOnSelectOperationKey OperationKey = "onSelectOption"
	// autotest scene output
	AutoTestSceneOutputUpdateOperationKey OperationKey = "save"
	// autotest scene step
	AutoTestSceneStepCreateOperationKey    OperationKey = "addParallelAPI"
	AutoTestSceneStepCopyOperationKey      OperationKey = "copyParallelAPI"
	AutoTestSceneStepMoveItemOperationKey  OperationKey = "moveItem"
	AutoTestSceneStepMoveGroupOperationKey OperationKey = "moveGroup"
	AutoTestSceneStepDeleteOperationKey    OperationKey = "deleteAPI"
	AutoTestSceneStepSplitOperationKey     OperationKey = "standalone"

	//auto-test scene set
	ListSceneSetOperationKey          OperationKey = "ListSceneSet"
	UpdateSceneSetOperationKey        OperationKey = "UpdateSceneSet"
	ClickSceneSetOperationKey         OperationKey = "ClickSceneSet"
	ClickSceneOperationKey            OperationKey = "ClickScene"
	ExpandSceneSetOperationKey        OperationKey = "ExpandSceneSet"
	AddSceneOperationKey              OperationKey = "AddScene"
	RefSceneSetOperationKey           OperationKey = "RefSceneSet"
	SubmitSceneOperationKey           OperationKey = "SubmitScene"
	UpdateSceneOperationKey           OperationKey = "UpdateScene"
	DeleteSceneOperationKey           OperationKey = "DeleteScene"
	DeleteSceneSetOperationKey        OperationKey = "DeleteSceneSet"
	ClickAddSceneSeButtonOperationKey OperationKey = "ClickAddSceneSet"
	DragSceneSetOperationKey          OperationKey = "DragSceneSet"
	CopySceneOperationKey             OperationKey = "CopyScene"

	// auto-test-plan-stage
	AutoTestPlanStageDeleteOperationKey OperationKey = "delete"

	// autotest folderDetail
	AutoTestFolderDetailDeleteOperationKey OperationKey = "delete"
	AutoTestFolderDetailCopyOperationKey   OperationKey = "copy"
	AutoTestFolderDetailEditOperationKey   OperationKey = "edit"
	AutoTestFolderDetailPageOperationKey   OperationKey = "changePageNo"
	AutoTestFolderDetailClickOperationKey  OperationKey = "clickRow"

	// auto-test scene execute
	ExecuteChangePageNoOperationKey OperationKey = "changePageNo"
	ExecuteClickRowNoOperationKey   OperationKey = "clickRow"
	ExecuteAddApiOperationKey       OperationKey = "addApi"
	ExecuteTaskBreadcrumbSelectItem OperationKey = "selectItem"

	//org-list
	FilterOrgsOperationKey         OperationKey = "filter"
	ChangeOrgsPageNoOperationKey   OperationKey = "changePageNo"
	ChangeOrgsPageSizeOperationKey OperationKey = "changePageSize"
	ExitOrgOperationKey            OperationKey = "exit"
	RedirectPublicOperationKey     OperationKey = "toPublicOrg"

	// list-project
	ListProjectToManageOperationKey   OperationKey = "toManage"
	ListProjectExistOperationKey      OperationKey = "exist"
	ListProjectFilterOperation        OperationKey = "filter"
	ApplyDeployProjectFilterOperation OperationKey = "applyDeploy"

	//notify_list
	NotifySubmit OperationKey = "submit"
	NotifyDelete OperationKey = "delete"
	NotifySwitch OperationKey = "switch"
	NotifyEdit   OperationKey = "edit"
)

func (OperationKey) String

func (o OperationKey) String() string

type OpsAddonStatusData

type OpsAddonStatusData struct {
	Status StatusCode `json:"status"`
}

type OpsAddonStatusQueryRequest

type OpsAddonStatusQueryRequest struct {
	AddonName string `query:"addonName"`
	AddonID   string `query:"addonID"`
}

addon status query status

type OpsAddonStatusResponse

type OpsAddonStatusResponse struct {
	Header
	Data OpsAddonStatusData `json:"data"`
}

addon status response

type OpsClusterInfoData

type OpsClusterInfoData []map[string]map[string]NameValue

group key value

type OpsClusterInfoRequest

type OpsClusterInfoRequest struct {
	ClusterName string `query:"clusterName"`
}

type OpsClusterInfoResponse

type OpsClusterInfoResponse struct {
	Header
	Data OpsClusterInfoData `json:"data"`
}

type OpsConfig

type OpsConfig struct {
	Status            string            `json:"status"` // creating, created, offline
	AccessKey         string            `json:"accessKey"`
	SecretKey         string            `json:"secretKey"`
	EcsPassword       string            `json:"ecsPassword"`
	AvailabilityZones string            `json:"availabilityZones"`
	VpcID             string            `json:"vpcID"`
	VSwitchIDs        string            `json:"vSwitchIDs"`
	SgIDs             string            `json:"sgIDs"`
	ChargeType        string            `json:"chargeType"`
	ChargePeriod      int               `json:"chargePeriod"`
	Region            string            `json:"region"`
	ScaleMode         string            `json:"scaleMode"`
	EssGroupID        string            `json:"essGroupID"`
	EssScaleRule      string            `json:"essScaleRule"`
	ScheduledTaskId   string            `json:"scheduledTaskId"`
	ScaleNumber       int               `json:"scaleNumber"`
	ScaleDuration     int               `json:"scaleDuration"`
	LaunchTime        string            `json:"launchTime"`
	RepeatMode        string            `json:"repeatMode"`
	RepeatValue       string            `json:"repeatValue"`
	ScalePipeLineID   uint64            `json:"scalePipeLineID"`
	Extra             map[string]string `json:"extra"`
}

OpsConfig 集群ops配置初始化

type OrgChangeRequest

type OrgChangeRequest struct {
	OrgID  uint64 `json:"orgId"`
	UserID string `json:"userId"`
}

OrgChangeRequest PUT /api/orgs/actions/change-current-org 切换用户组织请求结构

type OrgChangeResponse

type OrgChangeResponse struct {
	Header
	Data bool `json:"data"`
}

OrgChangeResponse PUT /api/orgs/actions/change-current-org 切换用户组织响应结构

type OrgClusterInfoBasicData

type OrgClusterInfoBasicData struct {
	ClusterName      string `json:"clusterName"`
	OrgID            uint64 `json:"orgID"`
	OrgName          string `json:"orgName"`
	OrgDisplayName   string `json:"orgDisplayName"`
	ClusterType      string `json:"clusterType"`
	Version          string `json:"version"`
	CreateTime       string `json:"createTime"`
	IsCentralCluster bool   `json:"isCentralCluster"`
}

type OrgClusterInfoData

type OrgClusterInfoData struct {
	Total int                       `json:"total"`
	List  []OrgClusterInfoBasicData `json:"list"`
}

type OrgClusterInfoRequest

type OrgClusterInfoRequest struct {
	PageNo      int    `query:"pageNo"`
	PageSize    int    `query:"pageSize"`
	OrgName     string `query:"orgName"`
	ClusterType string `query:"clusterType"`
}

type OrgClusterInfoResponse

type OrgClusterInfoResponse struct {
	Header
	Data OrgClusterInfoData `json:"data"`
}

type OrgClusterRelationCreateRequest

type OrgClusterRelationCreateRequest struct {
	OrgID       uint64
	OrgName     string
	ClusterName string
}

OrgClusterRelationCreateRequest 企业集群关联关系创建请求

type OrgClusterRelationDTO

type OrgClusterRelationDTO struct {
	ID          uint64    `json:"id"`
	OrgID       uint64    `json:"orgId"`
	OrgName     string    `json:"orgName"`
	ClusterID   uint64    `json:"clusterId"`
	ClusterName string    `json:"clusterName"`
	Creator     string    `json:"creator"`
	CreatedAt   time.Time `json:"createdAt"`
	UpdatedAt   time.Time `json:"updatedAt"`
}

OrgClusterRelationDTO 企业对应集群关系结构

type OrgConfig

type OrgConfig struct {
	EnableMS                   bool   `json:"enableMS"`
	SMTPHost                   string `json:"smtpHost"`
	SMTPUser                   string `json:"smtpUser"`
	SMTPPassword               string `json:"smtpPassword"`
	SMTPPort                   int64  `json:"smtpPort"`
	SMTPIsSSL                  bool   `json:"smtpIsSSL"`
	SMSKeyID                   string `json:"smsKeyID"`
	SMSKeySecret               string `json:"smsKeySecret"`
	SMSSignName                string `json:"smsSignName"`
	SMSMonitorTemplateCode     string `json:"smsMonitorTemplateCode"` // 监控单独的短信模版
	VMSKeyID                   string `json:"vmsKeyID"`
	VMSKeySecret               string `json:"vmsKeySecret"`
	VMSMonitorTtsCode          string `json:"vmsMonitorTtsCode"`          // 监控单独的语音模版
	VMSMonitorCalledShowNumber string `json:"vmsMonitorCalledShowNumber"` // 监控单独的被叫显号
	AuditInterval              uint64 `json:"auditInterval"`
}

type OrgCreateRequest

type OrgCreateRequest struct {
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`
	Desc        string `json:"desc"`
	Locale      string `json:"locale"`
	// 创建组织时作为admin的用户id列表
	Admins []string `json:"admins"` // TODO 改为企业owner,只有一个

	// 发布商名称
	PublisherName string `json:"publisherName"`
}

OrgCreateRequest POST /api/orgs 创建组织请求结构

type OrgCreateResponse

type OrgCreateResponse struct {
	Header
	Data OrgDTO `json:"data"`
}

OrgCreateResponse POST /api/orgs 创建组织响应结构

type OrgDTO

type OrgDTO struct {
	ID          uint64     `json:"id"`
	Creator     string     `json:"creator"`
	Desc        string     `json:"desc"`
	Name        string     `json:"name"`
	DisplayName string     `json:"displayName"`
	Locale      string     `json:"locale"`
	Config      *OrgConfig `json:"config"`
	IsPublic    bool       `json:"isPublic"`

	BlockoutConfig BlockoutConfig `json:"blockoutConfig"`

	// 开关:制品是否允许跨集群部署
	EnableReleaseCrossCluster bool `json:"enableReleaseCrossCluster"`

	// 用户是否选中当前企业
	Selected bool `json:"selected"`

	// 操作者id
	Operation string `json:"operation"`

	// 组织状态
	Status string `json:"status"`
	Type   string `json:"type"`

	// 发布商 ID
	PublisherID int64 `json:"publisherId"`

	// 企业域名
	Domain    string    `json:"domain"`
	OpenFdp   bool      `json:"openFdp"`
	Version   int       `json:"version"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

OrgDTO 组织结构

func (*OrgDTO) HidePassword

func (org *OrgDTO) HidePassword()

type OrgFetchRequest

type OrgFetchRequest struct {
	IDOrName string `path:"idOrName"`
}

OrgFetchRequest GET /api/orgs/<orgId> 组织详情请求结构

type OrgFetchResponse

type OrgFetchResponse struct {
	Header
	Data OrgDTO `json:"data"`
}

OrgFetchResponse GET /api/orgs/<orgId> 组织详情响应结构

type OrgGenVerfiCodeResponse

type OrgGenVerfiCodeResponse struct {
	Header
	Data map[string]string `json:"data,omitempty"`
}

OrgGenVerfiCodeResponse 生成企业邀请码返回

type OrgGetByDomainRequest

type OrgGetByDomainRequest struct {
	Domain  string `query:"domain"`
	OrgName string `query:"orgName"`
}

OrgGetByDomainRequest

type OrgGetByDomainResponse

type OrgGetByDomainResponse struct {
	Header
	Data *OrgDTO `json:"data"`
}

OrgGetByDomainResponse

type OrgInviteCodeRedisKeyPrefix

type OrgInviteCodeRedisKeyPrefix string

OrgInviteCodeRedisKeyPrefix 企业邀请成员验证码 redis key 前缀

const OrgInviteCodeRedisKey OrgInviteCodeRedisKeyPrefix = "cmdb:org:verificode:"

func (OrgInviteCodeRedisKeyPrefix) GetKey

func (oc OrgInviteCodeRedisKeyPrefix) GetKey(day int, userID, orgID string) string

GetKey 企业邀请成员验证码完整 redis key

type OrgNexusGetRequest

type OrgNexusGetRequest struct {
	// +optional
	Formats []nexus.RepositoryFormat `json:"formats,omitempty"`
	// +optional
	Types []nexus.RepositoryType `json:"types,omitempty"`
}

type OrgNexusGetResponse

type OrgNexusGetResponse struct {
	Header
	Data *OrgNexusGetResponseData `json:"data,omitempty"`
}

type OrgNexusGetResponseData

type OrgNexusGetResponseData struct {
	OrgGroupRepos         map[nexus.RepositoryFormat]*NexusRepository   `json:"orgGroupRepos,omitempty"`
	OrgSnapshotRepos      map[nexus.RepositoryFormat]*NexusRepository   `json:"orgSnapshotRepos,omitempty"`
	PublisherReleaseRepos map[nexus.RepositoryFormat]*NexusRepository   `json:"publisherReleaseRepos,omitempty"`
	ThirdPartyProxyRepos  map[nexus.RepositoryFormat][]*NexusRepository `json:"thirdPartyProxyRepos,omitempty"`
}

type OrgNexusShowPasswordRequest

type OrgNexusShowPasswordRequest struct {
	OrgID        uint64   `json:"orgID,omitempty"`
	NexusUserIDs []uint64 `json:"nexusUserIDs,omitempty"`
}

type OrgNexusShowPasswordResponse

type OrgNexusShowPasswordResponse struct {
	Header
	Data map[uint64]string `json:"data,omitempty"`
}

type OrgResourceInfo

type OrgResourceInfo struct {
	// 单位: c
	TotalCpu float64 `json:"totalCpu"`
	// 单位: GB
	TotalMem     float64 `json:"totalMem"`
	AvailableCpu float64 `json:"availableCpu"`
	AvailableMem float64 `json:"availableMem"`
}

OrgResourceInfo 企业资源统计

type OrgRunningTasks

type OrgRunningTasks struct {
	OrgID           uint64    `json:"orgID"`
	ProjectID       uint64    `json:"projectID"`
	ApplicationID   uint64    `json:"applicationID"`
	PipelineID      uint64    `json:"pipelineID"`
	TaskID          uint64    `json:"taskID"`
	QueueTimeSec    int64     `json:"queueTimeSec"` // 排队耗时
	CostTimeSec     int64     `json:"costTimeSec"`  // 任务耗时
	ProjectName     string    `json:"projectName"`
	ApplicationName string    `json:"applicationName"`
	TaskName        string    `json:"taskName"`
	Status          string    `json:"status"`
	Env             string    `json:"env"`
	ClusterName     string    `json:"clusterName"`
	TaskType        string    `json:"taskType"`
	UserID          string    `json:"userID"`
	CreatedAt       time.Time `json:"createdAt"`
	RuntimeID       string    `json:"runtimeID"`
	ReleaseID       string    `json:"releaseID"`
}

OrgRunningTasks 获取指定企业job或者deployment数据

type OrgRunningTasksData

type OrgRunningTasksData struct {
	Total int64             `json:"total"`
	Tasks []OrgRunningTasks `json:"tasks"`
}

OrgRunningTasksData 获取指定企业job或者deployment响应数据

type OrgRunningTasksListRequest

type OrgRunningTasksListRequest struct {
	// 集群名称参数,选填
	Cluster string `query:"cluster"`

	// 项目名称,选填
	ProjectName string `query:"projectName"`

	// 应用名称,选填
	AppName string `query:"appName"`

	// pipeline ID,选填
	PipelineID uint64 `query:"pipelineID"`

	// 状态,选填
	Status string `query:"status"`

	// 创建人,选填
	UserID string `query:"userID"`

	// 环境,选填
	Env string `query:"env"`

	// task类型参数: job或者deployment, 选填
	Type string `query:"type"`

	// 起始时间戳(ms),选填
	StartTime int64 `query:"startTime"`

	// 截止时间戳(ms),选填 默认为当前时间
	EndTime int64 `query:"endTime"`

	// 页号, 默认值:1
	PageNo int `query:"pageNo,omitempty"`

	// 分页大小, 默认值20
	PageSize int `query:"pageSize,omitempty"`
}

OrgRunningTasksListRequest 获取指定企业job或者deployment请求

type OrgRunningTasksListResponse

type OrgRunningTasksListResponse struct {
	Header
	Data OrgRunningTasksData `json:"data"`
}

OrgRunningTasksListResponse 获取指定企业job或者deployment响应

type OrgSearchRequest

type OrgSearchRequest struct {
	// 用此对组织名进行模糊查询
	Q string `query:"q"`

	// 分页参数
	PageNo   int `query:"pageNo"`
	PageSize int `query:"pageSize"`

	IdentityInfo
}

OrgSearchRequest GET /api/orgs 组织查询请求结构

type OrgSearchResponse

type OrgSearchResponse struct {
	Header
	Data PagingOrgDTO `json:"data"`
}

OrgSearchResponse GET /api/orgs 组织查询响应结构

type OrgUpdateRequest

type OrgUpdateRequest struct {
	OrgID int                  `json:"-" path:"orgId"`
	Body  OrgUpdateRequestBody `json:"body"`
}

OrgUpdateRequest PUT /api/orgs/<orgId> 更新组织请求结构

type OrgUpdateRequestBody

type OrgUpdateRequestBody struct {
	Name           string          `json:"name"`
	DisplayName    string          `json:"displayName"`
	Desc           string          `json:"desc"`
	Locale         string          `json:"locale"`
	ID             uint64          `json:"id"`
	PublisherName  string          `json:"publisherName"`
	Config         *OrgConfig      `json:"config"`
	BlockoutConfig *BlockoutConfig `json:"blockoutConfig"`
	IsPublic       bool            `json:"isPublic"`
}

OrgUpdateRequestBody 组织更新请求Body

type OrgUpdateResponse

type OrgUpdateResponse struct {
	Header
	Data bool `json:"data"`
}

OrgUpdateResponse PUT /api/orgs/<orgId> 更新组织响应结构

type OssBucketInfo

type OssBucketInfo struct {
	AddonID string `json:"addonID"`
	Name    string `json:"name"`
	Acl     string `json:"acl"` //public-read-write、public-read、private
}

type OutputTableDTO

type OutputTableDTO struct {
	ExtBaseParam
}

type OutputTableData

type OutputTableData struct {
	// contains filtered or unexported fields
}

type Overview

type Overview struct {
	CPU   float64 `json:"cpu"`
	Mem   float64 `json:"mem"` // 单位: G
	Nodes int     `json:"nodes"`
}

Overview addon 资源统计

type Package

type Package struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

type PackageDto

type PackageDto struct {
	Name             string   `json:"name"`
	BindDomain       []string `json:"bindDomain"`
	AuthType         string   `json:"authType"`
	AclType          string   `json:"aclType"`
	Scene            string   `json:"scene"`
	Description      string   `json:"description"`
	NeedBindCloudapi bool     `json:"needBindCloudapi"`
}

type PackageInfoDto

type PackageInfoDto struct {
	Id       string `json:"id"`
	CreateAt string `json:"createAt"`
	PackageDto
}

type PageInfo

type PageInfo struct {
	// 页码
	PageNO int `query:"pageNo"`

	// 每页大小
	PageSize int `query:"pageSize"`
}

func (PageInfo) GetLimit

func (p PageInfo) GetLimit() int

func (PageInfo) GetOffset

func (p PageInfo) GetOffset() int

type PagePipeline

type PagePipeline struct {
	ID           uint64            `json:"id"`
	CronID       *uint64           `json:"cronID,omitempty"`
	Commit       string            `json:"commit,omitempty"`
	Source       PipelineSource    `json:"source,omitempty"`
	YmlName      string            `json:"ymlName,omitempty"`
	Extra        PipelineExtra     `json:"extra,omitempty"`
	FilterLabels map[string]string `json:"filterLabels"`
	NormalLabels map[string]string `json:"normalLabels"`

	// 运行时相关信息
	Type        string         `json:"type,omitempty"`
	TriggerMode string         `json:"triggerMode,omitempty"`
	ClusterName string         `json:"clusterName,omitempty"`
	Status      PipelineStatus `json:"status,omitempty"`
	Progress    float64        `json:"progress"` // pipeline 执行进度, eg: 0.8 即 80%

	// 嵌套流水线相关信息
	IsSnippet        bool    `json:"isSnippet"`
	ParentPipelineID *uint64 `json:"parentPipelineID,omitempty"`
	ParentTaskID     *uint64 `json:"parentTaskID,omitempty"`

	// 时间
	CostTimeSec int64      `json:"costTimeSec,omitempty"` // pipeline 总耗时/秒
	TimeBegin   *time.Time `json:"timeBegin,omitempty"`   // 执行开始时间
	TimeEnd     *time.Time `json:"timeEnd,omitempty"`     // 执行结束时间
	TimeCreated *time.Time `json:"timeCreated,omitempty"` // 记录创建时间
	TimeUpdated *time.Time `json:"timeUpdated,omitempty"` // 记录更新时间
}

PagePipeline 用于 流水线分页查询结果,相比 PipelineDTO 删除了许多大字段

type PagingAPIAssetVersionQueryParams

type PagingAPIAssetVersionQueryParams struct {
	Paging   bool   `json:"paging" schema:"paging"`
	PageNo   uint64 `json:"pageNo" schema:"pageNo"`
	PageSize uint64 `json:"pageSize" schema:"pageSize"`
	Major    *int   `json:"major" schema:"major"`
	Minor    *int   `json:"minor" schema:"minor"`
	Spec     bool   `json:"spec" schema:"spec"`
}

type PagingAPIAssetVersionResponse

type PagingAPIAssetVersionResponse struct {
	OrgID   uint64                         `json:"orgID"`
	AssetID string                         `json:"assetID"`
	Total   uint64                         `json:"total"`
	List    []*PagingAPIAssetVersionRspObj `json:"list"`
}

type PagingAPIAssetVersionRspObj

type PagingAPIAssetVersionRspObj struct {
	Version    *APIAssetVersionsModel     `json:"version"`
	Spec       *APIAssetVersionSpecsModel `json:"spec"`
	Permission map[string]bool            `json:"permission"`
}

type PagingAPIAssetVersionURIParams

type PagingAPIAssetVersionURIParams struct {
	AssetID string
}

type PagingAPIAssetVersionsReq

type PagingAPIAssetVersionsReq struct {
	OrgID    uint64
	Identity *IdentityInfo

	URIParams   *PagingAPIAssetVersionURIParams
	QueryParams *PagingAPIAssetVersionQueryParams
}

type PagingAPIAssetsQueryParams

type PagingAPIAssetsQueryParams struct {
	Paging        bool   `json:"paging" schema:"paging"`               // 是否分页查询
	PageNo        int    `json:"pageNo" schema:"pageNo"`               // 页码
	PageSize      int    `json:"pageSize" schema:"pageSize"`           // 每页数量
	Keyword       string `json:"keyword" schema:"keyword"`             // 搜索关键字
	Scope         string `json:"scope" schema:"scope"`                 // 查询范围: mine, all (如果不是 mine, 就当做 all 处理)
	HasProject    bool   `json:"hasProject" schema:"hasProject"`       // 是否关联了项目
	LatestVersion bool   `json:"latestVersion" schema:"latestVersion"` // 返回结果中是否需要带上最新版本信息
	LatestSpec    bool   `json:"latestSpec" schema:"latestSpec"`       // 返回结果中是否需要带上最新的 Spec 文本
	Instantiation bool   `json:"instantiation"`                        // 返回结果是否要求已经实例化了
}

type PagingAPIAssetsReq

type PagingAPIAssetsReq struct {
	OrgID       uint64
	Identity    *IdentityInfo
	QueryParams *PagingAPIAssetsQueryParams
}

type PagingAppCertificateDTO

type PagingAppCertificateDTO struct {
	Total int                         `json:"total"`
	List  []ApplicationCertificateDTO `json:"list"`
}

PagingAppCertificateDTO 查询应用证书响应Body

type PagingApproveDTO

type PagingApproveDTO struct {
	Total int          `json:"total"`
	List  []ApproveDTO `json:"list"`
}

PagingApproveDTO 查询审批列表响应Body

type PagingAssetRspObj

type PagingAssetRspObj struct {
	Asset         *APIAssetsModel            `json:"asset"`
	LatestVersion *APIAssetVersionsModel     `json:"latestVersion,omitempty"`
	LatestSpec    *APIAssetVersionSpecsModel `json:"latestSpec,omitempty"`
	Permission    map[string]bool            `json:"permission"`
}

type PagingCertificateDTO

type PagingCertificateDTO struct {
	Total int              `json:"total"`
	List  []CertificateDTO `json:"list"`
}

PagingCertificateDTO 查询证书响应Body

type PagingOrgDTO

type PagingOrgDTO struct {
	List  []OrgDTO `json:"list"`
	Total int      `json:"total"`
}

PagingOrgDTO 组织查询响应Body

type PagingProjectDTO

type PagingProjectDTO struct {
	Total int          `json:"total"`
	List  []ProjectDTO `json:"list"`
}

PagingProjectDTO 查询项目响应Body

type PagingPublisherDTO

type PagingPublisherDTO struct {
	Total int            `json:"total"`
	List  []PublisherDTO `json:"list"`
}

PagingPublisherDTO 查询Publisher响应Body

type Parameter

type Parameter struct {
	// 参数名
	Name string `json:"name" yaml:"name"`

	Description     string `json:"description" yaml:"description"`
	AllowEmptyValue bool   `json:"allowEmptyValue" yaml:"allowEmptyValue"`
	AllowReserved   bool   `json:"allowReserved" yaml:"allowReserved"`
	Deprecated      bool   `json:"deprecated" yaml:"deprecated"`
	Required        bool   `json:"required" yaml:"required"`

	Type    string        `json:"type" yaml:"type"`
	Enum    []interface{} `json:"enum" yaml:"enum"`
	Default interface{}   `json:"default" yaml:"default"`
	Example interface{}   `json:"example" yaml:"example"`
}

type Percentage

type Percentage struct {
	Name  string  `json:"name"`
	Value float32 `json:"value"`
}

type PermissionCheckRequest

type PermissionCheckRequest struct {
	UserID string `json:"userID"`
	// Scope 可选值: org/project/app
	Scope ScopeType `json:"scope"`
	// ScopeID scope具体值
	ScopeID uint64 `json:"scopeID"`
	// Resource 资源类型, eg: ticket/release
	Resource string `json:"resource"`
	// Action Create/Update/Delete/
	Action string `json:"action"`
	// resource 角色: Creator, Assignee
	ResourceRole string `json:"resourceRole"`
}

PermissionCheckRequest 鉴权请求

type PermissionCheckResponse

type PermissionCheckResponse struct {
	Header
	Data PermissionCheckResponseData `json:"data"`
}

PermissionCheckResponse 鉴权响应

type PermissionCheckResponseData

type PermissionCheckResponseData struct {
	Access bool `json:"access"`
}

PermissionCheckResponseData 鉴权响应数据

type PermissionList

type PermissionList struct {
	Access           bool            `json:"access"`
	Roles            []string        `json:"roles"`
	PermissionList   []ScopeResource `json:"permissionList"`
	ResourceRoleList []ScopeResource `json:"resourceRoleList"`

	// 当项目/应用被删除时,鉴权为false,用于告诉前端是被删除了
	Exist bool `json:"exist"`

	// 无权限(access=false)时,该字段返回联系人 ID 列表,例如无应用权限时,返回应用管理员列表
	ContactsWhenNoPermission []string `json:"contactsWhenNoPermission,omitempty"`
}

PermissionList Scope 对应的权限列表

type PermissionListResponse

type PermissionListResponse struct {
	Header
	Data PermissionList `json:"data"`
}

PermissionListResponse 权限列表响应信息

type PersistentVolume

type PersistentVolume struct {
	Type        string     `json:"type,omitempty"`
	Size        int        `json:"size,omitempty"`
	MaxSize     int        `json:"maxSize,omitempty"`
	Constraints [][]string `json:"constraints,omitempty"`
}

type PhaseStatus

type PhaseStatus string
const (
	PhaseStatusRunning PhaseStatus = "Running"
	PhaseStatusFailed  PhaseStatus = "Failed"
	PhaseStatusSuccess PhaseStatus = "Success"
	PhaseStatusWaiting PhaseStatus = "Waiting"
)

type PipelineAppAllValidBranchWorkspaceResponse

type PipelineAppAllValidBranchWorkspaceResponse struct {
	Header
	Data []ValidBranch `json:"data"`
}

type PipelineAppInvokedBranchesResponse

type PipelineAppInvokedBranchesResponse struct {
	Header
	Data []string `json:"data"`
}

type PipelineAppliedResource

type PipelineAppliedResource struct {
	CPU      float64 `json:"cpu"`
	MemoryMB float64 `json:"memoryMB"`
}

PipelineAppliedResource represents one kind of applied resources.

type PipelineAppliedResources

type PipelineAppliedResources struct {

	// Limits is the minimal enough resource to run pipeline
	// calculate minResource
	// 1 2 (2)
	// 2 3 (3)
	// 4   (4)
	// => max(1,2,2,3,4) = 4
	Limits PipelineAppliedResource `json:"limits"`

	// Requests is the minimal resource to run pipeline
	// calculate maxResource
	// 1 2 (3)
	// 2 3 (5)
	// 4   (4)
	// => max((1+2), (2+3), (4)) = 5
	Requests PipelineAppliedResource `json:"requests"`
}

PipelineAppliedResources represents multi-kind applied resources.

type PipelineBasicReport

type PipelineBasicReport struct {
	PipelineSource   PipelineSource `json:"pipelineSource"`
	PipelineYmlName  string         `json:"pipelineYmlName"`
	ClusterName      string         `json:"clusterName"`
	TimeCreated      *time.Time     `json:"timeCreated,omitempty"`
	TimeBegin        *time.Time     `json:"timeBegin,omitempty"`
	TimeEnd          *time.Time     `json:"timeEnd,omitempty"`
	TotalCostTimeSec int64          `json:"totalCostTimeSec"`

	TaskInfos []TaskReportInfo `json:"taskInfos,omitempty"`
}

type PipelineBatchCreateRequest

type PipelineBatchCreateRequest struct {
	AppID                 uint64         `json:"appID"`
	Branch                string         `json:"branch"`
	Source                PipelineSource `json:"source"`
	BatchPipelineYmlPaths []string       `json:"batchPipelineYmlPaths"`
	AutoRun               bool           `json:"autoRun"`
	CallbackURLs          []string       `json:"callbackURLs"`

	UserID string `json:"userID"`
}

type PipelineBatchCreateResponse

type PipelineBatchCreateResponse struct {
	Header
	Data map[string]PipelineDTO `json:"data"`
}

type PipelineButton

type PipelineButton struct {
	// 手动开始
	CanManualRun bool `json:"canManualRun"`

	// 取消
	CanCancel      bool `json:"canCancel"`
	CanForceCancel bool `json:"canForceCancel"`

	// 重试
	CanRerun       bool `json:"canRerun"`
	CanRerunFailed bool `json:"canRerunFailed"`

	// 定时
	CanStartCron bool `json:"canStartCron"`
	CanStopCron  bool `json:"canStopCron"`

	// TODO 暂停
	CanPause   bool `json:"canPause"`
	CanUnpause bool `json:"canUnpause"`

	// 删除
	CanDelete bool `json:"canDelete"`
}

type PipelineCallbackRequest

type PipelineCallbackRequest struct {
	Type string `json:"type"`
	Data []byte `json:"data"`
}

type PipelineCallbackResponse

type PipelineCallbackResponse struct {
	Header
}

type PipelineCallbackType

type PipelineCallbackType string
var (
	PipelineCallbackTypeOfAction PipelineCallbackType = "ACTION"
)

type PipelineCancelRequest

type PipelineCancelRequest struct {
	PipelineID uint64 `json:"pipelineID"`
	IdentityInfo
}

pipeline cancel

type PipelineCancelResponse

type PipelineCancelResponse struct {
	Header
}

type PipelineCmsConfig

type PipelineCmsConfig struct {
	Key string `json:"key"`
	PipelineCmsConfigValue
}

PipelineCmsConfig 配置项

type PipelineCmsConfigKey

type PipelineCmsConfigKey struct {
	Key                string `json:"key"`
	Decrypt            bool   `json:"decrypt"`
	ShowEncryptedValue bool   `json:"showEncryptedValue"` // 是否展示加密后的值
}

type PipelineCmsConfigOperations

type PipelineCmsConfigOperations struct {
	CanDownload bool `json:"canDownload"`
	CanEdit     bool `json:"canEdit"`
	CanDelete   bool `json:"canDelete"` // CanDelete 仅在删除单个配置项时生效。若删除 ns,则所有配置项均会被删除
}

PipelineCmsConfigOperations 配置项操作

type PipelineCmsConfigType

type PipelineCmsConfigType string

PipelineCmsConfigType 配置项类型

var (
	// kv 无需特殊处理
	PipelineCmsConfigTypeKV PipelineCmsConfigType = "kv"

	// dice-file 类型,config value 为 diceFileUUID
	// pipeline 上下文会特殊处理
	PipelineCmsConfigTypeDiceFile PipelineCmsConfigType = "dice-file"
)

func (PipelineCmsConfigType) Valid

func (t PipelineCmsConfigType) Valid() bool

type PipelineCmsConfigValue

type PipelineCmsConfigValue struct {
	// Value
	// 更新时,Value 为 realValue
	// 获取时,若 Decrypt=true,Value=decrypt(dbValue);若 Decrypt=false,Value=dbValue
	Value string `json:"value"`
	// EncryptInDB 在数据库中是否加密存储
	EncryptInDB bool `json:"encryptInDB"`
	// Type
	// if not specified, default type is `kv`;
	// if type is `dice-file`, value is uuid of `dice-file`.
	Type PipelineCmsConfigType `json:"type"`
	// Operations 配置项操作,若为 nil,则使用默认配置: canDownload=false, canEdit=true, canDelete=true
	Operations *PipelineCmsConfigOperations `json:"operations"`
	// Comment
	Comment string `json:"comment"`
	// From 配置项来源,可为空。例如:证书管理同步
	From string `json:"from"`

	// 创建或更新时以下字段无需填写
	TimeCreated *time.Time `json:"timeCreated"`
	TimeUpdated *time.Time `json:"timeUpdated"`
}

PipelineCmsConfigValue 配置项的值

type PipelineCmsCreateNsRequest

type PipelineCmsCreateNsRequest struct {
	PipelineSource PipelineSource `json:"pipelineSource"`
	NS             string         `json:"ns"`
}

PipelineCmsCreateNsRequest 创建 pipeline 配置管理 namespace 请求体.

type PipelineCmsCreateNsResponse

type PipelineCmsCreateNsResponse struct {
	Header
}

PipelineCmsCreateNsResponse 创建 pipeline 配置管理 namespace 返回体.

type PipelineCmsDeleteConfigsRequest

type PipelineCmsDeleteConfigsRequest struct {
	PipelineSource PipelineSource
	DeleteNS       bool     `json:"deleteNS"`
	DeleteForce    bool     `json:"deleteForce"`
	DeleteKeys     []string `json:"deleteKeys"`
}

PipelineCmsDeleteConfigsRequest 删除 pipeline 配置管理 配置 请求体.

type PipelineCmsDeleteConfigsResponse

type PipelineCmsDeleteConfigsResponse struct {
	Header
}

PipelineCmsDeleteConfigsResponse 删除 pipeline 配置管理 配置 返回体.

type PipelineCmsGetConfigsRequest

type PipelineCmsGetConfigsRequest struct {
	PipelineSource PipelineSource         `json:"pipelineSource"`
	Keys           []PipelineCmsConfigKey `json:"keys"`          // 只获取指定的 key
	GlobalDecrypt  bool                   `json:"globalDecrypt"` // 全局指定是否解密,优先级低于 keys 中每个 key 的解密配置
}

PipelineCmsGetConfigsRequest 查询 pipeline 配置管理 配置 请求体.

type PipelineCmsGetConfigsResponse

type PipelineCmsGetConfigsResponse struct {
	Header
	Data []PipelineCmsConfig `json:"data"`
}

PipelineCmsGetConfigsResponse 查询 pipeline 配置管理 配置 请求体.

type PipelineCmsListNsRequest

type PipelineCmsListNsRequest struct {
	PipelineSource PipelineSource `json:"pipelineSource"`
	NsPrefix       string         `json:"nsPrefix"`
}

PipelineCmsListNsRequest 列表查询 pipeline 配置管理 namespace 请求体.

type PipelineCmsListNsResponse

type PipelineCmsListNsResponse struct {
	Header
	Data []PipelineCmsNs `json:"data,omitempty"`
}

type PipelineCmsNs

type PipelineCmsNs struct {
	PipelineSource PipelineSource `json:"pipelineSource"`
	NS             string         `json:"ns"`
	TimeCreated    *time.Time     `json:"timeCreated"`
	TimeUpdated    *time.Time     `json:"timeUpdated"`
}

type PipelineCmsUpdateConfigsRequest

type PipelineCmsUpdateConfigsRequest struct {
	PipelineSource PipelineSource                    `json:"pipelineSource"`
	KVs            map[string]PipelineCmsConfigValue `json:"kvs"`
}

PipelineCmsUpdateConfigsRequest 更新 pipeline 配置管理 配置 请求体. 可选是否加密存储.

type PipelineCmsUpdateConfigsRequestV1

type PipelineCmsUpdateConfigsRequestV1 struct {
	KVs map[string]string `json:"kvs"`
}

PipelineCmsUpdateConfigsRequestV1 更新 pipeline 配置管理 配置 请求体. 不加密存储.

type PipelineCmsUpdateConfigsResponse

type PipelineCmsUpdateConfigsResponse struct {
	Header
}

PipelineCmsUpdateConfigsResponse 更新 pipeline 配置管理 配置 返回体.

type PipelineConfigNamespaceItem

type PipelineConfigNamespaceItem struct {
	ID          string `json:"id"` // default | branchPrefix
	Namespace   string `json:"namespace"`
	Workspace   string `json:"workspace"`
	Branch      string `json:"branch"`
	IsOldConfig bool   `json:"isOldConfig"`
}

type PipelineConfigNamespaceResponseData

type PipelineConfigNamespaceResponseData struct {
	Namespaces []PipelineConfigNamespaceItem `json:"namespaces"`
}

type PipelineConfigNamespacesFetchResponse

type PipelineConfigNamespacesFetchResponse struct {
	Header
	Data *PipelineConfigNamespaceResponseData `json:"data"`
}

type PipelineCreateRequest

type PipelineCreateRequest struct {
	AppID              uint64            `json:"appID"`
	Branch             string            `json:"branch"`
	Source             PipelineSource    `json:"source"`
	PipelineYmlSource  PipelineYmlSource `json:"pipelineYmlSource"`
	PipelineYmlName    string            `json:"pipelineYmlName"` // 与 pipelineYmlContent 匹配,如果为空,则为 pipeline.yml
	PipelineYmlContent string            `json:"pipelineYmlContent"`
	AutoRun            bool              `json:"autoRun"`
	CallbackURLs       []string          `json:"callbackURLs"`

	UserID          string `json:"userID"`
	IsCronTriggered bool   `json:"isCronTriggered"`
}

type PipelineCreateRequestV2

type PipelineCreateRequestV2 struct {
	// PipelineYml is pipeline yaml content.
	// +required
	PipelineYml string `json:"pipelineYml"`

	// ClusterName represents the cluster the pipeline will be executed.
	// +required
	ClusterName string `json:"clusterName"`

	// PipelineYmlName
	// Equal to `Name`.
	// Default is `pipeline.yml`.
	// +optional
	PipelineYmlName string `json:"pipelineYmlName"`

	// PipelineSource represents the source where pipeline created from.
	// Equal to `Namespace`.
	// +required
	PipelineSource PipelineSource `json:"pipelineSource"`

	// Labels is Map of string keys and values, can be used to filter pipeline.
	// If label key or value is too long, it will be moved to NormalLabels automatically and overwrite value if key already exists in NormalLabels.
	// +optional
	Labels map[string]string `json:"labels"`

	// NormalLabels is Map of string keys and values, cannot be used to filter pipeline.
	// +optional
	NormalLabels map[string]string `json:"normalLabels"`

	// Envs is Map of string keys and values.
	// +optional
	Envs map[string]string `json:"envs"`

	// ConfigManageNamespaces pipeline fetch configs from cms by namespaces in order.
	// Pipeline won't generate default ns.
	// +optional
	ConfigManageNamespaces []string `json:"configManageNamespaces"`

	// AutoRun represents whether auto run the created pipeline.
	// Default is false.
	// +optional
	// Deprecated, please use `AutoRunAtOnce` or `AutoStartCron`.
	// Alias for AutoRunAtOnce.
	AutoRun bool `json:"autoRun"`

	// ForceRun represents stop other running pipelines to run.
	// Default is false.
	// +optional
	ForceRun bool `json:"forceRun"`

	// AutoRunAtOnce alias for `AutoRun`.
	// AutoRunAtOnce represents whether auto run the created pipeline.
	// Default is false.
	// +optional
	AutoRunAtOnce bool `json:"autoRunAtOnce"`

	// AutoStartCron represents whether auto start cron.
	// If a pipeline doesn't have `cron` field, ignore.
	// Default is false.
	// +optional
	AutoStartCron bool `json:"autoStartCron"`

	// CronStartFrom specify time when to start
	// +optional
	CronStartFrom *time.Time `json:"cronStartFrom"`

	// GC represents pipeline gc configs.
	// If config is empty, will use default config.
	// +optional
	GC PipelineGC `json:"gc,omitempty"`

	// RunPipelineParams represents pipeline params runtime input
	// if pipeline have params runPipelineParams can not be empty
	// +optional
	RunParams PipelineRunParams `json:"runParams"`

	// BindQueue represents the queue pipeline binds, internal use only, parsed from Labels: LabelBindPipelineQueueID
	BindQueue *PipelineQueue `json:"-"`

	IdentityInfo
}

PipelineCreateRequestV2 used to create pipeline via pipeline V2 API.

type PipelineCreateResponse

type PipelineCreateResponse struct {
	Header
	Data *PipelineDTO `json:"data"`
}

type PipelineCronCreateRequest

type PipelineCronCreateRequest struct {
	PipelineCreateRequest PipelineCreateRequestV2 `json:"pipelineCreateRequest"`
}

type PipelineCronCreateResponse

type PipelineCronCreateResponse struct {
	Header
	Data uint64 `json:"data"` // cronID
}

type PipelineCronDTO

type PipelineCronDTO struct {
	ID          uint64    `json:"id"`
	TimeCreated time.Time `json:"timeCreated"` // 记录创建时间
	TimeUpdated time.Time `json:"timeUpdated"` // 记录更新时间

	ApplicationID   uint64     `json:"applicationID"`
	Branch          string     `json:"branch"`
	CronExpr        string     `json:"cronExpr"`
	CronStartTime   *time.Time `json:"cronStartTime"`
	PipelineYmlName string     `json:"pipelineYmlName"` // 一个分支下可以有多个 pipeline 文件,每个分支可以有单独的 cron 逻辑
	BasePipelineID  uint64     `json:"basePipelineID"`  // 用于记录最开始创建出这条 cron 记录的 pipeline id
	Enable          *bool      `json:"enable"`          // 1 true, 0 false
}

type PipelineCronDeleteResponse

type PipelineCronDeleteResponse struct {
	Header
}

type PipelineCronGetResponse

type PipelineCronGetResponse struct {
	Header
	Data *PipelineCronDTO `json:"data"`
}

type PipelineCronListResponse

type PipelineCronListResponse struct {
	Header
	Data []PipelineCronDTO `json:"data"`
}

type PipelineCronPagingRequest

type PipelineCronPagingRequest struct {
	AllSources bool
	Sources    []PipelineSource `schema:"source"`  // ?source=cdp-dev&source=cdp-test
	YmlNames   []string         `schema:"ymlName"` // ?ymlName=11&ymlName=22

	PageSize int
	PageNo   int
}

type PipelineCronPagingResponse

type PipelineCronPagingResponse struct {
	Header
	Data *PipelineCronPagingResponseData `json:"data"`
}

type PipelineCronPagingResponseData

type PipelineCronPagingResponseData struct {
	Total int64              `json:"total"`
	Data  []*PipelineCronDTO `json:"data,omitempty"`
}

type PipelineCronStartResponse

type PipelineCronStartResponse struct {
	Header
	Data *PipelineCronDTO `json:"data"`
}

type PipelineCronStopResponse

type PipelineCronStopResponse struct {
	Header
	Data *PipelineCronDTO `json:"data"`
}

type PipelineDBGCItem

type PipelineDBGCItem struct {
	// NeedArchive means whether this record need be archived:
	// If true, archive record to specific archive table;
	// If false, delete record and cannot be found anymore.
	NeedArchive *bool `json:"needArchive,omitempty"`
	// TTLSecond means when to do archive or delete operation.
	TTLSecond *uint64 `json:"ttlSecond,omitempty"`
}

PipelineDBGCItem archives or deletes database record to ease db pressure.

type PipelineDTO

type PipelineDTO struct {
	// 应用相关信息
	ID              uint64  `json:"id,omitempty"`
	CronID          *uint64 `json:"cronID,omitempty"`
	OrgID           uint64  `json:"orgID,omitempty"`
	OrgName         string  `json:"orgName,omitempty"`
	ProjectID       uint64  `json:"projectID,omitempty"`
	ProjectName     string  `json:"projectName,omitempty"`
	ApplicationID   uint64  `json:"applicationID,omitempty"`
	ApplicationName string  `json:"applicationName,omitempty"`

	// 分支相关信息
	Branch       string            `json:"branch,omitempty"`
	Commit       string            `json:"commit,omitempty"`
	CommitDetail CommitDetail      `json:"commitDetail,omitempty" xorm:"json"`
	Labels       map[string]string `json:"labels,omitempty"`

	// pipeline.yml 相关信息
	Source     PipelineSource `json:"source,omitempty"`
	YmlSource  string         `json:"ymlSource,omitempty"` // yml 文件来源
	YmlName    string         `json:"ymlName,omitempty"`   // yml 文件名
	YmlNameV1  string         `json:"ymlNameV1,omitempty"`
	YmlContent string         `json:"ymlContent,omitempty"` // yml 文件内容
	Extra      PipelineExtra  `json:"extra,omitempty" xorm:"json"`

	// 运行时相关信息
	Namespace   string         `json:"namespace"`
	Type        string         `json:"type,omitempty"`
	TriggerMode string         `json:"triggerMode,omitempty"`
	ClusterName string         `json:"clusterName,omitempty"`
	Status      PipelineStatus `json:"status,omitempty"`
	Progress    float64        `json:"progress"` // pipeline 执行进度, eg: 0.8 即 80%

	// 时间
	CostTimeSec int64      `json:"costTimeSec,omitempty"`                // pipeline 总耗时/秒
	TimeBegin   *time.Time `json:"timeBegin,omitempty"`                  // 执行开始时间
	TimeEnd     *time.Time `json:"timeEnd,omitempty"`                    // 执行结束时间
	TimeCreated *time.Time `json:"timeCreated,omitempty" xorm:"created"` // 记录创建时间
	TimeUpdated *time.Time `json:"timeUpdated,omitempty" xorm:"updated"` // 记录更新时间
}

type PipelineDatabaseGC

type PipelineDatabaseGC struct {
	// Analyzed contains gc strategy to analyzed pipeline.
	Analyzed PipelineDBGCItem `json:"analyzed,omitempty"`
	// Finished contains gc strategy to finished(success/failed) pipeline.
	Finished PipelineDBGCItem `json:"finished,omitempty"`
}

PipelineDatabaseGC represents database record gc strategy.

type PipelineDeleteResponse

type PipelineDeleteResponse struct {
	Header
}

type PipelineDetailDTO

type PipelineDetailDTO struct {
	PipelineDTO
	PipelineStages        []PipelineStageDetailDTO `json:"pipelineStages"`
	PipelineSnippetStages []PipelineStageDetailDTO `json:"pipelineSnippetStages"`
	PipelineCron          *PipelineCronDTO         `json:"pipelineCron"`

	// 按钮
	PipelineButton PipelineButton `json:"pipelineButton"`
	// task 的 action 详情
	PipelineTaskActionDetails map[string]PipelineTaskActionDetail `json:"pipelineTaskActionDetails"`

	RunParams []PipelineParamDTO `json:"runParams"`

	Events []*PipelineEvent `json:"events,omitempty"`
}

PipelineDetailDTO contains pipeline, stages, tasks and others

type PipelineDetailResponse

type PipelineDetailResponse struct {
	Header
	Data *PipelineDetailDTO `json:"data"`
}

type PipelineEvent

type PipelineEvent struct {
	// Optional; this should be a short, machine understandable string that gives the reason
	// for this event being generated. For example, if the event is reporting that a container
	// can't start, the Reason might be "ImageNotFound".
	// +optional
	Reason string `json:"reason,omitempty"`

	// Optional. A human-readable description of the status of this operation.
	// +optional
	Message string `json:"message,omitempty"`

	// Optional. The component reporting this event. Should be a short machine understandable string.
	// +optional
	Source PipelineEventSource `json:"source,omitempty"`

	// The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)
	// +optional
	FirstTimestamp time.Time `json:"firstTimestamp,omitempty"`

	// The time at which the most recent occurrence of this event was recorded.
	// +optional
	LastTimestamp time.Time `json:"lastTimestamp,omitempty"`

	// The number of times this event has occurred.
	// +optional
	Count int32 `json:"count,omitempty"`

	// Type of this event (Normal, Warning), new types could be added in the future.
	// +optional
	Type string `json:"type,omitempty"`
}

PipelineEvent is k8s-event-like stream event.

type PipelineEventSource

type PipelineEventSource struct {
	// Component from which the event is generated.
	// +optional
	Component string `json:"component,omitempty"`

	// Node name on which the event is generated.
	// +optional
	Host string `json:"host,omitempty"`
}

PipelineEventSource represents the source from which an event is generated

type PipelineExecuteRecord

type PipelineExecuteRecord struct {
	PipelineID  uint64     `json:"pipelineID"`
	Status      string     `json:"status"`
	TriggerMode string     `json:"triggerMode"`
	TimeCreated time.Time  `json:"timeCreated"`
	TimeBegin   *time.Time `json:"timeBegin"`
	TimeEnd     *time.Time `json:"timeEnd"`
}

type PipelineExtra

type PipelineExtra struct {
	DiceWorkspace          string        `json:"diceWorkspace,omitempty"`
	PipelineYmlNameV1      string        `json:"pipelineYmlNameV1,omitempty"`
	SubmitUser             *PipelineUser `json:"submitUser,omitempty"`
	RunUser                *PipelineUser `json:"runUser,omitempty"`
	CancelUser             *PipelineUser `json:"cancelUser,omitempty"`
	CronExpr               string        `json:"cronExpr,omitempty"`
	CronTriggerTime        *time.Time    `json:"cronTriggerTime,omitempty"` // 秒级精确,毫秒级误差请忽略,cron expr 精确度同样为秒级
	ShowMessage            *ShowMessage  `json:"showMessage,omitempty"`
	ConfigManageNamespaces []string      `json:"configmanageNamespaces,omitempty"`

	IsAutoRun bool `json:"isAutoRun,omitempty"` // 创建后是否自动开始执行

	CallbackURLs []string `json:"callbackURLs,omitempty"`
}

type PipelineGC

type PipelineGC struct {
	ResourceGC PipelineResourceGC `json:"resourceGC,omitempty"`
	DatabaseGC PipelineDatabaseGC `json:"databaseGC,omitempty"`
}

PipelineGC

type PipelineGCDBOption

type PipelineGCDBOption struct {
	NeedArchive bool `json:"needArchive"`
}

type PipelineGCInfo

type PipelineGCInfo struct {
	CreatedAt time.Time `json:"createdAt,omitempty"`
	GCAt      time.Time `json:"gcAt,omitempty"`
	TTL       uint64    `json:"ttl,omitempty"`
	LeaseID   string    `json:"leaseID,omitempty"`
	Data      []byte    `json:"data,omitempty"`
}

func MakePipelineGCInfo

func MakePipelineGCInfo(ttl uint64, leaseID string, data []byte) PipelineGCInfo

type PipelineGetBranchRuleResponse

type PipelineGetBranchRuleResponse struct {
	Header
	Data *ValidBranch `json:"data"`
}

type PipelineInstanceEvent

type PipelineInstanceEvent struct {
	EventHeader
	Content PipelineInstanceEventData `json:"content"`
}

PipelineInstanceEvent 流水线状态变化时发送的事件 event: pipeline action: status 见 internal/pipeline/spec/pipeline_status.go#Status

type PipelineInstanceEventData

type PipelineInstanceEventData struct {
	PipelineID      uint64     `json:"pipelineID"`
	Status          string     `json:"status"`
	Branch          string     `json:"branch"`
	Source          string     `json:"source"`          // 来源,dice / qa / bigdata ...
	IsCron          bool       `json:"isCron"`          // 是否是定时触发
	PipelineYmlName string     `json:"pipelineYmlName"` // pipeline yml 文件名
	UserID          string     `json:"userID"`
	InternalClient  string     `json:"internalClient"` // 非用户触发,内部客户端身份
	CostTimeSec     int64      `json:"costTimeSec"`    // 流水线执行耗时
	DiceWorkspace   string     `json:"diceWorkspace"`
	ClusterName     string     `json:"clusterName"`
	TimeBegin       *time.Time `json:"timeBegin"`
	CronExpr        string     `json:"cronExpr"`

	Labels map[string]string `json:"labels"`
}

type PipelineInvokedCombo

type PipelineInvokedCombo struct {
	Branch         string   `json:"branch"`
	Source         string   `json:"source"`
	YmlName        string   `json:"ymlName"`
	PagingYmlNames []string `json:"pagingYmlNames"` // 拿到 combo 后,调用分页接口时,ymlNames 可指定多个

	// 其他前端展示需要的字段
	PipelineID  uint64        `json:"pipelineID"`
	Commit      string        `json:"commit"`
	Status      string        `json:"status"`
	TimeCreated *time.Time    `json:"timeCreated"`
	CancelUser  *PipelineUser `json:"cancelUser,omitempty"` // TODO 需要前端重构后,再只返回 UserID
	TriggerMode string        `json:"triggerMode"`
	Workspace   string        `json:"workspace"`
}

type PipelineInvokedComboRequest

type PipelineInvokedComboRequest struct {
	// app id
	AppID uint64 `query:"appID"`

	// comma-separated value, such as: develop,master
	Branches string `query:"branches"`

	// comma-separated value, such as: dice,bigdata
	Sources string `query:"sources"`

	// comma-separated value, such as: pipeline.yml,path1/path2/demo.workflow
	YmlNames string `query:"ymlNames"`
}

type PipelineInvokedComboResponse

type PipelineInvokedComboResponse struct {
	Header
	Data []PipelineInvokedCombo `json:"data"`
}

type PipelineLabelType

type PipelineLabelType string

PipelineLabelType defines the type of pipeline label.

var (
	PipelineLabelTypeInstance PipelineLabelType = "p_i"   // pipeline instance
	PipelineLabelTypeQueue    PipelineLabelType = "queue" // queue
)

func (PipelineLabelType) String

func (t PipelineLabelType) String() string

func (PipelineLabelType) Valid

func (t PipelineLabelType) Valid() bool

type PipelineLifecycleHookClient

type PipelineLifecycleHookClient struct {
	ID     uint64 `json:"id"`
	Name   string `json:"name"`
	Host   string `json:"host"`
	Prefix string `json:"prefix"`
}

type PipelineOperateRequest

type PipelineOperateRequest struct {
	TaskOperates []PipelineTaskOperateRequest `json:"taskOperates,omitempty"`
}

type PipelineOperateResponse

type PipelineOperateResponse struct {
	Header
}

type PipelineOutput

type PipelineOutput struct {
	Name string `json:"name" yaml:"name,omitempty"` // 名称
	Desc string `json:"desc" yaml:"desc,omitempty"` // 描述
	Ref  string `json:"ref" yaml:"ref,omitempty"`   // 引用那个 action 的值
}

func (*PipelineOutput) Check

func (output *PipelineOutput) Check() error

type PipelineOutputWithValue

type PipelineOutputWithValue struct {
	PipelineOutput
	Value interface{} `json:"value,omitempty"` // 具体的值
}

type PipelinePageListData

type PipelinePageListData struct {
	Pipelines       []PagePipeline `json:"pipelines,omitempty"`
	Total           int64          `json:"total"`
	CurrentPageSize int64          `json:"currentPageSize"`
}

type PipelinePageListRequest

type PipelinePageListRequest struct {
	// Deprecated, use schema `branch`
	CommaBranches string `schema:"branches"`
	// Deprecated, use schema `source`
	CommaSources string `schema:"sources"`
	// Deprecated, use schema `ymlName`
	CommaYmlNames string `schema:"ymlNames"`
	// Deprecated, use schema `status`
	CommaStatuses string `schema:"statuses"`

	// Deprecated, use mustMatchLabels, key=appID
	AppID uint64 `schema:"appID"`
	// Deprecated, use mustMatchLabels, key=branch
	Branches []string `schema:"branch"`

	Sources      []PipelineSource      `schema:"source"`
	AllSources   bool                  `schema:"allSources"`
	YmlNames     []string              `schema:"ymlName"`
	Statuses     []string              `schema:"status"`
	NotStatuses  []string              `schema:"notStatus"`
	TriggerModes []PipelineTriggerMode `schema:"triggerMode"`
	ClusterNames []string              `schema:"clusterName"`

	// IncludeSnippet 是否展示嵌套流水线,默认不展示。
	// 嵌套流水线一般来说只需要在详情中展示即可。
	IncludeSnippet bool `schema:"includeSnippet"`

	// 开始执行时间 左闭区间
	StartTimeBegin time.Time `schema:"-"`
	// http GET query param 请赋值该字段
	StartTimeBeginTimestamp int64 `schema:"startTimeBeginTimestamp"`
	// Deprecated, use `StartedAtTimestamp`.
	// format: 2006-01-02T15:04:05, TZ: CST
	StartTimeBeginCST string `schema:"startedAt"`

	// 开始执行时间 右闭区间
	EndTimeBegin time.Time `schema:"-"`
	// http GET query param 请赋值该字段
	EndTimeBeginTimestamp int64 `schema:"endTimeBeginTimestamp"`
	// Deprecated, use `StartedAtTimestamp`.
	// format: 2006-01-02T15:04:05, TZ: CST
	EndTimeBeginCST string `schema:"endedAt"`

	// 创建时间 左闭区间
	StartTimeCreated time.Time `schema:"-"`
	// http GET query param 请赋值该字段
	StartTimeCreatedTimestamp int64 `schema:"startTimeCreatedTimestamp"`

	// 创建时间 右闭区间
	EndTimeCreated time.Time `schema:"-"`
	// http GET query param 请赋值该字段
	EndTimeCreatedTimestamp int64 `schema:"endTimeCreatedTimestamp"`

	// Deprecated
	// 供 CDP 工作流明细查询使用,JSON(map[string]string)
	MustMatchLabelsJSON string `schema:"mustMatchLabels"`
	// ?mustMatchLabel=key1=value1
	// &mustMatchLabel=key1=value2
	// &mustMatchLabel=key2=value3
	MustMatchLabelsQueryParams []string `schema:"mustMatchLabel"`
	// 直接构造对象 请赋值该字段
	MustMatchLabels map[string][]string `schema:"-"`

	// Deprecated
	// 供 CDP 工作流明细查询使用,JSON(map[string]string)
	AnyMatchLabelsJSON string `schema:"anyMatchLabels"`
	// ?anyMatchLabel=key1=value1
	// &anyMatchLabel=key1=value2
	// &anyMatchLabel=key2=value3
	AnyMatchLabelsQueryParams []string `schema:"anyMatchLabel"`
	// 直接构造对象 请赋值该字段
	AnyMatchLabels map[string][]string `schema:"-"`

	PageNum       int  `schema:"pageNum"`
	PageSize      int  `schema:"pageSize"`
	LargePageSize bool `schema:"largePageSize"` // 允许 pageSize 超过默认值(100),由内部调用方保证数据量大小

	CountOnly bool `schema:"countOnly"` // 是否只获取 total

	// internal use
	SelectCols []string `schema:"-" ` // 需要赋值的字段列表,若不声明,则全赋值
	AscCols    []string `schema:"-"`
	DescCols   []string `schema:"-"`
}

func (*PipelinePageListRequest) PostHandleQueryString

func (req *PipelinePageListRequest) PostHandleQueryString() error

func (*PipelinePageListRequest) UrlQueryString

func (req *PipelinePageListRequest) UrlQueryString() map[string][]string

UrlQueryString 不兼容 deprecated 字段

type PipelinePageListResponse

type PipelinePageListResponse struct {
	Header
	Data *PipelinePageListData `json:"data"`
}

type PipelineParam

type PipelineParam struct {
	Name     string      `json:"name" yaml:"name,omitempty"`         // 名称
	Required bool        `json:"required" yaml:"required,omitempty"` // 是否必须
	Default  interface{} `json:"default" yaml:"default,omitempty"`   // 默认值
	Desc     string      `json:"desc" yaml:"desc,omitempty"`         // 描述
	Type     string      `json:"type" yaml:"type,omitempty"`         // 类型
}

func (*PipelineParam) Check

func (params *PipelineParam) Check() error

type PipelineParamDTO

type PipelineParamDTO struct {
	PipelineParam
	Value interface{} `json:"value,omitempty"`
}

type PipelineQueue

type PipelineQueue struct {
	ID uint64 `json:"id"`

	Name             string                              `json:"name"`
	PipelineSource   PipelineSource                      `json:"pipelineSource"`
	ClusterName      string                              `json:"clusterName"`
	ScheduleStrategy ScheduleStrategyInsidePipelineQueue `json:"scheduleStrategy"`
	Mode             PipelineQueueMode                   `json:"mode,omitempty"`
	Priority         int64                               `json:"priority"`
	Concurrency      int64                               `json:"concurrency"`
	MaxCPU           float64                             `json:"maxCPU"`
	MaxMemoryMB      float64                             `json:"maxMemoryMB"`

	Labels map[string]string `json:"labels,omitempty"`

	TimeCreated *time.Time `json:"timeCreated,omitempty"`
	TimeUpdated *time.Time `json:"timeUpdated,omitempty"`

	Usage *pb.QueueUsage `json:"usage"`
}

type PipelineQueueCreateRequest

type PipelineQueueCreateRequest struct {

	// Name is the queue name.
	// +required
	Name string `json:"name,omitempty"`

	// PipelineSource group queues by source.
	// +required
	PipelineSource PipelineSource `json:"pipelineSource,omitempty"`

	// ClusterName represents which cluster this queue belongs to.
	// +required
	ClusterName string `json:"clusterName,omitempty"`

	// ScheduleStrategy defines schedule strategy.
	// If not present, will use default strategy.
	// +optional
	ScheduleStrategy ScheduleStrategyInsidePipelineQueue `json:"scheduleStrategy,omitempty"`

	// Mode defines queue mode.
	// If not present, will use default mode.
	// +optional
	Mode PipelineQueueMode `json:"mode,omitempty"`

	// Priority defines item default priority inside queues.
	// Higher number means higher priority.
	// If not present, will use default priority.
	// +optional
	Priority int64 `json:"priority,omitempty"`

	// Concurrency defines how many item can running at the same time.
	// If not present, will use default concurrency.
	// +optional
	Concurrency int64 `json:"concurrency,omitempty"`

	// MaxCPU is the cpu resource this queue holds.
	// +optional
	MaxCPU float64 `json:"maxCPU,omitempty"`

	// MaxMemoryMB is the memory resource this queue holds.
	// +optional
	MaxMemoryMB float64 `json:"maxMemoryMB,omitempty"`

	// Labels contains the other infos for this queue.
	// Labels can be used to query and filter queues.
	// +optional
	Labels map[string]string `json:"labels,omitempty"`

	IdentityInfo
}

PipelineQueueCreateRequest represents queue create request.

func (*PipelineQueueCreateRequest) Validate

func (req *PipelineQueueCreateRequest) Validate() error

Validate validate and handle request.

type PipelineQueueMode

type PipelineQueueMode string
var (
	PipelineQueueModeStrict PipelineQueueMode = "STRICT"
	PipelineQueueModeLoose  PipelineQueueMode = "LOOSE"
)

func (PipelineQueueMode) IsValid

func (m PipelineQueueMode) IsValid() bool

func (PipelineQueueMode) String

func (m PipelineQueueMode) String() string

type PipelineQueuePagingData

type PipelineQueuePagingData struct {
	Queues []*PipelineQueue `json:"queues"`
	Total  int64            `json:"total"`
}

PipelineQueuePagingData .

type PipelineQueuePagingRequest

type PipelineQueuePagingRequest struct {
	Name string `schema:"name"`

	PipelineSources []PipelineSource `schema:"pipelineSource"`

	ClusterName string `schema:"clusterName"`

	ScheduleStrategy ScheduleStrategyInsidePipelineQueue `schema:"scheduleStrategy"`

	Priority int64 `schema:"priority"`

	Concurrency int64 `schema:"concurrency"`

	// MUST match
	MustMatchLabels []string `schema:"mustMatchLabel"`
	// ANY match
	AnyMatchLabels []string `schema:"anyMatchLabel"`

	// AllowNoPipelineSources, default is false.
	// 默认查询必须带上 pipeline source,增加区分度
	AllowNoPipelineSources bool `schema:"allowNoPipelineSources"`

	// OrderByTargetIDAsc 根据 target_id 升序,默认为 false,即降序
	OrderByTargetIDAsc bool `schema:"orderByTargetIDAsc"`

	PageNo   int `schema:"pageNo"`
	PageSize int `schema:"pageSize"`
}

PipelineQueuePagingRequest

type PipelineQueueUpdateRequest

type PipelineQueueUpdateRequest struct {
	ID uint64 `json:"-"` // get from path variable

	// create request include all fields can be updated
	PipelineQueueCreateRequest
}

PipelineQueueUpdateRequest .

func (*PipelineQueueUpdateRequest) Validate

func (req *PipelineQueueUpdateRequest) Validate() error

Validate request.

type PipelineQueueValidateResult

type PipelineQueueValidateResult struct {
	Success     bool                      `json:"success"`
	Reason      string                    `json:"reason"`
	RetryOption *QueueValidateRetryOption `json:"retryOption"`
}

PipelineQueueValidateResult represents queue validate result.

func (PipelineQueueValidateResult) IsFailed

func (r PipelineQueueValidateResult) IsFailed() bool

func (PipelineQueueValidateResult) IsSuccess

func (r PipelineQueueValidateResult) IsSuccess() bool

type PipelineReport

type PipelineReport struct {
	ID         uint64             `json:"id"`
	PipelineID uint64             `json:"pipelineID"`
	Type       PipelineReportType `json:"type"`
	Meta       PipelineReportMeta `json:"meta"`
	CreatorID  string             `json:"creatorID"`
	UpdaterID  string             `json:"updaterID"`
	CreatedAt  time.Time          `json:"createdAt"`
	UpdatedAt  time.Time          `json:"updatedAt"`
}

PipelineReport 流水线报告

type PipelineReportCreateRequest

type PipelineReportCreateRequest struct {
	PipelineID uint64             `json:"pipelineID"`
	Type       PipelineReportType `json:"type"`
	Meta       PipelineReportMeta `json:"meta"`

	IdentityInfo
}

PipelineReportCreateRequest 报告创建请求

func (PipelineReportCreateRequest) BasicValidate

func (req PipelineReportCreateRequest) BasicValidate() error

type PipelineReportCreateResponse

type PipelineReportCreateResponse struct {
	Header
	Data *PipelineReport `json:"data"`
}

type PipelineReportMeta

type PipelineReportMeta map[string]interface{}

PipelineReportMeta 流水线报告元数据,前端根据该数据拼装报告详情界面

type PipelineReportSet

type PipelineReportSet struct {
	PipelineID uint64           `json:"pipelineID"`
	Reports    []PipelineReport `json:"reports"`
}

PipelineReportSet 流水线报告集,一条流水线可能会有多个报告,称为报告集

type PipelineReportSetGetResponse

type PipelineReportSetGetResponse struct {
	Header
	Data *PipelineReportSet `json:"data"`
}

type PipelineReportSetPagingRequest

type PipelineReportSetPagingRequest struct {
	PipelineIDs []uint64             `schema:"-"`
	Sources     []PipelineSource     `schema:"source"`
	Types       []PipelineReportType `schema:"type"`

	/////////////////////////
	// pipeline 分页查询参数 //
	/////////////////////////
	// labels
	// &mustMatchLabel=key2=value3
	MustMatchLabelsQueryParams []string `schema:"mustMatchLabel"`

	// times
	// 开始执行时间 左闭区间
	StartTimeBeginTimestamp int64 `schema:"startTimeBeginTimestamp"`
	// 开始执行时间 右闭区间
	EndTimeBeginTimestamp int64 `schema:"endTimeBeginTimestamp"`
	// 创建时间 左闭区间
	StartTimeCreatedTimestamp int64 `schema:"startTimeCreatedTimestamp"`
	// 创建时间 右闭区间
	EndTimeCreatedTimestamp int64 `schema:"endTimeCreatedTimestamp"`

	PageNum  int `schema:"pageNum"`
	PageSize int `schema:"pageSize"`
}

type PipelineReportSetPagingResponse

type PipelineReportSetPagingResponse struct {
	Header
	Data *PipelineReportSetPagingResponseData `json:"data"`
}

type PipelineReportSetPagingResponseData

type PipelineReportSetPagingResponseData struct {
	Total     int                 `json:"total"`
	Pipelines []PipelineReportSet `json:"reportSets"`
}

type PipelineReportType

type PipelineReportType string

PipelineReportType 流水线报告类型

var (
	PipelineReportTypeBasic   PipelineReportType = "basic"
	PipelineReportTypeAPITest PipelineReportType = "api-test"
	PipelineReportTypeEvent   PipelineReportType = "event"
)

type PipelineRerunFailedRequest

type PipelineRerunFailedRequest struct {
	PipelineID    uint64 `json:"pipelineID"`
	AutoRunAtOnce bool   `json:"autoRunAtOnce"`
	IdentityInfo
}

type PipelineRerunFailedResponse

type PipelineRerunFailedResponse struct {
	Header
	Data *PipelineDTO `json:"data"`
}

type PipelineRerunRequest

type PipelineRerunRequest struct {
	PipelineID    uint64 `json:"pipelineID"`
	AutoRunAtOnce bool   `json:"autoRunAtOnce"`
	IdentityInfo
}

pipeline rerun

type PipelineRerunResponse

type PipelineRerunResponse struct {
	Header
	Data *PipelineDTO `json:"data"`
}

type PipelineResourceGC

type PipelineResourceGC struct {
	// SuccessTTLSecond means when to release resource if pipeline status is Success.
	// Normally success ttl should be small even to zero, because everything is ok and don't need to rerun.
	// Default is 1800s(30min)
	SuccessTTLSecond *uint64 `json:"successTTLSecond,omitempty"`
	// FailedTTLSecond means when to release resource if pipeline status is Failed.
	// Normally failed ttl should larger than SuccessTTLSecond, because you may want to rerun this failed pipeline,
	// which need these resource.
	// Default is 1800s.
	FailedTTLSecond *uint64 `json:"failedTTLSecond,omitempty"`
}

PipelineResourceGC releases occupied resource by pipeline, such as: - k8s pv (netdata volume) - k8s pod - k8s namespace

type PipelineRunParam

type PipelineRunParam struct {
	Name  string      `json:"name"`
	Value interface{} `json:"value"`
}

type PipelineRunParamWithValue

type PipelineRunParamWithValue struct {
	PipelineRunParam             // 从 pipeline.yml 中解析出来的值
	TrueValue        interface{} `json:"trueValue,omitempty"` // 真正的值,如果是占位符则会被替换,否则为原值
}

type PipelineRunParams

type PipelineRunParams []PipelineRunParam

func (PipelineRunParams) ToPipelineRunParamsWithValue

func (rps PipelineRunParams) ToPipelineRunParamsWithValue() []PipelineRunParamWithValue

type PipelineRunParamsWithValue

type PipelineRunParamsWithValue []PipelineRunParamWithValue

func (PipelineRunParamsWithValue) ToPipelineRunParams

func (rps PipelineRunParamsWithValue) ToPipelineRunParams() PipelineRunParams

type PipelineRunRequest

type PipelineRunRequest struct {
	PipelineID        uint64            `json:"pipelineID"`
	ForceRun          bool              `json:"forceRun"`
	PipelineRunParams PipelineRunParams `json:"runParams"`
	IdentityInfo
}

type PipelineRunResponse

type PipelineRunResponse struct {
	Header
}

type PipelineSnippetClientExtra

type PipelineSnippetClientExtra struct {
	UrlPathPrefix string `json:"urlPathPrefix"`
}

type PipelineSource

type PipelineSource string

PipelineSource 从整体上区分流水线来源

例如 dice(普通 CI/CD)、qa(质量分析)、bigdata(大数据)、ops(运维链路)、api-test(API Test)

var (
	PipelineSourceDefault      PipelineSource = "default"
	PipelineSourceDice         PipelineSource = "dice"             // 普通 Dice CI/CD
	PipelineSourceBigData      PipelineSource = "bigdata"          // 大数据任务
	PipelineSourceOps          PipelineSource = "ops"              // ops 链路
	PipelineSourceQA           PipelineSource = "qa"               // qa 链路
	PipelineSourceConfigSheet  PipelineSource = "config-sheet"     // 配置单
	PipelineSourceProject      PipelineSource = "project-pipeline" // 项目级流水线
	PipelineSourceProjectLocal PipelineSource = "local"            // gittar 流水线
	PipelineSourceAPITest      PipelineSource = "api-test"         // API Test
	PipelineSourceAutoTest     PipelineSource = "autotest"
	PipelineSourceAutoTestPlan PipelineSource = "autotest-plan"

	// cdp workflow
	PipelineSourceCDPDev     PipelineSource = "cdp-dev"
	PipelineSourceCDPTest    PipelineSource = "cdp-test"
	PipelineSourceCDPStaging PipelineSource = "cdp-staging"
	PipelineSourceCDPProd    PipelineSource = "cdp-prod"

	// cdp recommend
	PipelineSourceRecommendDev     PipelineSource = "recommend-dev"
	PipelineSourceRecommendTest    PipelineSource = "recommend-test"
	PipelineSourceRecommendStaging PipelineSource = "recommend-staging"
	PipelineSourceRecommendProd    PipelineSource = "recommend-prod"
)

func (PipelineSource) IsBigData

func (s PipelineSource) IsBigData() bool

func (PipelineSource) IsConfigSheet

func (s PipelineSource) IsConfigSheet() bool

func (PipelineSource) IsProjectPipeline

func (s PipelineSource) IsProjectPipeline() bool

func (PipelineSource) IsTest

func (s PipelineSource) IsTest() bool

func (PipelineSource) String

func (s PipelineSource) String() string

func (PipelineSource) Valid

func (s PipelineSource) Valid() bool

Valid 返回 PipelineSource 是否有效

type PipelineStageDTO

type PipelineStageDTO struct {
	ID         uint64 `json:"id"`
	PipelineID uint64 `json:"pipelineID"`

	Name   string         `json:"name"`
	Status PipelineStatus `json:"status"`

	CostTimeSec int64     `json:"costTimeSec"`
	TimeBegin   time.Time `json:"timeBegin"`
	TimeEnd     time.Time `json:"timeEnd"`
	TimeCreated time.Time `json:"timeCreated"`
	TimeUpdated time.Time `json:"timeUpdated"`
}

type PipelineStageDetailDTO

type PipelineStageDetailDTO struct {
	PipelineStageDTO
	PipelineTasks []PipelineTaskDTO `json:"pipelineTasks"`
}

type PipelineStatisticRequest

type PipelineStatisticRequest struct {
	Source PipelineSource `query:"source"`
}

PipelineStatisticRequest pipeline 执行统计请求

type PipelineStatisticResponse

type PipelineStatisticResponse struct {
	Header
	Data PipelineStatisticResponseData `json:"data"`
}

PipelineStatisticResponse pipeline 执行统计响应

type PipelineStatisticResponseData

type PipelineStatisticResponseData struct {
	Success    uint64 `json:"success"`
	Processing uint64 `json:"processing"`
	Failed     uint64 `json:"failed"`
	Completed  uint64 `json:"completed"` // success + failed
}

PipelineStatisticResponseData pipeline 执行统计

type PipelineStatus

type PipelineStatus string

PipelineStatus 表示流水线或任务状态

const (
	PipelineEmptyStatus PipelineStatus = "" // 判断状态是否为空

	// 构建相关的状态
	PipelineStatusInitializing  PipelineStatus = "Initializing"  // 初始化中:存在时间一般来说极短,表示 build 刚创建并正在分析中
	PipelineStatusDisabled      PipelineStatus = "Disabled"      // 禁用状态:表示该节点被禁用
	PipelineStatusAnalyzeFailed PipelineStatus = "AnalyzeFailed" // 分析失败:分析结束但是结果失败
	PipelineStatusAnalyzed      PipelineStatus = "Analyzed"      // 分析完毕:build 创建完即开始分析,分析成功则为该状态

	// 流程推进相关的状态
	PipelineStatusBorn    PipelineStatus = "Born"    // 流程推进过程中的初始状态
	PipelineStatusPaused  PipelineStatus = "Paused"  // 暂停状态:表示流程需要暂停,和 Born 同级,不会被 Mark
	PipelineStatusMark    PipelineStatus = "Mark"    // 标记状态:表示流程开始处理
	PipelineStatusCreated PipelineStatus = "Created" // 创建成功:scheduler create + start;可能要区分 Created 和 Started 两个状态
	PipelineStatusQueue   PipelineStatus = "Queue"   // 排队中:介于 启动成功 和 运行中
	PipelineStatusRunning PipelineStatus = "Running" // 运行中
	PipelineStatusSuccess PipelineStatus = "Success" // 成功

	// 流程推进 "正常" 失败:一般是用户侧导致的失败
	PipelineStatusFailed         PipelineStatus = "Failed"         // 业务逻辑执行失败,"正常" 失败
	PipelineStatusTimeout        PipelineStatus = "Timeout"        // 超时
	PipelineStatusStopByUser     PipelineStatus = "StopByUser"     // 用户主动取消
	PipelineStatusNoNeedBySystem PipelineStatus = "NoNeedBySystem" // 无需执行:系统判定无需执行

	// 流程推进 "异常" 失败:一般是平台侧导致的失败
	PipelineStatusCreateError    PipelineStatus = "CreateError"    // 创建节点失败
	PipelineStatusStartError     PipelineStatus = "StartError"     // 开始节点失败
	PipelineStatusError          PipelineStatus = "Error"          // 异常
	PipelineStatusDBError        PipelineStatus = "DBError"        // 平台流程推进时操作数据库异常
	PipelineStatusUnknown        PipelineStatus = "Unknown"        // 未知状态:获取到了无法识别的状态,流程无法推进
	PipelineStatusLostConn       PipelineStatus = "LostConn"       // 在重试指定次数后仍然无法连接
	PipelineStatusCancelByRemote PipelineStatus = "CancelByRemote" // 远端取消

	// 人工审核相关
	PipelineStatusWaitApproval    PipelineStatus = "WaitApprove" // 等待人工审核
	PipelineStatusApprovalSuccess PipelineStatus = "Accept"      // 人工审核通过
	PipelineStatusApprovalFail    PipelineStatus = "Reject"      // 人工审核拒绝
)

func ReconcilerRunningStatuses

func ReconcilerRunningStatuses() []PipelineStatus

func (PipelineStatus) AfterPipelineQueue

func (status PipelineStatus) AfterPipelineQueue() bool

func (PipelineStatus) CanCancel

func (status PipelineStatus) CanCancel() bool

func (PipelineStatus) CanDelete

func (status PipelineStatus) CanDelete() bool

func (PipelineStatus) CanEnableDisable

func (status PipelineStatus) CanEnableDisable() bool

func (PipelineStatus) CanPause

func (status PipelineStatus) CanPause() bool

func (PipelineStatus) CanPauseTask

func (status PipelineStatus) CanPauseTask() bool

CanPauseTask 只有在 Born 状态下可以 暂停

func (PipelineStatus) CanUnPauseTask

func (status PipelineStatus) CanUnPauseTask() bool

CanUnPauseTask 只有在 暂停 状态下可以 取消暂停

func (PipelineStatus) CanUnpause

func (status PipelineStatus) CanUnpause() bool

func (PipelineStatus) ChangeStateForManualReview

func (status PipelineStatus) ChangeStateForManualReview() PipelineStatus

func (PipelineStatus) IsAbnormalFailedStatus

func (status PipelineStatus) IsAbnormalFailedStatus() bool

IsAbnormalFailedStatus 表示异常失败,一般由平台侧引起

func (PipelineStatus) IsBeforePressRunButton

func (status PipelineStatus) IsBeforePressRunButton() bool

func (PipelineStatus) IsEndStatus

func (status PipelineStatus) IsEndStatus() bool

func (PipelineStatus) IsFailedStatus

func (status PipelineStatus) IsFailedStatus() bool

func (PipelineStatus) IsNormalFailedStatus

func (status PipelineStatus) IsNormalFailedStatus() bool

IsNormalFailedStatus 表示正常失败,一般由用户侧引起

func (PipelineStatus) IsReconcilerRunningStatus

func (status PipelineStatus) IsReconcilerRunningStatus() bool

func (PipelineStatus) IsSuccessStatus

func (status PipelineStatus) IsSuccessStatus() bool

func (PipelineStatus) String

func (status PipelineStatus) String() string

func (PipelineStatus) ToDesc

func (status PipelineStatus) ToDesc() string

type PipelineStatusDesc

type PipelineStatusDesc struct {
	Status PipelineStatus `json:"status"`
	Desc   string         `json:"desc"`
}

PipelineStatusDesc 包装状态和简单描述

func (PipelineStatusDesc) String

func (desc PipelineStatusDesc) String() string

type PipelineTaskActionDetail

type PipelineTaskActionDetail struct {
	LogoUrl     string `json:"logoUrl"`
	DisplayName string `json:"displayName"`
	Description string `json:"description"`
}

type PipelineTaskDTO

type PipelineTaskDTO struct {
	ID         uint64 `json:"id"`
	PipelineID uint64 `json:"pipelineID"`
	StageID    uint64 `json:"stageID"`

	Name   string             `json:"name"`
	OpType string             `json:"opType"`         // get, put, task
	Type   string             `json:"type,omitempty"` // git, buildpack, release, dice ... 当 OpType 为自定义任务时为空
	Status PipelineStatus     `json:"status"`
	Extra  PipelineTaskExtra  `json:"extra"`
	Labels map[string]string  `json:"labels"`
	Result PipelineTaskResult `json:"result"`

	IsSnippet             bool                       `json:"isSnippet"`
	SnippetPipelineID     *uint64                    `json:"snippetPipelineID,omitempty"`
	SnippetPipelineDetail *PipelineTaskSnippetDetail `json:"snippetPipelineDetail,omitempty" xorm:"json"` // 嵌套的流水线详情

	CostTimeSec  int64     `json:"costTimeSec"`  // -1 表示暂无耗时信息, 0 表示确实是0s结束
	QueueTimeSec int64     `json:"queueTimeSec"` // 等待调度的耗时, -1 暂无耗时信息, 0 表示确实是0s结束 TODO 赋值
	TimeBegin    time.Time `json:"timeBegin"`    // 执行开始时间
	TimeEnd      time.Time `json:"timeEnd"`      // 执行结束时间
	TimeCreated  time.Time `json:"timeCreated"`  // 记录创建时间
	TimeUpdated  time.Time `json:"timeUpdated"`  // 记录更新时间
}

type PipelineTaskEvent

type PipelineTaskEvent struct {
	EventHeader
	Content PipelineTaskEventData `json:"content"`
}

PipelineTaskEvent 流水线任务状态变化时发送的事件 event: pipeline_task action: status 见 internal/pipeline/spec/pipeline_status.go#Status

type PipelineTaskEventData

type PipelineTaskEventData struct {
	PipelineTaskID  uint64    `json:"pipelineTaskID"`
	PipelineID      uint64    `json:"pipelineID"`
	ActionType      string    `json:"actionType"` // git, custom ...
	Status          string    `json:"status"`
	ClusterName     string    `json:"clusterName"` // 集群名
	UserID          string    `json:"userID"`
	CreatedAt       time.Time `json:"createdAt"`
	QueueTimeSec    int64     `json:"queueTimeSec"` // 排队耗时
	CostTimeSec     int64     `json:"costTimeSec"`  // 任务执行耗时 (不包含 排队耗时)
	OrgName         string    `json:"orgName"`
	ProjectName     string    `json:"projectName"`
	ApplicationName string    `json:"applicationName"`
	TaskName        string    `json:"taskName"`
	RuntimeID       string    `json:"runtimeID"`
	ReleaseID       string    `json:"releaseID"`
}

type PipelineTaskExtra

type PipelineTaskExtra struct {
	UUID         string `json:"uuid"`
	AllowFailure bool   `json:"allowFailure"`
}

type PipelineTaskGetBootstrapInfoResponse

type PipelineTaskGetBootstrapInfoResponse struct {
	Header
	Data *PipelineTaskGetBootstrapInfoResponseData `json:"data"`
}

type PipelineTaskGetBootstrapInfoResponseData

type PipelineTaskGetBootstrapInfoResponseData struct {
	Data []byte `json:"data"`
}

type PipelineTaskGetResponse

type PipelineTaskGetResponse struct {
	Header
	Data *PipelineTaskDTO `json:"data"`
}

type PipelineTaskLoop

type PipelineTaskLoop struct {
	Break    string        `json:"break" yaml:"break"`
	Strategy *LoopStrategy `json:"strategy,omitempty" yaml:"strategy,omitempty"`
}

func (*PipelineTaskLoop) Duplicate

func (l *PipelineTaskLoop) Duplicate() *PipelineTaskLoop

type PipelineTaskLoopOptions

type PipelineTaskLoopOptions struct {
	TaskLoop       *PipelineTaskLoop `json:"taskLoop,omitempty"`       // task 指定的 loop 配置
	SpecYmlLoop    *PipelineTaskLoop `json:"specYmlLoop,omitempty"`    // action spec.yml 里指定的 loop 配置
	CalculatedLoop *PipelineTaskLoop `json:"calculatedLoop,omitempty"` // 计算出来的 loop 配置
	LoopedTimes    uint64            `json:"loopedTimes,omitempty"`    // 已循环次数
}

type PipelineTaskMachineHostStat

type PipelineTaskMachineHostStat struct {
	HostIP          string `json:"hostIP,omitempty"`
	Hostname        string `json:"hostname,omitempty"`
	UptimeSec       uint64 `json:"uptimeSec,omitempty"`
	BootTimeSec     uint64 `json:"bootTimeSec,omitempty"`
	OS              string `json:"os,omitempty"`
	Platform        string `json:"platform,omitempty"`
	PlatformVersion string `json:"platformVersion,omitempty"`
	KernelVersion   string `json:"kernelVersion,omitempty"`
	KernelArch      string `json:"kernelArch,omitempty"`
}

type PipelineTaskMachineLoadStat

type PipelineTaskMachineLoadStat struct {
	Load1  float64 `json:"load1,omitempty"`
	Load5  float64 `json:"load5,omitempty"`
	Load15 float64 `json:"load15,omitempty"`
}

type PipelineTaskMachineMemStat

type PipelineTaskMachineMemStat struct {
	Total       uint64  `json:"total,omitempty"`
	Available   uint64  `json:"available,omitempty"`
	Used        uint64  `json:"used,omitempty"`
	Free        uint64  `json:"free,omitempty"`
	UsedPercent float64 `json:"usedPercent,omitempty"`
	Buffers     uint64  `json:"buffers,omitempty"`
	Cached      uint64  `json:"cached,omitempty"`
}

type PipelineTaskMachinePodStat

type PipelineTaskMachinePodStat struct {
	PodIP string `json:"podIP,omitempty"`
}

type PipelineTaskMachineStat

type PipelineTaskMachineStat struct {
	Host PipelineTaskMachineHostStat `json:"host,omitempty"`
	Pod  PipelineTaskMachinePodStat  `json:"pod,omitempty"`
	Load PipelineTaskMachineLoadStat `json:"load,omitempty"`
	Mem  PipelineTaskMachineMemStat  `json:"mem,omitempty"`
	Swap PipelineTaskMachineSwapStat `json:"swap,omitempty"`
}

type PipelineTaskMachineSwapStat

type PipelineTaskMachineSwapStat struct {
	Total       uint64  `json:"total,omitempty"`
	Used        uint64  `json:"used,omitempty"`
	Free        uint64  `json:"free,omitempty"`
	UsedPercent float64 `json:"usedPercent,omitempty"`
}

type PipelineTaskOperateRequest

type PipelineTaskOperateRequest struct {
	TaskID  uint64 `json:"taskID"`
	Disable *bool  `json:"disable,omitempty"`
	Pause   *bool  `json:"pause,omitempty"`
}

type PipelineTaskPriority

type PipelineTaskPriority struct {
	Enable bool                         `json:"enable" yaml:"enable"`
	V1     []PipelineTaskPriorityV1Item `json:"v1" yaml:"v1"`
}

* desc: xxx priority:

enable: true
v1:
  - queue: org-1
    concurrency: 100
    priority: 10
  - queue: project-1
    concurrency: 10
    priority: 20
  - queue: app-i
    concurrency: 1
    priority: 30

type PipelineTaskPriorityV1Item

type PipelineTaskPriorityV1Item struct {
	Queue       string `json:"queue" yaml:"queue"`
	Concurrency int64  `json:"concurrency" yaml:"concurrency"`
	Priority    int64  `json:"priority" yaml:"priority"`
}

type PipelineTaskResult

type PipelineTaskResult struct {
	Metadata    Metadata                 `json:"metadata,omitempty"`
	Errors      []ErrorResponse          `json:"errors,omitempty"`
	MachineStat *PipelineTaskMachineStat `json:"machineStat,omitempty"`
}

type PipelineTaskRuntimeEvent

type PipelineTaskRuntimeEvent struct {
	EventHeader
	Content PipelineTaskRuntimeEventData `json:"content"`
}

PipelineTaskRuntimeEvent 流水线触发部署时 runtimeID 更新产生的事件 event: pipeline_task_runtime action: update

type PipelineTaskRuntimeEventData

type PipelineTaskRuntimeEventData struct {
	ClusterName    string `json:"clusterName"` // 集群名
	PipelineTaskID uint64 `json:"pipelineTaskID"`
	Status         string `json:"status"`
	RuntimeID      string `json:"runtimeID"`
}

type PipelineTaskSnippetDetail

type PipelineTaskSnippetDetail struct {
	Outputs []PipelineOutputWithValue `json:"outputs"`

	// 直接子任务数,即 snippet pipeline 的任务数,不会递归查询
	// -1 表示未知,具体数据在 reconciler 调度时赋值
	DirectSnippetTasksNum int `json:"directSnippetTasksNum"`
	// 递归子任务数,即该节点下所有子任务数
	// -1 表示未知,具体数据由 aop 上报
	RecursiveSnippetTasksNum int `json:"recursiveSnippetTasksNum"`
}

type PipelineTemplate

type PipelineTemplate struct {
	ID        uint64    `json:"id"`
	Name      string    `json:"name"`
	Desc      string    `json:"desc"`
	LogoUrl   string    `json:"logoUrl"`
	ScopeType string    `json:"scopeType"`
	ScopeID   string    `json:"scopeID"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
	Version   string    `json:"version"`
}

type PipelineTemplateApplyRequest

type PipelineTemplateApplyRequest struct {
	Spec      string `json:"spec"`
	ScopeType string `json:"scopeType"`
	ScopeID   string `json:"scopeID"`
}

type PipelineTemplateCreateRequest

type PipelineTemplateCreateRequest struct {
	Name           string `json:"name"`
	LogoUrl        string `json:"logoUrl"`
	Desc           string `json:"desc"`
	ScopeType      string `json:"scopeType"`
	ScopeID        string `json:"scopeID"`
	Spec           string `json:"spec"`
	Version        string `json:"version"`
	Readme         string `json:"readme"`
	DefaultVersion string `json:"defaultVersion"`
}

type PipelineTemplateCreateResponse

type PipelineTemplateCreateResponse struct {
	Header
	Data PipelineTemplate `json:"data"`
}

type PipelineTemplateQueryRequest

type PipelineTemplateQueryRequest struct {
	ScopeType string `json:"scopeType"`
	ScopeID   string `json:"scopeID"`
	PageNo    int    `json:"pageNo"`
	PageSize  int    `json:"pageSize"`
	Name      string `json:"name"`
}

type PipelineTemplateQueryResponse

type PipelineTemplateQueryResponse struct {
	Data  []*PipelineTemplate `json:"data"`
	Total int                 `json:"total"`
}

type PipelineTemplateRender

type PipelineTemplateRender struct {
	PipelineYaml string                   `json:"pipelineYaml"`
	Version      *PipelineTemplateVersion `json:"pipelineTemplateVersion"`
	Outputs      []SnippetFormatOutputs   `json:"outputs"`
}

type PipelineTemplateRenderRequest

type PipelineTemplateRenderRequest struct {
	ScopeType       string                 `json:"scopeType"`
	ScopeID         string                 `json:"scopeID"`
	Name            string                 `json:"name"`
	Version         string                 `json:"version"`
	Params          map[string]interface{} `json:"params"`
	Alias           string                 `json:"alias"`
	TemplateVersion TemplateVersion        `json:"renderVersion"`
}

type PipelineTemplateRenderResponse

type PipelineTemplateRenderResponse struct {
	Header
	Data PipelineTemplateRender `json:"data"`
}

type PipelineTemplateRenderSpecRequest

type PipelineTemplateRenderSpecRequest struct {
	Spec            *PipelineTemplateSpec  `json:"spec"`
	Alias           string                 `json:"alias"`
	TemplateVersion TemplateVersion        `json:"renderVersion"`
	Params          map[string]interface{} `json:"params"`
}

type PipelineTemplateSearchRequest

type PipelineTemplateSearchRequest struct {
}

type PipelineTemplateSearchResponse

type PipelineTemplateSearchResponse struct {
	Header
	Data map[string]PipelineTemplateVersion `json:"data"`
}

type PipelineTemplateSpec

type PipelineTemplateSpec struct {
	Name           string            `json:"name" yaml:"name"`
	Version        string            `json:"version" yaml:"version"`
	Desc           string            `json:"desc" yaml:"desc"`
	LogoUrl        string            `json:"logoUrl" yaml:"logo_url"`
	Params         []*PipelineParam  `json:"params" yaml:"params"`
	Outputs        []*PipelineOutput `json:"outputs" yaml:"outputs"`
	Template       string            `json:"template" yaml:"template"`
	DefaultVersion string            `json:"defaultVersion" yaml:"default_version"`
}

func (*PipelineTemplateSpec) Check

func (p *PipelineTemplateSpec) Check() error

type PipelineTemplateSpecOutput

type PipelineTemplateSpecOutput struct {
	Name string `json:"name" yaml:"name"`
	Desc string `json:"desc" yaml:"desc"`
	Ref  string `json:"ref" yaml:"ref"`
}

type PipelineTemplateSpecParams

type PipelineTemplateSpecParams struct {
	Name     string            `json:"name" yaml:"name"`
	Required bool              `json:"required" yaml:"required"`
	Default  interface{}       `json:"default" yaml:"default"`
	Desc     string            `json:"desc" yaml:"desc"`
	Type     string            `json:"type" yaml:"type"`
	Struct   []ActionSpecParam `json:"struct" yaml:"struct"`
}

type PipelineTemplateVersion

type PipelineTemplateVersion struct {
	ID         uint64    `json:"id"`
	TemplateId uint64    `json:"templateId"`
	Name       string    `json:"name"`
	Version    string    `json:"version"`
	Spec       string    `json:"spec"`
	Readme     string    `json:"readme"`
	CreatedAt  time.Time `json:"createdAt"`
	UpdatedAt  time.Time `json:"updatedAt"`
}

type PipelineTemplateVersionCreateRequest

type PipelineTemplateVersionCreateRequest struct {
}

type PipelineTemplateVersionCreateResponse

type PipelineTemplateVersionCreateResponse struct {
	Header
	Data PipelineTemplateVersion `json:"data"`
}

type PipelineTemplateVersionGetRequest

type PipelineTemplateVersionGetRequest struct {
	ScopeType string `json:"scopeType"`
	ScopeID   string `json:"scopeID"`
	Name      string `json:"name"`
	Version   string `json:"version"`
}

type PipelineTemplateVersionGetResponse

type PipelineTemplateVersionGetResponse struct {
	Header
	Data PipelineTemplateVersion `json:"data"`
}

type PipelineTemplateVersionQueryRequest

type PipelineTemplateVersionQueryRequest struct {
	ScopeType string `json:"scopeType"`
	ScopeID   string `json:"scopeID"`
	Name      string `json:"name"`
}

type PipelineTemplateVersionQueryResponse

type PipelineTemplateVersionQueryResponse struct {
	Header
	Data []PipelineTemplateVersion `json:"data"`
}

type PipelineTriggerMode

type PipelineTriggerMode string

PipelineTriggerMode 流水线触发方式,手动 or 定时

var (
	PipelineTriggerModeManual PipelineTriggerMode = "manual" // 手动触发
	PipelineTriggerModeCron   PipelineTriggerMode = "cron"   // 定时触发
)

func (PipelineTriggerMode) String

func (m PipelineTriggerMode) String() string

func (PipelineTriggerMode) Valid

func (m PipelineTriggerMode) Valid() bool

Valid 返回 PipelineTriggerMode 是否有效

type PipelineType

type PipelineType string

PipelineType 流水线运行类型,普通 or 重试失败节点

var (
	PipelineTypeNormal      PipelineType = "normal"       // 正常;重试全流程时 type = normal
	PipelineTypeRerunFailed PipelineType = "rerun-failed" // 重试失败节点
)

func (PipelineType) String

func (t PipelineType) String() string

func (PipelineType) Valid

func (t PipelineType) Valid() bool

Valid 返回 PipelineType 是否有效

type PipelineUser

type PipelineUser struct {
	ID     interface{} `json:"id,omitempty"`
	Name   string      `json:"name,omitempty"`
	Avatar string      `json:"avatar,omitempty"`
}

type PipelineYml

type PipelineYml struct {
	// 用于构造 pipeline yml
	Version         string                 `json:"version"`                   // 版本
	Envs            map[string]string      `json:"envs,omitempty"`            // 环境变量
	Cron            string                 `json:"cron,omitempty"`            // 定时配置
	CronCompensator *CronCompensator       `json:"cronCompensator,omitempty"` // 定时补偿配置
	Stages          [][]*PipelineYmlAction `json:"stages"`                    // 流水线
	FlatActions     []*PipelineYmlAction   `json:"flatActions"`               // 展平了的流水线

	Params []*PipelineParam `json:"params,omitempty"` // 流水线输入

	Outputs []*PipelineOutput `json:"outputs,omitempty"` // 流水线输出

	// 1.0 升级相关
	NeedUpgrade bool `json:"needUpgrade"` // pipeline yml 是否需要升级

	// YmlContent:
	// 1) 当 needUpgrade 为 true  时,ymlContent 返回升级后的 yml
	// 2) 当 needUpgrade 为 false 时:
	//    1) 用户传入的为 YAML(apistructs.PipelineYml) 时,ymlContent 返回 YAML(spec.PipelineYml)
	//    2) 用户传入的为 YAML(spec.PipelineYml) 时,返回优化后的 YAML(spec.PipelineYml)
	YmlContent string         `json:"ymlContent,omitempty"`
	On         *TriggerConfig `json:"on,omitempty"`

	// describe the use of network hooks in the pipeline
	Lifecycle []*NetworkHookInfo `json:"lifecycle"`
}

type PipelineYmlAction

type PipelineYmlAction struct {
	Alias         string                 `json:"alias,omitempty"`                                          // action 实例名
	Type          string                 `json:"type"`                                                     // action 类型,比如:git-checkout, release
	Description   string                 `json:"description,omitempty"`                                    // 描述
	Version       string                 `json:"version,omitempty"`                                        // action 版本
	Params        map[string]interface{} `json:"params,omitempty"`                                         // 参数
	Image         string                 `json:"image,omitempty"`                                          // 镜像
	Commands      []string               `json:"commands,omitempty"`                                       // 命令行
	Timeout       int64                  `json:"timeout,omitempty"`                                        // 超时设置,单位:秒
	Namespaces    []string               `json:"namespaces,omitempty"`                                     // Action 输出的命名空间
	Resources     Resources              `json:"resources,omitempty"`                                      // 资源
	DisplayName   string                 `json:"displayName,omitempty"`                                    // 中文名称
	LogoUrl       string                 `json:"logoUrl,omitempty"`                                        // logo
	Caches        []ActionCache          `json:"caches,omitempty"`                                         // 缓存
	SnippetConfig *SnippetConfig         `json:"snippet_config,omitempty" yaml:"snippet_config,omitempty"` // snippet 的配置
	If            string                 `json:"if,omitempty"`                                             // 条件执行
	Loop          *PipelineTaskLoop      `json:"loop,omitempty"`                                           // 循环执行
	SnippetStages *SnippetStages         `json:"snippetStages,omitempty"`                                  // snippetStages snippet 展开
}

type PipelineYmlParseGraphRequest

type PipelineYmlParseGraphRequest struct {
	PipelineYmlContent        string            `json:"pipelineYmlContent"`
	GlobalSnippetConfigLabels map[string]string `json:"globalSnippetConfigLabels"`
	SnippetConfig             *SnippetConfig    `json:"snippetConfig"`
}

type PipelineYmlParseGraphResponse

type PipelineYmlParseGraphResponse struct {
	Header
	Data *PipelineYml `json:"data"`
}

type PipelineYmlSource

type PipelineYmlSource string

PipelineYmlSource 表示 pipelineYml 文件来源

var (
	PipelineYmlSourceContent PipelineYmlSource = "content" // pipeline.yml 直接由 api 调用时作为参数传入
	PipelineYmlSourceGittar  PipelineYmlSource = "gittar"  // pipeline.yml 从 gittar 中获取
)

func (PipelineYmlSource) String

func (s PipelineYmlSource) String() string

func (PipelineYmlSource) Valid

func (s PipelineYmlSource) Valid() bool

Valid 返回 PipelineYmlSource 是否有效

type Platform

type Platform struct {
	Environment    string            `json:"environment,omitempty"`
	WildcardDomain string            `json:"wildcardDomain"`
	AssignDomains  map[string]string `json:"assignDomains"`
	AssignNodes    map[string]string `json:"assignNodes,omitempty"`
	MySQL          MySQL             `json:"mysql,omitempty"`
	AcceptMaster   bool              `json:"acceptMaster,omitempty"`
	AcceptLB       bool              `json:"acceptLB,omitempty"`
	DataDiskDevice string            `json:"dataDiskDevice,omitempty"`
	DataRoot       string            `json:"dataRoot,omitempty"`
	Scheme         string            `json:"scheme"`
	Port           int               `json:"port"`
	RegistryHost   string            `json:"registryHost,omitempty"`
	OpenVPN        OpenVPN           `json:"openvpn,omitempty"`
}

Platform 平台配置

type PluginParamDto

type PluginParamDto struct {
	// 数据源Id
	DataSourceId int32 `json:"dataSourceId"`
	// 数据表名称
	TableName string `json:"tableName"`
	// 展示图形类型,可选:default,line,bar,area,pie,cards,radar,gauge,map,dot
	Widget string `json:"widget"`
	// 目标字段列表
	TargetColumns []string `json:"targetColumns"`
	// 筛选字段列表
	FilterColumns map[string]string `json:"filterColumns"`
	// 返回记录数
	Limit int32 `json:"limit"`
	// 查询其实位置
	Offset int32 `json:"offset"`
	// 聚合字段列表
	GroupByColumns []string `json:"groupByColumns"`
}

type Pod

type Pod struct {
	Uid          string `json:"uid"`
	IPAddress    string `json:"ipAddress"`
	Host         string `json:"host"`
	Phase        string `json:"phase"`
	Message      string `json:"message"`
	StartedAt    string `json:"startedAt"`
	Service      string `json:"service"`
	ClusterName  string `json:"clusterName"`
	PodName      string `json:"podName"`
	K8sNamespace string `json:"k8sNamespace"`
}

type PodInfoData

type PodInfoData struct {
	Cluster   string `json:"cluster"`
	Namespace string `json:"namespace"`
	Name      string `json:"name"`

	OrgName         string `json:"orgName"`
	OrgID           string `json:"orgID"`
	ProjectName     string `json:"projectName"`
	ProjectID       string `json:"projectID"`
	ApplicationName string `json:"applicationName"`
	ApplicationID   string `json:"applicationID"`
	RuntimeName     string `json:"runtimeName"`
	RuntimeID       string `json:"runtimeID"`
	ServiceName     string `json:"serviceName"`
	Workspace       string `json:"workspace"`
	ServiceType     string `json:"serviceType"`
	AddonID         string `json:"addonID"`

	Uid          string `json:"uid"`
	K8sNamespace string `json:"k8sNamespace"`
	PodName      string `json:"podName"`

	Phase     string     `json:"phase"`
	Message   string     `json:"message"`
	PodIP     string     `json:"podIP"`
	HostIP    string     `json:"hostIP"`
	StartedAt *time.Time `json:"startedAt"`

	MemRequest int     `json:"memRequest"`
	MemLimit   int     `json:"memLimit"`
	CpuRequest float64 `json:"cpuRequest"`
	CpuLimit   float64 `json:"cpuLimit"`
}

type PodInfoDataList

type PodInfoDataList []PodInfoData

type PodInfoRequest

type PodInfoRequest struct {
	Cluster         string `query:"cluster"`
	OrgName         string `query:"orgName"`
	OrgID           string `query:"orgID"`
	ProjectName     string `query:"projectName"`
	ProjectID       string `query:"projectID"`
	ApplicationName string `query:"applicationName"`
	ApplicationID   string `query:"applicationID"`
	RuntimeName     string `query:"runtimeName"`
	RuntimeID       string `query:"runtimeID"`
	ServiceName     string `query:"serviceName"`
	// enum: dev, test, staging, prod
	Workspace string `query:"workspace"`
	// enum: addon, stateless-service, job
	ServiceType string `query:"serviceType"`
	AddonID     string `query:"addonID"`
	// enum: Pending, Running, Succeeded, Failed, Unknown
	Phases []string `query:"phases"`

	Limit int `query:"limit"`
}

type PodInfoResponse

type PodInfoResponse struct {
	Header
	Data PodInfoDataList `json:"data"`
}

type PodListRequest

type PodListRequest struct {
	RuntimeID   int64  `query:"runtimeID"`
	ServiceName string `query:"serviceName"`
}

PodListRequest 容器实例列表请求

type PodListResponse

type PodListResponse struct {
	Header
	Data Pods `json:"data"`
}

PodListResponse 容器实例列表响应

type Pods

type Pods []Pod

func (Pods) Len

func (c Pods) Len() int

func (Pods) Less

func (c Pods) Less(i, j int) bool

func (Pods) Swap

func (c Pods) Swap(i, j int)

type PortMap

type PortMap struct {
	Protocol      string `json:"protocol"`
	ContainerPort int    `json:"containerPort"`
	ServicePort   int32  `json:"servicePort"`
}

PortMap 边缘应用端口映射表

type PostAddonConfigCallBackResponse

type PostAddonConfigCallBackResponse struct {
	Header
}

addon配置回调的响应

type PreDiceDTO

type PreDiceDTO struct {
	Name     string                               `json:"name,omitempty"`
	Envs     map[string]string                    `json:"envs,omitempty"`
	Services map[string]*RuntimeInspectServiceDTO `json:"services,omitempty"`
}

type PreFetcher

type PreFetcher struct {
	FileFromImage string `json:"fileFromImage,omitempty"` // 通过 k8s initcontainer 实现, fetch 的工作需要在 镜像 entrypoint 中做掉
	FileFromHost  string `json:"fileFromHost,omitempty"`  // 通过 bind 的方式实现, 兼容 metronome
	ContainerPath string `json:"containerPath"`
}

PreFetcher 用于 job 下载功能

type PreType

type PreType string
const (
	PreTypeSerial   PreType = "Serial"   // 串行
	PreTypeParallel PreType = "Parallel" // 并行
)

type PrivateSlbBuyInfo

type PrivateSlbBuyInfo struct {
	PrivateSlbInfo
	CreateCloudResourceChargeInfo
	Spec string `json:"spec"`
}

type PrivateSlbInfo

type PrivateSlbInfo struct {
	ID   string `json:"instanceID"`
	Name string `json:"name"`
	Port int    `json:"port"`
}

type ProjectActiveTimeUpdateRequest

type ProjectActiveTimeUpdateRequest struct {
	ProjectID  uint64    `json:"projectId"`  // 项目id,必传参数
	ActiveTime time.Time `json:"activeTime"` // 活跃时间
}

ProjectActiveTimeUpdateRequest 项目活跃时间更新请求

type ProjectActiveTimeUpdateResponse

type ProjectActiveTimeUpdateResponse struct {
	Header
	Data string `json:"data"`
}

ProjectActiveTimeUpdateResponse 项目活跃时间更新响应

type ProjectCache

type ProjectCache struct {
	Usage       *ProjectUsageFetchResponseData
	Application map[string]interface{}
	Runtime     map[string]interface{}
	Services    map[string]interface{}
	Resource    []*ContainerFetchResponseData
}

ProjectCache 大项目资源缓存

type ProjectCreateRequest

type ProjectCreateRequest struct {
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`

	// 项目级别的dd回调地址
	DdHook string `json:"ddHook"`
	Desc   string `json:"desc"`

	// 创建者的用户id
	Creator string `json:"creator"` // TODO deprecated

	// 组织id
	OrgID       uint64 `json:"orgId"`
	ClusterID   uint64 `json:"clusterId"`   // TODO deprecated
	ClusterName string `json:"clusterName"` // TODO deprecated

	// 项目各环境集群配置
	ClusterConfig map[string]string `json:"clusterConfig"`
	// 项目回滚点配置
	RollbackConfig map[string]int `json:"rollbackConfig"`
	// +required 单位: c
	CpuQuota float64 `json:"cpuQuota"`
	// +required 单位: GB
	MemQuota float64 `json:"memQuota"`
	// +required 项目模版
	Template ProjectTemplate `json:"template"`
}

ProjectCreateRequest POST /api/projects 创建项目请求结构

type ProjectCreateResponse

type ProjectCreateResponse struct {
	Header
	Data uint64 `json:"data"`
}

ProjectCreateResponse POST /api/projects 创建项目响应结构

type ProjectDTO

type ProjectDTO struct {
	ID          uint64 `json:"id"`
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`
	DDHook      string `json:"ddHook"`
	OrgID       uint64 `json:"orgId"`
	Creator     string `json:"creator"`
	Desc        string `json:"desc"`

	// 项目所有者
	Owners []string `json:"owners"`
	// 项目活跃时间
	ActiveTime string `json:"activeTime"`
	// 用户是否已加入项目
	Joined bool `json:"joined"`

	// 当前用户是否可以解封该 project (目前只有 /api/projects/actions/list-my-projects api 有这个值)
	CanUnblock *bool `json:"canUnblock"`
	// 解封状态: unblocking | unblocked (目前只有 /api/projects/actions/list-my-projects api 有这个值)
	BlockStatus string `json:"blockStatus"`

	// 当前用户是否可以管理该 project (目前只有 /api/projects/actions/list-my-projects api 有这个值)
	CanManage bool `json:"CanManage"`
	IsPublic  bool `json:"isPublic"`

	// 项目统计信息
	Stats ProjectStats `json:"stats"`

	// 项目资源使用
	ProjectResourceUsage

	// 项目各环境集群配置
	ClusterConfig  map[string]string `json:"clusterConfig"`
	RollbackConfig map[string]int    `json:"rollbackConfig"`
	CpuQuota       float64           `json:"cpuQuota"`
	MemQuota       float64           `json:"memQuota"`

	// 项目创建时间
	CreatedAt time.Time `json:"createdAt"`

	// 项目更新时间
	UpdatedAt time.Time `json:"updatedAt"`
}

ProjectDTO 项目结构

type ProjectDeleteRequest

type ProjectDeleteRequest struct {
	ProjectID uint64 `path:"projectId"`
}

ProjectDeleteRequest DELETE /api/projects/{projectId} 删除项目请求结构

type ProjectDeleteResponse

type ProjectDeleteResponse struct {
	Header
	Data ProjectDTO `json:"data"`
}

ProjectDeleteResponse DELETE /api/projects/{projectId} 删除项目响应结构

type ProjectDetailRequest

type ProjectDetailRequest struct {
	// 支持项目id/项目名查询
	ProjectIDOrName string `path:"projectIdOrName"`

	// 当传入projectName时,需要传入orgId或orgName
	OrgID uint64 `query:"orgId"`

	// 当传入projectName时,需要传入orgId或orgName
	OrgName uint64 `query:"orgName"`
}

ProjectDetailRequest GET /api/projects/{projectIdOrName} 项目详情请求结构

type ProjectDetailResponse

type ProjectDetailResponse struct {
	Header
	Data ProjectDTO `json:"data"`
}

ProjectDetailResponse GET /api/projects/{projectIdOrName} 项目详情响应结构 由于与删除project时产生审计事件所需要的返回一样,所以删除project时也用这个接收返回

type ProjectFillQuotaResponse

type ProjectFillQuotaResponse struct {
	Header
	Data string `json:"data"`
}

ProjectFillQuotaResponse 项目填充配额响应

type ProjectFunction

type ProjectFunction string

ProjectFunction 项目功能

const (
	PrjCooperativeFunc          ProjectFunction = "projectCooperative"   // 项目协同
	PrjTestManagementFunc       ProjectFunction = "testManagement"       // 测试管理
	PrjCodeQualityFunc          ProjectFunction = "codeQuality"          // 代码质量
	PrjCodeBaseFunc             ProjectFunction = "codeBase"             // 代码仓库
	PrjBranchRuleFunc           ProjectFunction = "branchRule"           // 分支规则
	PrjCICIDFunc                ProjectFunction = "cicd"                 // 持续集成
	PrjProductLibManagementFunc ProjectFunction = "productLibManagement" // 制品库管理
	PrjNotifyFunc               ProjectFunction = "Projectnotify"        // 通知通知组
)

type ProjectFunctionSetRequest

type ProjectFunctionSetRequest struct {
	ProjectID       uint64                   `json:"projectId"`       // 项目id,必传参数
	ProjectFunction map[ProjectFunction]bool `json:"projectFunction"` // 项目功能开关配置
}

ProjectFunctionSetRequest 项目功能开关设置请求

type ProjectFunctionSetResponse

type ProjectFunctionSetResponse struct {
	Header
	Data string `json:"data"`
}

ProjectFunctionSetResponse 项目功能开关设置响应

type ProjectLabel

type ProjectLabel struct {
	ID        int64            `json:"id"`
	Name      string           `json:"name"`
	Type      ProjectLabelType `json:"type"`
	Color     string           `json:"color"`
	ProjectID uint64           `json:"projectID"`
	Creator   string           `json:"creator"`
	CreatedAt time.Time        `json:"createdAt"`
	UpdatedAt time.Time        `json:"updatedAt"`
}

ProjectLabel 标签

type ProjectLabelCreateRequest

type ProjectLabelCreateRequest struct {
	Name      string           `json:"name"`      // +required 标签名称
	Type      ProjectLabelType `json:"type"`      // +required 标签作用类型
	Color     string           `json:"color"`     // +required 标签颜色
	ProjectID uint64           `json:"projectID"` // +required 标签所属项目

	// internal use
	IdentityInfo
}

ProjectLabelCreateRequest POST /api/labels 创建标签

type ProjectLabelCreateResponse

type ProjectLabelCreateResponse struct {
	Header
	Data int64 `json:"data"`
}

ProjectLabelCreateResponse POST /api/labels 创建标签响应结构

type ProjectLabelGetByIDResponseData

type ProjectLabelGetByIDResponseData struct {
	Header
	Data ProjectLabel
}

ProjectLabelGetByIDResponseData 通过id获取标签响应 由于与删除label时产生审计事件所需要的返回一样,所以删除label时也用这个接收返回

type ProjectLabelListRequest

type ProjectLabelListRequest struct {
	ProjectID uint64           `schema:"projectID"`
	Key       string           `schema:"key"`  // 按标签名称模糊查询
	Type      ProjectLabelType `schema:"type"` // 标签作用类型
	PageNo    uint64           `schema:"pageNo"`
	PageSize  uint64           `schema:"pageSize"`
}

ProjectLabelListRequest 标签列表请求

type ProjectLabelListResponse

type ProjectLabelListResponse struct {
	Header
	UserInfoHeader
	Data *ProjectLabelListResponseData `json:"data"`
}

ProjectLabelListResponse GET /api/labels 标签列表响应

type ProjectLabelListResponseData

type ProjectLabelListResponseData struct {
	Total int64          `json:"total"`
	List  []ProjectLabel `json:"list"`
}

ProjectLabelListResponseData 标签列表响应数据结构

type ProjectLabelType

type ProjectLabelType string

ProjectLabelType 标签类型

const (
	LabelTypeIssue ProjectLabelType = "issue" // issue 标签类型
)

type ProjectLabelUpdateRequest

type ProjectLabelUpdateRequest struct {
	Name  string `json:"name"`
	Color string `json:"color"`

	ID int64 `json:"-"`
	// internal use
	IdentityInfo
}

LabelUpdateRequest PUT /api/labels 更新标签信息

type ProjectListRequest

type ProjectListRequest struct {
	OrgID uint64 `query:"orgId"`

	// 对项目名进行like查询
	Query string `query:"q"`
	Name  string `query:"name"` //project name

	// 排序支持activeTime,memQuota和cpuQuota
	OrderBy string `query:"orderBy"`
	// 是否升序
	Asc bool `query:"asc"`
	// 是否只展示已加入的项目
	Joined   bool `query:"joined"` // TODO refactor
	PageNo   int  `query:"pageNo"`
	PageSize int  `query:"pageSize"`
	// 是否只显示公开项目
	IsPublic bool `query:"isPublic"`
}

ProjectListRequest GET /api/projects 查询项目请求

type ProjectListResponse

type ProjectListResponse struct {
	Header
	Data PagingProjectDTO `json:"data"`
}

ProjectListResponse GET /api/projects 查询项目响应

type ProjectNameSpaceInfo

type ProjectNameSpaceInfo struct {
	Enabled    bool              `json:"enabled"`
	Namespaces map[string]string `json:"namespaces"`
}

ProjectNameSpaceInfo 项目级命名空间信息

type ProjectNameSpaceInfoResponse

type ProjectNameSpaceInfoResponse struct {
	Header
	Data ProjectNameSpaceInfo `json:"data"`
}

ProjectNameSpaceInfoResponse 项目级命名空间响应

type ProjectQuotaCheckRequest

type ProjectQuotaCheckRequest AddonScaleRequest

addon project quota check request

type ProjectQuotaCheckResponse

type ProjectQuotaCheckResponse struct {
	IsQuotaEnough bool         `json:"isQuotaEnough"`
	Remain        BaseResource `json:"remain"`
	Need          BaseResource `json:"need"`
}

type ProjectResourceItem

type ProjectResourceItem struct {
	CpuServiceUsed float64 `json:"cpuServiceUsed"`
	MemServiceUsed float64 `json:"memServiceUsed"`
	CpuAddonUsed   float64 `json:"cpuAddonUsed"`
	MemAddonUsed   float64 `json:"memAddonUsed"`
}

ProjectResourceItem 获取项目资源信息,包括service和addon

type ProjectResourceResponse

type ProjectResourceResponse struct {
	Header
	// key 为 projectID
	Data map[uint64]ProjectResourceItem `json:"data"`
}

ProjectResourceResponse 获取项目资源信息,包括service和addon

type ProjectResourceUsage

type ProjectResourceUsage struct {
	CpuServiceUsed float64 `json:"cpuServiceUsed"`
	MemServiceUsed float64 `json:"memServiceUsed"`
	CpuAddonUsed   float64 `json:"cpuAddonUsed"`
	MemAddonUsed   float64 `json:"memAddonUsed"`
}

ProjectResourceUsage 项目资源使用

type ProjectStats

type ProjectStats struct {
	// 应用数
	CountApplications int `json:"countApplications"`
	// 总成员数
	CountMembers int `json:"countMembers"`

	// new states
	// 总应用数
	TotalApplicationsCount int `json:"totalApplicationsCount"`
	// 总成员数
	TotalMembersCount int `json:"totalMembersCount"`
	// 总迭代数
	TotalIterationsCount int `json:"totalIterationsCount"`
	// 进行中的迭代数
	RunningIterationsCount int `json:"runningIterationsCount"`
	// 规划中的迭代数
	PlanningIterationsCount int `json:"planningIterationsCount"`
	// 总预计工时
	TotalManHourCount float64 `json:"totalManHourCount"`
	// 总已记录工时
	UsedManHourCount float64 `json:"usedManHourCount"`
	// 总规划工时
	PlanningManHourCount float64 `json:"planningManHourCount"`
	// 已解决bug数
	DoneBugCount int64 `json:"doneBugCount"`
	// 总bug数
	TotalBugCount int64 `json:"totalBugCount"`
	// bug解决率·
	DoneBugPercent float64 `json:"doneBugPercent"`
}

ProjectStats 项目统计

type ProjectTemplate

type ProjectTemplate string

ProjectTemplate 项目模版

const (
	DevopsTemplate ProjectTemplate = "DevOps"
)

func (ProjectTemplate) GetProjectFunctionsByTemplate

func (pt ProjectTemplate) GetProjectFunctionsByTemplate() map[ProjectFunction]bool

GetProjectFunctionsByTemplate 根据项目模版获取对应的项目功能

type ProjectUpdateBody

type ProjectUpdateBody struct {
	// 路径上有可以不传
	ID          uint64 `json:"id"`
	Name        string `json:"name"`
	DisplayName string `json:"displayName"` // TODO 废弃displayName字段
	Desc        string `json:"desc"`
	DdHook      string `json:"ddHook"`
	IsPublic    bool   `json:"isPublic"` // 是否公开项目

	// 项目各环境集群配置
	ClusterConfig map[string]string `json:"clusterConfig"`

	// 项目回滚点配置
	RollbackConfig map[string]int `json:"rollbackConfig"`

	// +required 单位: c
	CpuQuota float64 `json:"cpuQuota"`
	// +required 单位: GB
	MemQuota float64 `json:"memQuota"`
}

ProjectUpdateBody 更新项目请求body

type ProjectUpdateRequest

type ProjectUpdateRequest struct {
	ProjectID uint64            `json:"-" path:"projectId"`
	Body      ProjectUpdateBody `json:"body"`
}

ProjectUpdateRequest PUT /api/projects/{projectId} 更新项目请求结构

type ProjectUpdateResponse

type ProjectUpdateResponse struct {
	Header
	Data interface{} `json:"data"`
}

ProjectUpdateResponse PUT /api/projects/{projectId} 更新项目响应结构

type ProjectUsageFetchResponse

type ProjectUsageFetchResponse struct {
	Header
	Data []ProjectUsageFetchResponseData `json:"data"`
}

type ProjectUsageFetchResponseData

type ProjectUsageFetchResponseData struct {
	ID           string  `json:"id"`        // 项目ID
	Name         string  `json:"name"`      // 项目名称
	Workspace    string  `json:"workspace"` // 项目对应的环境
	Instance     int     `json:"instance"`  // 项目下的容器实例数
	UnhealthyNum int     `json:"unhealthy"` // 项目对应的实例不健康数量
	Memory       float64 `json:"memory"`    // 分配的内存大小单位(MB)
	Disk         float64 `json:"disk"`      // 分配的磁盘大小单位(MB)
	CPU          float64 `json:"cpu"`
}

ProjectUsageFetchResponseData 项目资源分配

type PropertyEnumerate

type PropertyEnumerate struct {
	Name string `json:"name"`
	ID   int64  `json:"id"`
}

type PropertyIssueType

type PropertyIssueType string
const (
	PropertyIssueTypeRequirement PropertyIssueType = "REQUIREMENT" // 需求
	PropertyIssueTypeTask        PropertyIssueType = "TASK"        // 任务
	PropertyIssueTypeBug         PropertyIssueType = "BUG"         // 缺陷
	PropertyIssueTypeEpic        PropertyIssueType = "EPIC"        // 史诗
	PropertyIssueTypeCommon      PropertyIssueType = "COMMON"      // 公用
)

func (PropertyIssueType) GetZhName

func (t PropertyIssueType) GetZhName() string

type PropertyType

type PropertyType string

字段类型

const (
	PropertyTypeText        PropertyType = "Text"        // 文本
	PropertyTypeNumber      PropertyType = "Number"      // 数字
	PropertyTypeSelect      PropertyType = "Select"      // 单选
	PropertyTypeMultiSelect PropertyType = "MultiSelect" // 多选
	PropertyTypeDate        PropertyType = "Date"        // 日期
	PropertyTypePerson      PropertyType = "Person"
	PropertyTypeCheckBox    PropertyType = "CheckBox"
	PropertyTypeURL         PropertyType = "URL"
	PropertyTypeEmail       PropertyType = "Email"
	PropertyTypePhone       PropertyType = "Phone"
)

func (PropertyType) IsCanChange

func (pt PropertyType) IsCanChange(newpt PropertyType) bool

字段类型转换的校验

func (PropertyType) IsNumber

func (pt PropertyType) IsNumber() bool

func (PropertyType) IsOptions

func (pt PropertyType) IsOptions() bool

type ProxyAPIBody

type ProxyAPIBody struct {
	Type    string          `json:"type"`
	Content json.RawMessage `json:"content"`
}

type ProxyAPIRequestInfo

type ProxyAPIRequestInfo struct {
	Host    string       `json:"host"`
	URL     string       `json:"url"`
	Method  string       `json:"method"`
	Headers http.Header  `json:"headers"`
	Params  url.Values   `json:"params"`
	Body    ProxyAPIBody `json:"body"`
}

type ProxyAPIs

type ProxyAPIs struct {
	ID        string        `json:"id"`
	Name      string        `json:"name"`
	Schema    string        `json:"schema"`
	URL       string        `json:"url"`
	Method    string        `json:"method"`
	Header    []APIHeader   `json:"header"`
	Params    []APIParam    `json:"params"`
	Body      ProxyAPIBody  `json:"body"`
	OutParams []APIOutParam `json:"outParams"`
	Asserts   [][]APIAssert `json:"asserts"`
}

type ProxyContent

type ProxyContent struct {
	Key   string
	Value string
}

type PublicItemAddEraseData

type PublicItemAddEraseData struct {
	Data     PublishItem `json:"data"`
	DeviceNo string      `json:"deviceNo"`
}

type PublicItemAddEraseResponse

type PublicItemAddEraseResponse struct {
	Header
	Data PublicItemAddEraseData `json:"data"`
}

type PublishItem

type PublishItem struct {
	ID               int64     `json:"id"`
	Name             string    `json:"name"`
	DisplayName      string    `json:"displayName"`
	PublisherID      int64     `json:"publisherId"`
	AK               string    `json:"ak"`
	AI               string    `json:"ai"`
	Type             string    `json:"type"`
	Public           bool      `json:"public"`
	OrgID            int64     `json:"orgId"`
	Desc             string    `json:"desc"`
	Creator          string    `json:"creator"`
	DownloadUrl      string    `json:"downloadUrl"`
	CreatedAt        time.Time `json:"createdAt"`
	UpdatedAt        time.Time `json:"updatedAt"`
	NoJailbreak      bool      `json:"noJailbreak"`      // 越狱控制
	GeofenceLon      float64   `json:"geofenceLon"`      // 地理围栏,坐标经度
	GeofenceLat      float64   `json:"geofenceLat"`      // 地理围栏,坐标纬度
	GeofenceRadius   float64   `json:"geofenceRadius"`   // 地理围栏,合理半径
	GrayLevelPercent int       `json:"grayLevelPercent"` // 灰度百分比,0-100
	LatestVersion    string    `json:"latestVersion"`    // 最新版本
	RefCount         uint64    `json:"refCount"`         // 被引用数
	PreviewImages    []string  `json:"previewImages"`    // 预览图
	BackgroundImage  string    `json:"backgroundImage"`  // 背景图
}

type PublishItemAddBlacklistResponse

type PublishItemAddBlacklistResponse struct {
	Header
	Data PublishItem `json:"data"`
}

type PublishItemCertificationListRequest

type PublishItemCertificationListRequest struct {
	PageNo        uint64 `query:"pageNo"`
	PageSize      uint64 `query:"pageSize"`
	UserID        uint64 `query:"userId"`
	DeviceNo      string `query:"deviceNo"`
	StartTime     uint64 `query:"start"`
	EndTime       uint64 `query:"end"`
	PublishItemID uint64 `query:"publishItemId"`
}

PublishItemCertificationListRequest 认证列表request

type PublishItemCertificationResponse

type PublishItemCertificationResponse struct {
	UserID        string    `json:"userId"`
	UserName      string    `json:"userName"`
	DeviceNo      string    `json:"deviceNo"`
	LastLoginTime time.Time `json:"lastLoginTime"`
}

type PublishItemDeleteBlacklistResponse

type PublishItemDeleteBlacklistResponse struct {
	Header
	Data PublishItemUserListResponse `json:"data"`
}

type PublishItemDistributionData

type PublishItemDistributionData struct {
	Default         *PublishItemVersion          `json:"default"`
	Versions        *QueryPublishItemVersionData `json:"versions"`
	Name            string                       `json:"name"`
	DisplayName     string                       `json:"displayName"`
	Desc            string                       `json:"desc"`
	CreatedAt       time.Time                    `json:"createdAt"`
	PreviewImages   []string                     `json:"previewImages"`   // 预览图
	BackgroundImage string                       `json:"backgroundImage"` // 背景图
}

type PublishItemDistributionResponse

type PublishItemDistributionResponse struct {
	Header
	Data PublishItemDistributionData `json:"data"`
}

type PublishItemEraseRequest

type PublishItemEraseRequest struct {
	DeviceNo    string `json:"deviceNo"`
	EraseStatus string `json:"status"`
	Ak          string `json:"ak"`
	Ai          string `json:"ai"`
}

PublishItemEraseRequest 更新数据擦除状态

type PublishItemMetricsCardinalityInterfaceResp

type PublishItemMetricsCardinalityInterfaceResp struct {
	Header
	Data CardinalityResultsInterface `json:"data"`
}

PublishItemMetricsCardinalityInterfaceResp 监控数据返回结构,data返回单个

type PublishItemMetricsCardinalityResp

type PublishItemMetricsCardinalityResp struct {
	Header
	Data CardinalityResults `json:"data"`
}

PublishItemMetricsCardinalityResp 监控数据返回结构

type PublishItemMetricsCardinalitySingleResp

type PublishItemMetricsCardinalitySingleResp struct {
	Header
	Data CardinalityResultsSingle `json:"data"`
}

PublishItemMetricsCardinalitySingleResp 监控数据返回结构,data返回单个

type PublishItemResponse

type PublishItemResponse struct {
	Header
	Data PublishItem `json:"data"`
}

PublishItemResponse 查询单个发布内容响应

type PublishItemSecuritySetRequest

type PublishItemSecuritySetRequest struct {
	NoJailbreak    string `query:"noJailbreak"`
	GeofenceLon    string `query:"geofenceLon"`    // 地理围栏,坐标经度
	GeofenceLat    string `query:"geofenceLat"`    // 地理围栏,坐标纬度
	GeofenceRadius string `query:"geofenceRadius"` // 地理围栏,合理半径
}

PublishItemSecuritySetRequest 设置用户设备安全状态

type PublishItemSecurityStatusRequest

type PublishItemSecurityStatusRequest struct {
	Ak       string  `query:"ak"`
	Ai       string  `query:"ai"`
	UserID   string  `query:"userId"`
	DeviceNo string  `query:"deviceNo"`
	Lon      float64 `query:"lon"`
	Lat      float64 `query:"lat"`
}

PublishItemSecurityStatusRequest 用户设备安全状态

type PublishItemSecurityStatusResponse

type PublishItemSecurityStatusResponse struct {
	InBlacklist    bool   `json:"inBlacklist"`
	InEraseList    bool   `json:"inEraselist"`
	EraseStatus    string `json:"eraseStatus"`
	NoJailbreak    bool   `json:"noJailbreak"`
	WithinGeofence bool   `json:"withinGeofence"`
}

PublishItemSecurityStatusResponse 用户设备安全状态返回

type PublishItemStatisticsDetailData

type PublishItemStatisticsDetailData struct {
	Header
	Data []PublishItemStatisticsDetailResponse `json:"data"`
}

PublishItemStatisticsDetailData 版本\渠道详情,明细数据接口返回

type PublishItemStatisticsDetailRequest

type PublishItemStatisticsDetailRequest struct {
	// EndTime 截止时间
	EndTime uint64 `query:"endTime"`
}

PublishItemStatisticsDetailRequest 版本\渠道详情,明细数据接口返回

type PublishItemStatisticsDetailResponse

type PublishItemStatisticsDetailResponse struct {
	// Key 版本、渠道信息
	Key string `json:"versionOrChannel"`
	// totalUsers 截止今日累计用户
	TotalUsers uint64 `json:"totalUsers"`
	// TotalUsersGrowth 截止今日累计用户占比
	TotalUsersGrowth string `json:"totalUsersGrowth"`
	// NewUsers 新增用户
	NewUsers uint64 `json:"newUsers"`
	// ActiveUsers 活跃用户
	ActiveUsers uint64 `json:"activeUsers"`
	// ActiveUsersGrowth 活跃用户占比
	ActiveUsersGrowth string `json:"activeUsersGrowth"`
	// Launches 启动次数
	Launches uint64 `json:"launches"`
	// UpgradeUser 升级用户
	UpgradeUser uint64 `json:"upgradeUser"`
}

PublishItemStatisticsVersionDetailResponse 版本\渠道详情,明细数据接口返回

type PublishItemStatisticsErrListData

type PublishItemStatisticsErrListData struct {
	Header
	Data []PublishItemStatisticsErrListResponse `json:"data"`
}

PublishItemStatisticsErrListData 错误报告、错误列表

type PublishItemStatisticsErrListResponse

type PublishItemStatisticsErrListResponse struct {
	// errSummary 错误摘要
	ErrSummary string `json:"errSummary"`
	// AppVersion 版本信息
	AppVersion string `json:"appVersion"`
	// TimeOfFirst 首次发生时间
	TimeOfFirst time.Time `json:"timeOfFirst"`
	// TimeOfRecent 最近发生时间
	TimeOfRecent time.Time `json:"timeOfRecent"`
	// TotalErr 累计错误计数
	TotalErr uint64 `json:"totalErr"`
	// AffectUsers 影响用户数
	AffectUsers uint64 `json:"affectUsers"`
}

PublishItemStatisticsErrListResponse 错误报告、错误列表

type PublishItemStatisticsErrTrendData

type PublishItemStatisticsErrTrendData struct {
	Header
	Data PublishItemStatisticsErrTrendResponse `json:"data"`
}

PublishItemStatisticsErrTrendData 错误报告、错误趋势

type PublishItemStatisticsErrTrendResponse

type PublishItemStatisticsErrTrendResponse struct {
	// CrashTimes 崩溃次数
	CrashTimes uint64 `json:"crashTimes"`
	// CrashRate 崩溃率
	CrashRate string `json:"crashRate"`
	// CrashRateGrowth 崩溃率同比增长率
	CrashRateGrowth float64 `json:"crashRateGrowth"`
	// AffectUsers 影响用户数
	AffectUsers uint64 `json:"affectUsers"`
	// AffectUsersProportion 影响用户占比
	AffectUsersProportion string `json:"affectUsersProportion"`
	// AffectUsersProportionGrowth 影响用户占比同比增长率
	AffectUsersProportionGrowth float64 `json:"affectUsersProportionGrowth"`
}

PublishItemStatisticsErrTrendResponse 错误报告、错误趋势

type PublishItemStatisticsTrendData

type PublishItemStatisticsTrendData struct {
	Header
	Data PublishItemStatisticsTrendResponse `json:"data"`
}

PublishItemStatisticsTrendData 统计大盘,整体趋势接口返回

type PublishItemStatisticsTrendResponse

type PublishItemStatisticsTrendResponse struct {
	// SevenDayAvgNewUsers 七日平均新用户
	SevenDayAvgNewUsers uint64 `json:"7dAvgNewUsers"`
	// SevenDayAvgNewUsersGrowth 七日平均新用户同比增长率
	SevenDayAvgNewUsersGrowth float64 `json:"7dAvgNewUsersGrowth"`
	// SevenDayAvgActiveUsers 七日平均活跃用户
	SevenDayAvgActiveUsers uint64 `json:"7dAvgActiveUsers"`
	// SevenDayAvgActiveUsersGrowth 七日平均活跃用户同比增长率
	SevenDayAvgActiveUsersGrowth float64 `json:"7dAvgActiveUsersGrowth"`
	// SevenDayAvgNewUsersRetention 七日平均新用户次日留存率
	SevenDayAvgNewUsersRetention string `json:"7dAvgNewUsersRetention"`
	// SevenDayAvgNewUsersRetentionGrowth 七日平均新用户次日留存率同比增长率
	SevenDayAvgNewUsersRetentionGrowth float64 `json:"7dAvgNewUsersRetentionGrowth"`
	// SevenDayAvgDuration 七日平均使用时长
	SevenDayAvgDuration string `json:"7dAvgDuration"`
	// SevenDayAvgDurationGrowth 七日平均使用时长同比增长率
	SevenDayAvgDurationGrowth float64 `json:"7dAvgDurationGrowth"`
	// SevenDayTotalActiveUsers 七日总活跃用户
	SevenDayTotalActiveUsers uint64 `json:"7dTotalActiveUsers"`
	// SevenDayTotalActiveUsersGrowth 七日总活跃用户同比增长率
	SevenDayTotalActiveUsersGrowth float64 `json:"7dTotalActiveUsersGrowth"`
	// MonthTotalActiveUsers 30日总活跃用户
	MonthTotalActiveUsers uint64 `json:"monthTotalActiveUsers"`
	// MonthTotalActiveUsersGrowth 30日总活跃用户同比增长率
	MonthTotalActiveUsersGrowth float64 `json:"monthTotalActiveUsersGrowth"`
	// TotalUsers 总用户数
	TotalUsers uint64 `json:"totalUsers"`
	// TotalCrashRate 总崩溃率
	TotalCrashRate string `json:"totalCrashRate"`
}

PublishItemStatisticsTrendResponse 统计大盘,整体趋势接口返回

type PublishItemUserListResponse

type PublishItemUserListResponse struct {
	ID              uint64    `json:"id"`
	UserID          string    `json:"userId"`
	UserName        string    `json:"userName"`
	EraseStatus     string    `json:"eraseStatus"`
	DeviceNo        string    `json:"deviceNo"`
	PublishItemID   uint64    `json:"publishItemId"`
	CreatedAt       time.Time `json:"createdAt"`
	PublishItemName string    `json:"publishItemName"`
}

PublishItemUserlistResponse 添加黑、白名单返回

type PublishItemUserlistData

type PublishItemUserlistData struct {
	List  []*PublishItemUserListResponse `json:"list"`
	Total uint64                         `json:"total"`
}

PublishItemUserlistData 添加黑、白名单返回结构

type PublishItemUserlistRequest

type PublishItemUserlistRequest struct {
	PageNo        uint64 `json:"pageNo"`
	PageSize      uint64 `json:"pageSize"`
	UserID        string `json:"userId"`
	UserName      string `json:"userName"`
	DeviceNo      string `json:"deviceNo"`
	PublishItemID uint64 `json:"publishItemId"`
	Operator      string `json:"operator"`
}

PublishItemUserlistRequest 添加黑、白名单

type PublishItemVersion

type PublishItemVersion struct {
	ID               uint64                   `json:"id"`
	Version          string                   `json:"version"`
	BuildID          string                   `json:"buildId"`
	PackageName      string                   `json:"packageName"`
	Public           bool                     `json:"public"`
	IsDefault        bool                     `json:"isDefault"`
	Desc             string                   `json:"desc"`
	Resources        interface{}              `json:"resources"` //版本资源信息
	Meta             interface{}              `json:"meta"`      //元信息,项目应用id等
	Swagger          interface{}              `json:"swagger"`   //api定义
	OrgID            int64                    `json:"orgId"`
	CreatedAt        time.Time                `json:"createdAt"`
	UpdatedAt        time.Time                `json:"updatedAt"`
	Spec             string                   `json:"spec"`
	Readme           string                   `json:"readme"`
	MobileType       string                   `json:"mobileType"`
	TargetMobiles    map[string][]string      `json:"targetMobiles"` // h5包目标版本信息
	VersionStates    PublishItemVersionStates `json:"versionStates"`
	GrayLevelPercent int                      `json:"grayLevelPercent"` // 灰度百分比,0-100
}

type PublishItemVersionStates

type PublishItemVersionStates string

PublishItemVersionStates 版本状态 release或者beta

const (
	PublishItemReleaseVersion PublishItemVersionStates = "release"
	PublishItemBetaVersion    PublishItemVersionStates = "beta"
)

type PublisherCreateRequest

type PublisherCreateRequest struct {
	Name          string `json:"name"`
	PublisherType string `json:"publisherType"`
	Desc          string `json:"desc"`
	OrgID         uint64 `json:"orgId"`
}

PublisherCreateRequest POST /api/publishers 创建Publisher请求结构

type PublisherCreateResponse

type PublisherCreateResponse struct {
	Header
	Data uint64 `json:"data"`
}

PublisherCreateResponse POST /api/publishers 创建Publisher响应结构

type PublisherDTO

type PublisherDTO struct {
	ID            uint64    `json:"id"`
	Name          string    `json:"name"`
	PublisherType string    `json:"publishType"`
	PublisherKey  string    `json:"publishKey"`
	OrgID         uint64    `json:"orgId"`
	Creator       string    `json:"creator"`
	Desc          string    `json:"desc"`
	Joined        bool      `json:"joined"`    // 用户是否已加入Publisher
	CreatedAt     time.Time `json:"createdAt"` // Publisher创建时间
	UpdatedAt     time.Time `json:"updatedAt"` // Publisher更新时间

	NexusRepositories    []*NexusRepository `json:"nexusRepositories"`
	PipelineCmNamespaces []string           `json:"pipelineCmNamespaces"` // 同步 nexus 配置至 pipeline cm
}

PublisherDTO Publisher结构

type PublisherDeleteResponse

type PublisherDeleteResponse struct {
	Header
	Data uint64 `json:"data"`
}

PublisherDeleteResponse DELETE /api/publishers/{publisherId} 删除Publisher响应结构

type PublisherDetailResponse

type PublisherDetailResponse struct {
	Header
	Data PublisherDTO `json:"data"`
}

PublisherDetailResponse GET /api/publishers/{publisherId} Publisher详情响应结构

type PublisherListRequest

type PublisherListRequest struct {
	OrgID uint64 `query:"orgId"`

	// 是否只展示已加入的 Publisher
	Joined bool `query:"joined"`

	// 对Publisher名进行like查询
	Query    string `query:"q"`
	Name     string `query:"name"`
	PageNo   int    `query:"pageNo"`
	PageSize int    `query:"pageSize"`
}

PublisherListRequest GET /api/publishers 获取Publisher列表请求

type PublisherListResponse

type PublisherListResponse struct {
	Header
	Data PagingPublisherDTO `json:"data"`
}

PublisherListResponse GET /api/publishers 查询Publisher响应

type PublisherType

type PublisherType string
const (
	// 移动应用
	MobilePublisher PublisherType = "mobile"
)

Publisher 类型

type PublisherUpdateRequest

type PublisherUpdateRequest struct {
	ID   uint64 `json:"id"`
	Desc string `json:"desc"`
}

PublisherUpdateRequest PUT /api/publishers 更新Publisher请求结构

type PublisherUpdateResponse

type PublisherUpdateResponse struct {
	Header
	Data interface{} `json:"data"`
}

PublisherUpdateResponse PUT /api/publishers/{publisherId} 更新Publisher响应结构

type PumpType

type PumpType string

type PushCertificateConfigs

type PushCertificateConfigs struct {
	Enable          bool                     `json:"enable"`
	Envs            []DiceWorkspace          `json:"envs,omitempty"`
	CertificateType CertificateType          `json:"certificateType,omitempty"`
	IOSKey          IOSCertificateKeyDTO     `json:"iosKey,omitempty"`
	AndroidKey      AndroidCertificateKeyDTO `json:"androidKey,omitempty"`
	MessageKey      MessageCertificateKeyDTO `json:"messageKey,omitempty"`
}

PushCertificateConfigs 证书配置信息

type PushCertificateConfigsRequest

type PushCertificateConfigsRequest struct {
	Enable          bool                     `json:"enable"`
	AppID           uint64                   `json:"appId"`
	CertificateID   uint64                   `json:"certificateId"`
	CertificateType CertificateType          `json:"certificateType"`
	Envs            []DiceWorkspace          `json:"envs"`
	IOSKey          IOSCertificateKeyDTO     `json:"iosKey"`
	AndroidKey      AndroidCertificateKeyDTO `json:"androidKey"`
	MessageKey      MessageCertificateKeyDTO `json:"messageKey"`
}

PushCertificateConfigsRequest POST /api/certificates/actions/push-configs 推送证书配置到配置管理

type PushTrigger

type PushTrigger struct {
	Branches []string `yaml:"branches,omitempty" json:"branches,omitempty"`
	Tags     []string `yaml:"tags,omitempty" json:"tags,omitempty"`
}

type Pusher

type Pusher struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	NickName string `json:"nickname"`
	Email    string `json:"email"`
	Role     string `json:"role"`
}

Pusher 提交代码的用户信息

type PwdSecurityConfig

type PwdSecurityConfig struct {
	// 密码错误弹出图片验证码次数
	CaptchaChallengeNumber int `json:"captchaChallengeNumber"`
	// 连续密码错误次数
	ContinuousPwdErrorNumber int `json:"continuousPwdErrorNumber"`
	// 24小时内累计密码错误次数
	MaxPwdErrorNumber int `json:"maxPwdErrorNumber"`
	// 强制重密码周期,单位:月
	ResetPassWordPeriod int `json:"resetPassWordPeriod"`
}

PwdSecurityConfig 密码安全配置

type PwdSecurityConfigGetResponse

type PwdSecurityConfigGetResponse struct {
	Header
	Data *PwdSecurityConfig `json:"data"`
}

PwdSecurityConfigGetResponse 密码安全配置查询结果

type PwdSecurityConfigUpdateRequest

type PwdSecurityConfigUpdateRequest struct {
	PwdSecurityConfig
}

PwdSecurityConfigUpdateRequest 密码安全配置更新请求

type PwdSecurityConfigUpdateResponse

type PwdSecurityConfigUpdateResponse struct {
	Header
}

PwdSecurityConfigUpdateResponse 密码安全配置更新结果

type QaBuildCreateResponse

type QaBuildCreateResponse struct {
	Header
	Data QaBuildCreateResponseData `json:"data"`
}

QaBuildCreateResponse

type QaBuildCreateResponseData

type QaBuildCreateResponseData struct {
	ID   int64  `json:"id"`
	UUID string `json:"uuid"`
}

QaBuildCreateResponseData

type QueryAppPublishItemRelationGroupByENVResponse

type QueryAppPublishItemRelationGroupByENVResponse struct {
	Header
	Data map[string]AppPublishItemRelation `json:"data"`
}

type QueryAppPublishItemRelationRequest

type QueryAppPublishItemRelationRequest struct {
	AppID         int64  `query:"appID"`
	PublishItemID int64  `query:"publishItemID"`
	AK            string `query:"ak"`
	AI            string `query:"ai"`
}

type QueryAppPublishItemRelationResponse

type QueryAppPublishItemRelationResponse struct {
	Header
	Data []AppPublishItemRelation
}

type QueryBranchRuleRequest

type QueryBranchRuleRequest struct {
	ProjectID int64 `query:"projectId"`
	AppID     int64 `query:"appId"`
}

type QueryBranchRuleResponse

type QueryBranchRuleResponse struct {
	Header
	Data []*BranchRule `json:"data"`
}

type QueryCheckRunRequest

type QueryCheckRunRequest struct {
	Commit string `query:"commit"`
}

QueryCheckRunRequest

type QueryCheckRunResponse

type QueryCheckRunResponse struct {
	Header
	Data []*CheckRun `json:"data"`
}

QueryCheckRunResponse

type QueryMBoxData

type QueryMBoxData struct {
	List  []*MBox `json:"list"`
	Total int     `json:"total"`
}

QueryMBoxData 站内信记录结构

type QueryMBoxRequest

type QueryMBoxRequest struct {
	PageNo   int64      `query:"pageNo"`
	PageSize int64      `query:"pageSize"`
	Label    string     `query:"label"`
	Status   MBoxStatus `query:"status"`
	OrgID    int64      `json:"-"`
	UserID   string     `json:"-"`
}

QueryMBoxRequest 查询通知发送记录请求

type QueryMBoxResponse

type QueryMBoxResponse struct {
	Header
	Data QueryMBoxData `json:"data"`
}

QueryMBoxResponse 查询通知历史纪录响应

type QueryMBoxStatsData

type QueryMBoxStatsData struct {
	UnreadCount int `json:"unreadCount"`
}

type QueryMBoxStatsResponse

type QueryMBoxStatsResponse struct {
	Header
	Data QueryMBoxStatsData `json:"data"`
}

QueryMBoxStats 查询站内信统计信息

type QueryMergeRequestsData

type QueryMergeRequestsData struct {
	List  []*MergeRequestInfo `json:"list"`
	Total int                 `json:"total"`
}

QueryMergeRequestsData 查询mr响应数据

type QueryNotifyData

type QueryNotifyData struct {
	List  []*NotifyDetail `json:"list"`
	Total int             `json:"total"`
}

QueryNotifyData 通知列表数据结构

type QueryNotifyGroupData

type QueryNotifyGroupData struct {
	List  []*NotifyGroup `json:"list"`
	Total int            `json:"total"`
}

QueryNotifyGroupData 通知组列表数据结构

type QueryNotifyGroupRequest

type QueryNotifyGroupRequest struct {
	PageNo      int64  `query:"pageNo"`
	PageSize    int64  `query:"pageSize"`
	ScopeType   string `query:"scopeType"`
	ScopeID     string `query:"scopeID"`
	Label       string `query:"label"`
	ClusterName string `query:"clusterName"`
	// 通知组名字
	Names []string `query:"names"`
}

QueryNotifyGroupRequest 查询通知组列表请求

type QueryNotifyGroupResponse

type QueryNotifyGroupResponse struct {
	Header
	UserInfoHeader
	Data QueryNotifyGroupData `json:"data"`
}

QueryNotifyGroupResponse 查询通知组列表响应

type QueryNotifyHistoryData

type QueryNotifyHistoryData struct {
	List  []*NotifyHistory `json:"list"`
	Total int              `json:"total"`
}

QueryNotifyHistoryData 通知发送记录结构

type QueryNotifyHistoryRequest

type QueryNotifyHistoryRequest struct {
	PageNo      int64  `query:"pageNo"`
	PageSize    int64  `query:"pageSize"`
	NotifyName  string `query:"notifyName"`
	StartTime   string `query:"startTime"`
	EndTime     string `query:"endTime"`
	Channel     string `query:"channel"`
	Label       string `query:"label"`
	ClusterName string `query:"clusterName"`
	OrgID       int64  `json:"-"`
}

QueryNotifyHistoryRequest 查询通知发送记录请求

type QueryNotifyHistoryResponse

type QueryNotifyHistoryResponse struct {
	Header
	Data QueryNotifyHistoryData `json:"data"`
}

QueryNotifyHistoryResponse 查询通知历史纪录响应

type QueryNotifyItemData

type QueryNotifyItemData struct {
	List  []*NotifyItem `json:"list"`
	Total int           `json:"total"`
}

QueryNotifyItemData 通知项列表数据结构

type QueryNotifyItemRequest

type QueryNotifyItemRequest struct {
	PageNo    int64  `query:"pageNo"`
	PageSize  int64  `query:"pageSize"`
	Category  string `query:"category"`
	Label     string `json:"label"`
	ScopeType string `query:"scopeType"`
}

QueryNotifyItemRequest 查询通知项列表请求

type QueryNotifyItemResponse

type QueryNotifyItemResponse struct {
	Header
	Data QueryNotifyItemData `json:"data"`
}

QueryNotifyItemResponse 查询通知项列表请求

type QueryNotifyRequest

type QueryNotifyRequest struct {
	PageNo      int64  `query:"pageNo"`
	PageSize    int64  `query:"pageSize"`
	GroupDetail bool   `query:"groupDetail"`
	ScopeType   string `query:"scopeType"`
	ScopeID     string `query:"scopeId"`
	Label       string `query:"label"`
	ClusterName string `query:"clusterName"`
	OrgID       int64  `json:"-"`
}

QueryNotifyRequest 查询通知列表请求

type QueryNotifyResponse

type QueryNotifyResponse struct {
	Header
	Data QueryNotifyData `json:"data"`
}

QueryNotifyResponse 查询通知列表响应

type QueryPublishItemData

type QueryPublishItemData struct {
	List  []*PublishItem `json:"list"`
	Total int            `json:"total"`
}

QueryPublishItemData 发布内容列表数据结构

type QueryPublishItemRequest

type QueryPublishItemRequest struct {
	PageNo      int64  `query:"pageNo"`
	PageSize    int64  `query:"pageSize"`
	PublisherId int64  `query:"publisherId"`
	Name        string `query:"name"`
	Type        string `query:"type"`
	Public      string `query:"public"`
	Q           string `query:"q"`   // 模糊查询关键字
	Ids         string `query:"ids"` //批量id查询,用,分割
	OrgID       int64  `json:"-"`
}

QueryPublishItemRequest 查询发布内容请求

type QueryPublishItemResponse

type QueryPublishItemResponse struct {
	Header
	Data QueryPublishItemData `json:"data"`
}

QueryPublishItemResponse 查询发布内容响应

type QueryPublishItemVersionData

type QueryPublishItemVersionData struct {
	List  []*PublishItemVersion `json:"list"`
	Total int                   `json:"total"`
}

QueryPublishItemVersionData 发布版本数据结构

type QueryPublishItemVersionRequest

type QueryPublishItemVersionRequest struct {
	Public      string       `query:"public"`
	PageNo      int64        `query:"pageNo"`
	PageSize    int64        `query:"pageSize"`
	MobileType  ResourceType `query:"mobileType"`
	PackageName string       `query:"packageName"`
	ItemID      int64        `json:"-"`
	OrgID       int64        `json:"-"`
	IsDefault   string       `json:"-"`
}

QueryPublishItemVersionRequest 查询发布版本请求

type QueryPublishItemVersionResponse

type QueryPublishItemVersionResponse struct {
	Header
	Data QueryPublishItemVersionData `json:"data"`
}

QueryPublishItemVersionResponse 查询发布版本响应

type QueryRunnerTaskRequest

type QueryRunnerTaskRequest struct {
	TaskID string
}

type QueryRunnerTaskResponse

type QueryRunnerTaskResponse struct {
	Header
	Data RunnerTask `json:"data"`
}

type QuerySourceNotifyResponse

type QuerySourceNotifyResponse struct {
	Header
	Data []*NotifyDetail `json:"data"`
}

QuerySourceNotifyResponse 查询通知列表响应

type QueueValidateRetryOption

type QueueValidateRetryOption struct {
	IntervalSecond uint64 `json:"intervalSecond"`
}

type RecordData

type RecordData struct {
	CreateTime    time.Time `json:"createTime"`
	RecordID      string    `json:"recordID"`
	RecordType    string    `json:"recordType"`
	RawRecordType string    `json:"rawRecordType"`
	UserID        string    `json:"userID"`
	OrgID         uint64    `json:"orgID"`
	ClusterName   string    `json:"clusterName"`
	Status        string    `json:"status"`
	Detail        string    `json:"detail"`

	PipelineDetail *PipelineDetailDTO `json:"pipelineDetail"`
}

type RecordRequest

type RecordRequest struct {
	RecordIDs    []string `json:"recordIDs"`
	ClusterNames []string `json:"clusterNames"`
	Statuses     []string `json:"statuses"`
	UserIDs      []string `json:"userIDs"`
	RecordTypes  []string `json:"recordTypes"`
	PipelineIDs  []string `json:"pipelineIDs"`
	PageSize     int      `json:"pageSize"`
	PageNo       int      `json:"pageNo"`
	OrgID        string   `json:"orgID"`
}

type RecordTypeData

type RecordTypeData struct {
	RecordType    string `json:"recordType"`
	RawRecordType string `json:"rawRecordType"`
}

type RecordTypeListResponse

type RecordTypeListResponse struct {
	Header
	Data []RecordTypeData `json:"data"`
}

type RecordUpdateRequest

type RecordUpdateRequest struct {
	ClusterName string `json:"cluster_name"`
	UserID      string `json:"userID"`
	OrgID       string `json:"orgID"`
	RecordType  string `json:"recordType"`
	PageSize    int    `json:"pageSize"`
}

type RecordsData

type RecordsData struct {
	Total int64        `json:"total"`
	List  []RecordData `json:"list"`
}

type RecordsRequest

type RecordsRequest struct {
	// optional
	RecordIDs []uint64 `query:"recordIDs"`
	// optional
	ClusterName string `query:"clusterName"`
	// enum: success, failed, processing
	// 多个值为'或'关系
	// optional
	Status []string `query:"status"`
	// optional
	UserIDs []string `query:"userIDs"`
	// enum: addNodes, setLabels
	// 多个值为'或'关系
	// optional
	RecordType []string `query:"recordType"`
	// optional
	PipelineIDs []string `query:"pipelineIDs"`

	PageNo   int `query:"pageNo"`
	PageSize int `query:"pageSize"`
}

RecordsRequest 所有查询条件'与'关系, 如果字段为空则忽略

type RecordsResponse

type RecordsResponse struct {
	Header
	UserInfoHeader
	Data RecordsData `json:"data"`
}

type RecordsResponseData

type RecordsResponseData struct {
	UserInfoHeader
	Data RecordsData `json:"data"`
}

type RegistryAuthJson

type RegistryAuthJson struct {
	Auths map[string]RegistryUserInfo `json:"auths"`
}

type RegistryManifestsRemoveRequest

type RegistryManifestsRemoveRequest struct {
	Images      []string `json:"images"`      // 待删除元数据的镜像列表
	RegistryURL string   `json:"registryURL"` // Registry地址, 接口自动根据集群配置赋值
}

RegistryManifestsRemoveRequest 删除指定集群Registry镜像元数据请求 POST /api/clusters/{idOrName}/registry/manifests/actions/remove

type RegistryManifestsRemoveResponse

type RegistryManifestsRemoveResponse struct {
	Header
	Data RegistryManifestsRemoveResponseData `json:"data"`
}

RegistryManifestsRemoveResponse 删除指定集群Registry镜像元数据响应

type RegistryManifestsRemoveResponseData

type RegistryManifestsRemoveResponseData struct {
	// 删除元数据成功的镜像列表
	Succeed []string `json:"succeed"`

	// 删除元数据失败的镜像列表和失败原因
	Failed map[string]string `json:"failed"`
}

RegistryManifestsRemoveResponseData 删除指定集群Registry镜像元数据成功和失败信息

type RegistryReadonlyResponse

type RegistryReadonlyResponse struct {
	Header
	Data bool `json:"data"` // true只读, false读写
}

RegistryReadonlyResponse 查询指定集群Registry是否只读状态响应 GET /api/clusters/{idOrName}/registry/readonly

type RegistryUserInfo

type RegistryUserInfo struct {
	Auth string `json:"auth"`
}

RegistryAuthJson dockerRegistry的认证串

type RelationDTO

type RelationDTO struct {
	SourceAttr string `json:"sourceAttr"`
	RelAttr    string `json:"relAttr"`
	IsPK       bool   `json:"isPK"`
}

type ReleaseCreateRequest

type ReleaseCreateRequest struct {
	// ReleaseName 任意字符串,便于用户识别,最大长度255,必填
	ReleaseName string `json:"releaseName"`

	// Desc 详细描述此release功能, 选填
	Desc string `json:"desc,omitempty"`

	// Dice 资源类型为diceyml时, 存储dice.yml内容, 选填
	Dice string `json:"dice,omitempty"`

	// Addon addon注册时,release包含dice.yml与addon.yml,选填
	Addon string `json:"addon,omitempty"`

	// Labels 用于release分类,描述release类别,map类型, 最大长度1000, 选填
	Labels map[string]string `json:"labels,omitempty"`

	// Version 存储release版本信息, 同一企业同一项目同一应用下唯一,最大长度100,选填
	Version string `json:"version,omitempty"`

	// OrgID 企业标识符,描述release所属企业,选填
	OrgID int64 `json:"orgId,omitempty"`

	// ProjectID 项目标识符,描述release所属项目,选填
	ProjectID int64 `json:"projectId,omitempty"`

	// ApplicationID 应用标识符,描述release所属应用,选填
	ApplicationID int64 `json:"applicationId,omitempty"`

	// ProjectName 项目名称,描述release所属项目,选填
	ProjectName string `json:"projectName,omitempty"`

	// ApplicationName 应用名称,描述release所属应用,选填
	ApplicationName string `json:"applicationName,omitempty"`

	// UserID 用户标识符, 描述release所属用户,最大长度50,选填
	UserID string `json:"userId,omitempty"`

	// ClusterName 集群名称,描述release所属集群,最大长度80,选填
	ClusterName string `json:"clusterName,omitempty"`

	// Resources release包含的资源,包含类型、名称、资源存储路径, 为兼容现有diceyml,先选填
	Resources []ReleaseResource `json:"resources,omitempty"`

	// CrossCluster 跨集群
	CrossCluster bool `json:"crossCluster,omitempty"`
}

ReleaseCreateRequest 创建Release API(POST /api/releases)使用

type ReleaseCreateResponse

type ReleaseCreateResponse struct {
	Header
	Data ReleaseCreateResponseData `json:"data"`
}

ReleaseCreateResponse 创建 release API响应数据结构

type ReleaseCreateResponseData

type ReleaseCreateResponseData struct {
	ReleaseID string `json:"releaseId"`
}

ReleaseCreateResponseData 创建 release 实际返回数据

type ReleaseDeleteRequest

type ReleaseDeleteRequest struct {
	ReleaseID string `json:"-" path:"releaseId"`
}

ReleaseDeleteRequest 删除 release API(DELETE /api/releases/{releaseId})使用

type ReleaseDeleteResponse

type ReleaseDeleteResponse struct {
	Header
	Data string `json:"data"` // Delete succ
}

ReleaseDeleteResponse 删除 release API响应数据结构

type ReleaseEvent

type ReleaseEvent struct {
	EventHeader
	Content ReleaseEventData `json:"content"`
}

ReleaseEvent Release创建、更新、删除时发送事件 event: release

type ReleaseEventData

type ReleaseEventData ReleaseGetResponseData

ReleaseEventData release 事件格式

type ReleaseGetDiceYmlRequest

type ReleaseGetDiceYmlRequest struct {
	ReleaseID string `json:"-" path:"releaseId"`
}

ReleaseGetDiceYmlRequest release 请求 dice.yml 格式

type ReleaseGetRequest

type ReleaseGetRequest struct {
	ReleaseID string `json:"-" path:"releaseId"`
}

ReleaseGetRequest release详情 API(GET /api/releases/{releaseId})使用

type ReleaseGetResponse

type ReleaseGetResponse struct {
	Header
	Data ReleaseGetResponseData `json:"data"`
}

ReleaseGetResponse release 详情API响应数据结构

type ReleaseGetResponseData

type ReleaseGetResponseData struct {
	ReleaseID   string            `json:"releaseId"`
	ReleaseName string            `json:"releaseName"`
	Diceyml     string            `json:"diceyml"`
	Desc        string            `json:"desc,omitempty"`
	Addon       string            `json:"addon,omitempty"`
	Resources   []ReleaseResource `json:"resources,omitempty"`
	Images      []string          `json:"images,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Version     string            `json:"version,omitempty"`

	// CrossCluster 是否可以跨集群
	CrossCluster bool `json:"crossCluster,omitempty"`

	// 当前被部署次数
	Reference int64 `json:"reference"`

	// 企业标识
	OrgID int64 `json:"orgId"`

	// 项目Id
	ProjectID int64 `json:"projectId"`

	// 应用Id
	ApplicationID int64 `json:"applicationId"`

	// 项目Name
	ProjectName string `json:"projectName"`

	// 应用Name
	ApplicationName string `json:"applicationName"`

	// 操作用户Id
	UserID string `json:"userId,omitempty"`

	// 集群名称
	ClusterName string    `json:"clusterName"`
	CreatedAt   time.Time `json:"createdAt"`
	UpdatedAt   time.Time `json:"updatedAt"`
}

ReleaseGetResponseData release 详情API实际返回数据

type ReleaseListRequest

type ReleaseListRequest struct {
	// 查询参数,releaseId/releaseName/version
	Query string `json:"-" query:"q"` // 查询参数,可根据releaseId/releaseName/version模糊匹配

	// release 名字精确匹配
	ReleaseName string `json:"-" query:"releaseName"`

	// 集群名称
	Cluster string `json:"-" query:"cluster"`

	// 分支名
	Branch string `json:"-" query:"branchName"`

	// 只列出有 version 的 release
	IsVersion bool `json:"-" query:"isVersion"`

	// 跨集群
	CrossCluster *bool `json:"-" query:"crossCluster"`

	// 跨集群或指定集群
	CrossClusterOrSpecifyCluster *string `json:"-" query:"crossClusterOrSpecifyCluster"`

	// 应用Id
	ApplicationID int64 `json:"-" query:"applicationId"`

	// 项目ID
	ProjectID int64 `json:"-" query:"projectId"`

	// 开始时间, ms
	StartTime int64 `json:"-" query:"startTime"`

	// 结束时间,ms
	EndTime int64 `json:"-" query:"endTime"`

	// 分页大小,默认值20
	PageSize int64 `json:"-" query:"pageSize"`

	// 当前页号,默认值1
	PageNum int64 `json:"-" query:"pageNo"`
}

ReleaseListRequest release列表 API(GET /api/releases)使用

func (ReleaseListRequest) ConvertToQueryParams

func (req ReleaseListRequest) ConvertToQueryParams() url.Values

type ReleaseListResponse

type ReleaseListResponse struct {
	Header
	Data ReleaseListResponseData `json:"data"`
}

ReleaseListResponse release 列表API响应数据结构

type ReleaseListResponseData

type ReleaseListResponseData struct {
	// release总数,用于分页
	Total    int64                    `json:"total"`
	Releases []ReleaseGetResponseData `json:"list"`
}

ReleaseListResponseData release 列表API实际响应数据

type ReleaseNameListRequest

type ReleaseNameListRequest struct {
	// 应用Id
	ApplicationID int64 `json:"-" query:"applicationId"`
}

ReleaseNameListRequest releaseName列表请求

type ReleaseNameListResponse

type ReleaseNameListResponse struct {
	Header
	Data []string `json:"data"`
}

ReleaseNameListResponse releaseName列表响应

type ReleasePullRequest

type ReleasePullRequest struct {
	ReleaseID string `json:"-" path:"releaseId"`
}

ReleasePullRequest release dice.yml内容获取API(GET /api/releases/<releaseId>/actions/pull)

type ReleaseReferenceUpdateRequest

type ReleaseReferenceUpdateRequest struct {
	ReleaseID string `json:"-" path:"releaseId"`
	Increase  bool   `json:"increase"` // true:reference+1  false:reference-1
}

ReleaseReferenceUpdateRequest 更新Reference API(/api/releases/{releaseId}/reference/actions/change)使用

type ReleaseResource

type ReleaseResource struct {

	// 资源类型
	Type ResourceType `json:"type"`

	// 资源名称
	Name string `json:"name"`

	// 资源URL, 可wget获取
	URL string `json:"url"`

	Meta map[string]interface{} `json:"meta"`
}

ReleaseResource release资源结构

type ReleaseUpdateRequest

type ReleaseUpdateRequest struct {
	ReleaseID string                   `json:"-" path:"releaseId"`
	Body      ReleaseUpdateRequestData `json:"body"`
}

ReleaseUpdateRequest 更新 release API(PUT /api/releases/{releaseId})使用

type ReleaseUpdateRequestData

type ReleaseUpdateRequestData struct {
	Version string `json:"version,omitempty"`
	Desc    string `json:"desc,omitempty"`

	// 企业标识
	OrgID int64 `json:"orgId"`

	// 项目Id
	ProjectID int64 `json:"projectId"`

	// 应用Id
	ApplicationID int64 `json:"applicationId"`
}

ReleaseUpdateRequestData 更新 release 请求数据结构

type ReleaseUpdateResponse

type ReleaseUpdateResponse struct {
	Header
	Data string `json:"data"` // Update succ
}

ReleaseUpdateResponse 更新 release API 响应数据结构

type RemoteActionRequest

type RemoteActionRequest struct {
	OrgID                string            `json:"orgID"`
	ClusterName          string            `json:"clusterName"`
	Product              string            `json:"product"`
	Version              string            `json:"version"`
	ActionName           string            `json:"actionName"`
	LocationServiceCode  string            `json:"locationServiceCode"`
	LocationEndpointType string            `json:"locationEndpointType"`
	Scheme               string            `json:"scheme"`
	QueryParams          map[string]string `json:"queryParams"`
	Headers              map[string]string `json:"headers"`
	FormParams           map[string]string `json:"formParams"`
	EndpointMap          map[string]string `json:"endpointMap"`
	EndpointType         string            `json:"endpointType"`
}

type RemoveAppPublishItemRelationsRequest

type RemoveAppPublishItemRelationsRequest struct {
	PublishItemId int64 `json:"publishItemId"`
}

type RemoveAppPublishItemRelationsResponse

type RemoveAppPublishItemRelationsResponse struct {
	Header
}

type RenameAPIDocBody

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

type RendingItem

type RendingItem struct {
	Name  string         `json:"name" yaml:"name"`
	State []RendingState `json:"state" yaml:"state"`
}

type RendingState

type RendingState struct {
	Name  string `json:"name" yaml:"name"`
	Value string `json:"value" yaml:"value"`
}

type RepoBranchEvent

type RepoBranchEvent struct {
	EventHeader
	Content BranchInfo `json:"content"`
}

RepoBranchEvent 分支事件

type RepoCreateMrEvent

type RepoCreateMrEvent struct {
	EventHeader
	Content MergeRequestInfo `json:"content"`
}

type RepoFiles

type RepoFiles struct {
	ID        uint64
	RepoID    int64
	Remark    string
	UUID      string     `json:"uuid"`
	CommitID  string     `json:"commitId"`
	DeletedAt *time.Time `json:"deleted_at"`
}

仓库备份文件信息

type RepoTagEvent

type RepoTagEvent struct {
	EventHeader
	Content TagInfo `json:"content"`
}

RepoBranchEvent 分支事件

type ReportTask

type ReportTask struct {
	ID          uint64 `json:"id"`
	Name        string `json:"name"`
	Scope       string `json:"scope"`
	ScopeID     string `json:"scopeId"`
	DashboardId string `json:"dashboardId"`
	Enable      bool   `json:"enable"`
	CreatedAt   int64  `json:"createdAt"`
	UpdatedAt   int64  `json:"updatedAt"`
}

ReportTask

type Repository

type Repository struct {
	ProjectID      int    `json:"project_id"`
	OrganizationID int    `json:"organization_id"`
	ApplicationID  int64  `json:"application_id"`
	Organization   string `json:"organization"`
	Repository     string `json:"repository"`
	URL            string `json:"url"`
}

Repository represents a Git repository

type RequestBody

type RequestBody struct {
	MediaType string           `json:"mediaType"`
	Body      *openapi3.Schema `json:"body"`
}

RequestBody is specified by OpenAPI/Swagger 3.0 standard.

type RequestHeader

type RequestHeader struct {
	Locale string
}

RequestHeader 统一的 request

type RequestVolumeInfo

type RequestVolumeInfo struct {
	ID            string `json:"id"`
	Type          string `json:"type"`
	ContainerPath string `json:"containerPath"`
}

type Require

type Require struct {
	Type     string    `json:"type"`
	Packages []Package `json:"packages"`
}

type RequirementGroupResult

type RequirementGroupResult struct {
	ID    uint64 `json:"id"`    // 需求 id
	State int64  `json:"state"` // 任务状态
	Count int    `json:"count"` // 任务状态任务数
}

RequirementGroupResult 需求下任务统计

type Resource

type Resource struct {
	Type     string      `json:"type"`
	Resource interface{} `json:"resource"`
}

Resource 查找到的资源

type ResourceInsufficientInfo

type ResourceInsufficientInfo struct {
	Code        string `json:"code,omitempty"`
	Description string `json:"description,omitempty"`
}

ResourceInsufficientInfo 描述部署过程中资源不足的信息

func (*ResourceInsufficientInfo) AddResourceInfo

func (r *ResourceInsufficientInfo) AddResourceInfo(info string)

AddResourceInfo 添加资源信息

func (*ResourceInsufficientInfo) IsCPUInsufficient

func (r *ResourceInsufficientInfo) IsCPUInsufficient() bool

IsCPUInsufficient 判断是否 CPU 资源不足

func (*ResourceInsufficientInfo) IsConstraintUnfulfilled

func (r *ResourceInsufficientInfo) IsConstraintUnfulfilled() bool

IsConstraintUnfulfilled 判断是否约束条件不满足

func (*ResourceInsufficientInfo) IsDiskInsufficient

func (r *ResourceInsufficientInfo) IsDiskInsufficient() bool

IsDiskInsufficient 判断是否磁盘资源不足

func (*ResourceInsufficientInfo) IsMemoryInsufficient

func (r *ResourceInsufficientInfo) IsMemoryInsufficient() bool

IsMemoryInsufficient 判断是否内存资源不足

func (*ResourceInsufficientInfo) IsPortInsufficient

func (r *ResourceInsufficientInfo) IsPortInsufficient() bool

IsPortInsufficient 判断是否端口资源不足

func (*ResourceInsufficientInfo) IsRoleUnfulfilled

func (r *ResourceInsufficientInfo) IsRoleUnfulfilled() bool

IsRoleUnfulfilled 判断是否节点角色不满足

func (*ResourceInsufficientInfo) String

func (r *ResourceInsufficientInfo) String() string

String return the detailed description of insufficient info

type ResourceReferenceData

type ResourceReferenceData struct {
	// addon引用数
	AddonReference int64 `json:"addonReference"`
	// 服务引用数
	ServiceReference int64 `json:"serviceReference"`
}

ResourceReferenceResp 资源引用数据

type ResourceReferenceResp

type ResourceReferenceResp struct {
	Header
	// key 为 projectID
	Data ResourceReferenceData `json:"data"`
}

ResourceReferenceResp 资源引用数据

type ResourceType

type ResourceType string

ResourceType release可管理的资源类型

const (
	// ResourceTypeDiceYml 资源类型为dice.yml
	ResourceTypeDiceYml ResourceType = "diceyml"
	// ResourceTypeAddonYml 资源类型为addon.yml
	ResourceTypeAddonYml ResourceType = "addonyml"
	// ResourceTypeBinary 资源类型为二进制可执行文件
	ResourceTypeBinary ResourceType = "binary"
	// ResourceTypeScript 资源类型为可执行的脚本文件, eg: shell/python/ruby, etc
	ResourceTypeScript ResourceType = "script"
	// ResourceTypeSQL 资源类型为可执行的sql文本
	ResourceTypeSQL ResourceType = "sql"
	// ResourceTypeDataSet 资源类型为数据文本文件
	ResourceTypeDataSet ResourceType = "data"
	// ResourceTypeAndroid android类型文件
	ResourceTypeAndroid ResourceType = "android"
	// ResourceTypeIOS ios类型文件
	ResourceTypeIOS ResourceType = "ios"
	// ResourceTypeMigration 资源类型为migration文件releaseID
	ResourceTypeMigration ResourceType = "migration"
	// ResourceTypeH5 h5类型的资源文件
	ResourceTypeH5 ResourceType = "h5"
)

type Resources

type Resources struct {
	// cpu sharing
	Cpu float64 `json:"cpu,omitempty"`
	// memory usage
	Mem float64 `json:"mem,omitempty"`
	// disk usage
	Disk float64 `json:"disk,omitempty"`
}

resources that container used

type Response

type Response struct {
	StatusCode  string           `json:"statusCode"`
	MediaType   string           `json:"mediaType"`
	Description string           `json:"description" yaml:"description"`
	Body        *openapi3.Schema `json:"body"`
}

Response is specified by OpenAPI/Swagger 3.0 standard.

type Result

type Result string

Result 审计事件返回结果

const (
	SuccessfulResult Result = "success"
	FailureResult    Result = "failure"
)

type ReviewsBySponsorList

type ReviewsBySponsorList struct {
	List  []GetReviewsBySponsorIdResponse `json:"list"`
	Total int                             `json:"total"`
}

type ReviewsByUserList

type ReviewsByUserList struct {
	List  []GetReviewsByUserIdResponse `json:"list"`
	Total int                          `json:"total"`
}

type RmNodesData

type RmNodesData struct {
	RecordID uint64 `json:"recordID"`
}

type RmNodesRequest

type RmNodesRequest struct {
	ClusterName string   `json:"clusterName"`
	OrgID       uint64   `json:"orgID"`
	Hosts       []string `json:"hosts"`
	Password    string   `json:"password"`
	// skip addon-exist-on-nodes check
	Force bool `json:"force"`
}

type RmNodesResponse

type RmNodesResponse struct {
	Header
	Data RmNodesData `json:"data"`
}

type Role

type Role struct {
	Key string `json:"key"`

	// 范围
	Scope       string `json:"scope"`
	Name        string `json:"name"`
	Description string `json:"description"`

	// 权限列表
	Permissions []string  `json:"permissions"`
	CreatedAt   time.Time `json:"createdAt"`
	UpdatedAt   time.Time `json:"updatedAt"`
}

type RoleChangeBody

type RoleChangeBody struct {
	// 目标id, 对应的applicationId, projectId, orgId
	TargetId string `json:"targetId"`

	// 目标类型 APPLICATION,PROJECT,ORG
	TargetType string `json:"targetType"`
	UserId     string `json:"userId"`
}

type RoleChangeRequest

type RoleChangeRequest struct {
	// 用户角色
	Role string         `json:"-" path:"role"`
	Body RoleChangeBody `json:"body"`
}

/api/roles/<role> method: put 更改用户角色

type RoleChangeResponse

type RoleChangeResponse struct {
	Header
	Data bool `json:"data"`
}

/api/roles/<role> method: put

type RoleInfo

type RoleInfo struct {
	Role string `json:"role"`
	Name string `json:"name"`
}

RoleInfo 角色信息

type RoleList

type RoleList struct {
	List  []RoleInfo `json:"list"`
	Total int        `json:"total"`
}

MemberList 成员列表

type RouteOptions

type RouteOptions struct {
	// 重写转发域名
	RewriteHost *string `json:"rewriteHost"`
	// 重写转发路径
	RewritePath *string `json:"rewritePath"`
	// Path中是否使用了正则
	UseRegex bool `json:"useRegex"`
	// 是否开启TLS,不填时,默认为true
	EnableTLS *bool `json:"enableTls"`
	// 参考: https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/
	Annotations map[string]string `json:"annotations"`
	// 参考: https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#configuration-snippet
	LocationSnippet *string `json:"locationSnippet"`
}

type RunScriptResponse

type RunScriptResponse struct {
	Header
	Data interface{} `json:"data"`
}

RunScriptResponse 脚本执行结果

type RunnerTask

type RunnerTask struct {
	ID             uint64   `json:"id"`
	JobID          string   `json:"job_id"`
	Status         string   `json:"status"` // pending running success failed
	ContextDataUrl string   `json:"context_data_url"`
	OpenApiToken   string   `json:"openapi_token"`
	ResultDataUrl  string   `json:"result_data_url"`
	Commands       []string `json:"commands"`
	Targets        []string `json:"targets"`
	WorkDir        string   `json:"workdir"`
}

type RuntimeCreateRequest

type RuntimeCreateRequest struct {
	Name           string                    `json:"name"`
	ReleaseID      string                    `json:"releaseId"`
	Operator       string                    `json:"operator"`
	ClusterName    string                    `json:"clusterName"`
	Source         RuntimeSource             `json:"source"`
	Extra          RuntimeCreateRequestExtra `json:"extra,omitempty"`
	SkipPushByOrch bool                      `json:"skipPushByOrch"`
}

type RuntimeCreateRequestExtra

type RuntimeCreateRequestExtra struct {
	OrgID           uint64      `json:"orgId,omitempty"`
	ProjectID       uint64      `json:"projectId,omitempty"`
	ApplicationID   uint64      `json:"applicationId,omitempty"`
	ApplicationName string      `json:"applicationName,omitempty"`
	Workspace       string      `json:"workspace,omitempty"`
	BuildID         uint64      `json:"buildId,omitempty"`
	DeployType      string      `json:"deployType,omitempty"`
	InstanceID      json.Number `json:"instanceId,omitempty"`
	// Deprecated
	ClusterId json.Number `json:"clusterId,omitempty"`
	// for addon actions
	AddonActions map[string]interface{} `json:"actions,omitempty"`
}

type RuntimeCreateResponse

type RuntimeCreateResponse struct {
	Header
	Data DeploymentCreateResponseDTO `json:"data"`
}

type RuntimeCreateV2Request

type RuntimeCreateV2Request struct {
	ApplicationID uint64        `json:"applicationID"`
	Workspace     string        `json:"workspace"`
	Name          string        `json:"name"`
	ClusterName   string        `json:"clusterName"`
	Operator      string        `json:"operator"`
	Source        RuntimeSource `json:"source"`
}

RuntimeCreateV2Request 创建 Runtime 请求

type RuntimeCreateV2Response

type RuntimeCreateV2Response struct {
	Header
	Data *RuntimeCreateV2ResponseData `json:"data"`
}

RuntimeCreateV2Response 创建 Runtime 响应

type RuntimeCreateV2ResponseData

type RuntimeCreateV2ResponseData struct {
	RuntimeID uint64 `json:"runtimeID"`
}

RuntimeCreateV2Response 创建 Runtime 响应数据

type RuntimeDTO

type RuntimeDTO struct {
	ID              uint64          `json:"id"`
	Name            string          `json:"name"`
	GitBranch       string          `json:"gitBranch"` // Deprecated: use name instead
	Workspace       string          `json:"workspace"`
	ClusterName     string          `json:"clusterName"`
	ClusterId       uint64          `json:"clusterId"` // Deprecated: use ClusterName instead
	Status          string          `json:"status"`
	ApplicationID   uint64          `json:"applicationId"`
	ApplicationName string          `json:"applicationName"`
	ProjectID       uint64          `json:"projectId"`
	ProjectName     string          `json:"projectName"`
	OrgID           uint64          `json:"orgId"`
	Errors          []ErrorResponse `json:"errors"`
}

type RuntimeDeleteResponse

type RuntimeDeleteResponse struct {
	Header
	Data RuntimeDTO `json:"data"`
}

type RuntimeInspectDTO

type RuntimeInspectDTO struct {
	ID uint64 `json:"id"`
	// runtime名称
	Name                  string        `json:"name"`
	ServiceGroupName      string        `json:"serviceGroupName"`
	ServiceGroupNamespace string        `json:"serviceGroupNamespace"`
	Source                RuntimeSource `json:"source"`
	// 状态
	Status       string                               `json:"status"`
	DeployStatus DeploymentStatus                     `json:"deployStatus"`
	DeleteStatus string                               `json:"deleteStatus"`
	ReleaseID    string                               `json:"releaseId"`
	ClusterID    uint64                               `json:"clusterId"`
	ClusterName  string                               `json:"clusterName"`
	ClusterType  string                               `json:"clusterType"`
	Resources    RuntimeServiceResourceDTO            `json:"resources"`
	Extra        map[string]interface{}               `json:"extra"` // TODO: move fields out of extra
	ProjectID    uint64                               `json:"projectID"`
	Services     map[string]*RuntimeInspectServiceDTO `json:"services"`
	// 模块发布错误信息
	ModuleErrMsg map[string]map[string]string `json:"lastMessage"`
	TimeCreated  time.Time                    `json:"timeCreated"` // Deprecated: use CreatedAt instead
	CreatedAt    time.Time                    `json:"createdAt"`
	UpdatedAt    time.Time                    `json:"updatedAt"`
	Errors       []ErrorResponse              `json:"errors"`
}

type RuntimeInspectRequest

type RuntimeInspectRequest struct {
	// 应用实例 ID / Name
	IDOrName string `path:"idOrName"`

	// 环境, idOrName 为 Name 时必传, 为 ID 时不必传
	Workspace string `query:"workspace"`

	// 应用 ID, idOrName 为 Name 时必传, 为 ID 时不必传
	ApplicationID uint64 `query:"applicationId"`
}

Request for API `GET /api/runtimes/{idOrName}`

两种使用场景:

  1. idOrName is id: 只需要传 id 即可 e.g. GET /api/runtimes/123
  2. idOrName is name: 此时需要传 applicationId 和 workspace e.g. GET /api/runtimes/test.develop?applicationId=456&workspace=TEST

type RuntimeInspectResponse

type RuntimeInspectResponse struct {
	Header
	Data RuntimeInspectDTO `json:"data"`
}

Response for API `GET /api/runtimes/{idOrName}`

type RuntimeInspectServiceDTO

type RuntimeInspectServiceDTO struct {
	Status      string                       `json:"status"`
	Deployments RuntimeServiceDeploymentsDTO `json:"deployments"`
	Resources   RuntimeServiceResourceDTO    `json:"resources"`
	Envs        map[string]string            `json:"envs"`
	Addrs       []string                     `json:"addrs"` // TODO: better name?
	Expose      []string                     `json:"expose"`
	Errors      []ErrorResponse              `json:"errors"`
}

type RuntimeInstanceDTO

type RuntimeInstanceDTO struct {
	ID          uint64    `json:"id"`
	InstanceID  string    `json:"instanceId"`
	RuntimeID   uint64    `json:"runtimeId"`
	ServiceName string    `json:"serviceName"`
	IP          string    `json:"ip"`
	Status      string    `json:"status"`
	Stage       string    `json:"stage"`
	CreatedAt   time.Time `json:"createdAt"`
	UpdatedAt   time.Time `json:"updatedAt"`
}

TODO: same as spec.RuntimeInstance, need to combine two

type RuntimeKillPodRequest

type RuntimeKillPodRequest struct {
	RuntimeID uint64 `json:"runtimeID"`
	PodName   string `json:"podName"`
}

type RuntimeListResponse

type RuntimeListResponse struct {
	Header
	UserInfoHeader
	Data []RuntimeSummaryDTO `json:"data"`
}

type RuntimeRedeployResponse

type RuntimeRedeployResponse struct {
	Header
	Data DeploymentCreateResponseDTO `json:"data"`
}

type RuntimeReleaseCreatePipelineResponse

type RuntimeReleaseCreatePipelineResponse struct {
	PipelineID uint64 `json:"pipelineId"`
}

type RuntimeReleaseCreateRequest

type RuntimeReleaseCreateRequest struct {
	// 制品ID
	ReleaseID string `json:"releaseId"`
	// 环境
	Workspace string `json:"workspace"`
	// 项目ID
	ProjectID uint64 `json:"projectId"`
	// 应用ID
	ApplicationID uint64 `json:"applicationId"`
}

type RuntimeRollbackRequest

type RuntimeRollbackRequest struct {
	DeploymentID uint64 `json:"deploymentId"`
}

type RuntimeRollbackResponse

type RuntimeRollbackResponse struct {
	Header
	Data DeploymentCreateResponseDTO `json:"data"`
}

type RuntimeServiceDTO

type RuntimeServiceDTO struct {
	ID          uint64                       `json:"id"`
	RuntimeID   uint64                       `json:"runtimeId"`
	ServiceName string                       `json:"serviceName"`
	Status      string                       `json:"status"`
	Deployments RuntimeServiceDeploymentsDTO `json:"deployments"`
	Resources   RuntimeServiceResourceDTO    `json:"resources"`
	Envs        map[string]string            `json:"envs"`
	Expose      []string                     `json:"expose"`
	Errors      []ErrorResponse              `json:"errors"`
}

TODO: currently same as RuntimeInspectServiceDTO, we should combine these two

type RuntimeServiceDeploymentsDTO

type RuntimeServiceDeploymentsDTO struct {
	Replicas int `json:"replicas"`
}

type RuntimeServiceRequest

type RuntimeServiceRequest struct {
	// OrgID 企业ID
	OrgID string `json:"orgId"`
	// ProjectID 项目ID
	ProjectID string `json:"projectId"`
	// Workspace 所属环境
	Workspace string `json:"env"`
	// CluserName 集群名称
	ClusterName string `json:"clusterName"`
	// RuntimeID runtimeID
	RuntimeID string `json:"runtimeId"`
	// RuntimeName runtime名称
	RuntimeName string `json:"runtimeName"`
	// AppID 应用ID
	AppID string `json:"appId"`
	// AppName 应用名称
	AppName string `json:"appName"`
	// Services 服务组成的列表
	Services []ServiceItem `json:"services"`
	// UseApigw 是否通过addon依赖了api网关
	UseApigw bool `json:"useApigw"`
	// ReleaseId
	ReleaseID string `json:"releaseId"`
	// ServiceGroupNamespace
	ServiceGroupNamespace string `json:"serviceGroupNamespace"`
	// ServiceGroupName
	ServiceGroupName string `json:"serviceGroupName"`
	// ProjectNamespace 项目级命名空间
	ProjectNamespace string `json:"projectNamespace"`
}

RuntimeServiceRequest 部署runtime之后,orchestrator需要将服务域名信息通过此接口提交给hepa

type RuntimeServiceResourceDTO

type RuntimeServiceResourceDTO struct {
	CPU  float64 `json:"cpu"`
	Mem  int     `json:"mem"`
	Disk int     `json:"disk"`
}

type RuntimeSource

type RuntimeSource string
const (
	PIPELINE     RuntimeSource = "PIPELINE"
	ABILITY      RuntimeSource = "ABILITY"
	RUNTIMEADDON RuntimeSource = "RUNTIMEADDON"
	RELEASE      RuntimeSource = "RELEASE"
)

type RuntimeSummaryDTO

type RuntimeSummaryDTO struct {
	RuntimeInspectDTO
	LastOperator       string    `json:"lastOperator"`
	LastOperatorName   string    `json:"lastOperatorName"`   // Deprecated
	LastOperatorAvatar string    `json:"lastOperatorAvatar"` // Deprecated
	LastOperateTime    time.Time `json:"lastOperateTime"`
}

type RuntimeUsageFetchResponse

type RuntimeUsageFetchResponse struct {
	Header
	Data []RuntimeUsageFetchResponseData `json:"data"`
}

type RuntimeUsageFetchResponseData

type RuntimeUsageFetchResponseData struct {
	ID           string  `json:"id"`
	Name         string  `json:"name"`
	Instance     int     `json:"instance"`
	UnhealthyNum int     `json:"unhealthy"` // 项目对应的实例不健康数量
	Memory       float64 `json:"memory"`    // 分配的内存大小单位(MB)
	Disk         float64 `json:"disk"`      // 分配的磁盘大小单位(MB)
	CPU          float64 `json:"cpu"`
	Application  string  `json:"application,omitempty"`
}

RuntimeUsageFetchResponseData runtime资源分配

type SK

type SK struct {
	ClientID     string `json:"clientID"`
	ClientSecret string `json:"clientSecret"`
}

type SLADetailURI

type SLADetailURI struct {
	AssetID        string
	SwaggerVersion string
	SLAID          uint64
}

type SLALimitModel

type SLALimitModel struct {
	BaseModel

	SLAID uint64       `json:"slaID"`
	Limit uint64       `json:"limit"`
	Unit  DurationUnit `json:"unit"` // s: second, m: minute, h: hour, d: day
}

func (SLALimitModel) TableName

func (m SLALimitModel) TableName() string

type SLAModel

type SLAModel struct {
	BaseModel

	Name     string        `json:"name"`
	Desc     string        `json:"desc"`
	Approval Authorization `json:"approval"`
	AccessID uint64        `json:"accessID"`
	Source   Source        `json:"source" gorm:"-"`
}

dice_api_slas

func (SLAModel) TableName

func (m SLAModel) TableName() string

type SLAUsedInContract

type SLAUsedInContract string
const (
	Current SLAUsedInContract = "current"
	Request SLAUsedInContract = "requesting"
)

type SSH

type SSH struct {
	Port       int    `json:"port"`
	User       string `json:"user"`
	Password   string `json:"password,omitempty"`
	Account    string `json:"account"`
	PrivateKey string `json:"privateKey,omitempty"`
	PublicKey  string `json:"publicKey,omitempty"`
}

SSH 远程登录配置

type SaveAddonPrebuildReq

type SaveAddonPrebuildReq struct {
	Addons        []AddonPrebuildReq        `json:"addons"`
	AddonsOverlay []AddonPrebuildOverlayReq `json:"addons_overlay"`
}

SaveAddonPrebuildReq addon prebuild overlay request body,rds覆盖mysql

type ScaleInfo

type ScaleInfo struct {
	ReceiptHandles []string
	Instances      map[string]string // instanceId/ip
}

type SceneSet

type SceneSet struct {
	ID          uint64    `json:"id"`
	Name        string    `json:"name"`
	SpaceID     uint64    `json:"spaceID"`
	PreID       uint64    `json:"preID"`
	Description string    `json:"description"`
	CreatorID   string    `json:"creatorID"`
	UpdaterID   string    `json:"updatorID"`
	CreatedAt   time.Time `json:"createdAt"`
	UpdatedAt   time.Time `json:"updatedAt"`
}

type SceneSetRequest

type SceneSetRequest struct {
	Name        string `json:"name"`
	SpaceID     uint64 `json:"spaceID"`
	Description string `json:"description"`
	PreID       uint64 `json:"preID"`
	SetID       uint64 `json:"setID"`
	DropKey     int64  `json:"dropKey"`
	Position    int64  `json:"position,omitempty"` // 插入位置
	ProjectId   uint64 `json:"projectID"`
	IdentityInfo
}

func (*SceneSetRequest) URLQueryString

func (req *SceneSetRequest) URLQueryString() map[string][]string

type SceneStatus

type SceneStatus string
const (
	DefaultSceneStatus    SceneStatus = "default"
	ProcessingSceneStatus SceneStatus = "processing"
	SuccessSceneStatus    SceneStatus = "success"
	ErrorSceneStatus      SceneStatus = "error"
)

func (SceneStatus) String

func (s SceneStatus) String() string

func (SceneStatus) Value

func (s SceneStatus) Value() string

type ScheduleInfo

type ScheduleInfo struct {
	// 调度喜好对应的个体
	Likes   []string
	UnLikes []string

	// 调度喜好对应的以该值为前缀的群体
	LikePrefixs   []string
	UnLikePrefixs []string

	// 不与 "any" 标签共存的 Like
	ExclusiveLikes []string
	// 元素是或集合,组合到一条约束语句中
	InclusiveLikes []string

	// currently only for "any" label
	Flag bool

	// 服务(包括JOB)打散在不同 host
	// HostUnique: 是否启用 host 打散
	// HostUniqueInfo: service 分组
	HostUnique     bool
	HostUniqueInfo [][]string

	// 指定 host, 列表中的host为‘或’关系
	SpecificHost []string

	// 是否需要调度到 `平台` 所属机器
	IsPlatform bool

	// 是否需要调度到 `非 locked` 机器
	IsUnLocked bool

	// Location 允许调度目的节点类型列表
	//
	// e.g.
	//
	// Location: map[string]      interface{}
	//           map[servicename] diceyml.Selector
	//
	// TODO: 目前 map value 是 interface{} 是因为 apistructs 没有 import diceyml,
	//       需要把 diceyml 结构体移动到 apistructs
	Location map[string]interface{}
}

ScheduleInfo 之后将完全替换为 ScheduleInfo2

type ScheduleInfo2

type ScheduleInfo2 struct {
	// 服务(包括JOB)打散在不同 host
	// HasHostUnique: 是否启用 host 打散
	// HostUnique: service 分组
	HasHostUnique bool
	HostUnique    [][]string

	// 指定 host, 列表中的host为 ‘或’ 关系
	SpecificHost []string

	// 是否需要调度到 `平台` 所属机器
	IsPlatform bool

	IsDaemonset bool
	// 是否需要调度到 `非 locked` 机器
	// 总是 true
	IsUnLocked bool

	// Location 允许调度目的节点类型列表
	//
	// e.g.
	//
	// Location: map[string]      interface{}
	//           map[servicename] diceyml.Selector
	//
	// TODO: 目前 map value 是 interface{} 是因为 apistructs 没有 import diceyml,
	//       需要把 diceyml 结构体移动到 apistructs
	Location map[string]interface{}

	// HasOrg 表示 Org 字段是否有意义
	// 1. '集群配置' 中未开启: HasOrg = false
	// 2. '集群配置' 中开启,`LabelInfo.Label` 中没有 `labelconfig.ORG_KEY` label & selectors 中没有 `org`:
	//      HasOrg = false
	// 3. '集群配置' 中开启,`LabelInfo.Label` 中存在 `labelconfig.ORG_KEY` label | selectors 中存在 `org`:
	//      HasOrg = true, Org = "<orgname>"
	HasOrg bool
	Org    string

	// HasWorkSpace 表示 WorkSpace 字段是否有意义
	// 1. HasOrg = false		: HasWorkSpace = false
	// 2. '集群配置' 中未开启	: HasWorkSpace = false
	// 3. '集群配置' 中开启,`LabelInfo.Label` 中没有 `labelconfig.WORKSPACE_KEY` label & selectors 中没有 `org`  :
	//      HasWorkSpace = false
	// 4. '集群配置' 中开启,`LabelInfo.Label` 中存在 `labelconfig.ORG_KEY` label | selectors 中存在 `org`:
	//      HasWorkSpace = true, WorkSpace = ["<workspace>", ...]
	HasWorkSpace bool
	// WorkSpaces 列表中的 workspace 为 `或` 关系
	// [a, b, c] => a | b | c
	WorkSpaces []string

	Job bool
	// PreferJob
	// k8s      忽略该字段
	// marathon 中生成的约束为 job | any
	PreferJob bool

	Pack bool
	// PreferPack
	// k8s      忽略该字段
	// marathon 中生成的约束为 pack | any
	PreferPack bool

	Stateful bool
	// PreferStateful
	// k8s      忽略该字段
	// marathon 中生成的约束为 stateful | any
	PreferStateful bool

	Stateless bool
	// PreferStateless
	// k8s      忽略该字段
	// marathon 中生成的约束为 stateless | any
	PreferStateless bool

	BigData bool

	// Project label
	// =DEPRECATED= k8s 中忽略该字段
	HasProject bool
	Project    string
}

ScheduleInfo2 之后将完全代替 ScheduleInfo

type ScheduleLabelListData

type ScheduleLabelListData struct {
	// map-key: label name
	// map-value: is this label a prefix?
	Labels map[string]bool `json:"labels"`
}

type ScheduleLabelListRequest

type ScheduleLabelListRequest struct{}

type ScheduleLabelListResponse

type ScheduleLabelListResponse struct {
	Header
	Data ScheduleLabelListData `json:"data"`
}

type ScheduleLabelSetRequest

type ScheduleLabelSetRequest struct {
	// 对于 dcos 的 tag, 由于只有 key, 则 tag 中的 value 都为空
	Tags        map[string]string `json:"tag"`
	Hosts       []string          `json:"hosts"`
	ClusterName string            `json:"clustername"`
	ClusterType string            `json:"clustertype"`
	SoldierURL  string            `json:"soldierURL"`
}

type ScheduleLabelSetResponse

type ScheduleLabelSetResponse struct {
	Header
}

type ScheduleStrategyInsidePipelineQueue

type ScheduleStrategyInsidePipelineQueue string

ScheduleStrategyInsidePipelineQueue represents the schedule strategy of workflows inside a queue.

var (
	ScheduleStrategyInsidePipelineQueueOfFIFO ScheduleStrategyInsidePipelineQueue = "FIFO"
)

func (ScheduleStrategyInsidePipelineQueue) IsValid

func (strategy ScheduleStrategyInsidePipelineQueue) IsValid() bool

func (ScheduleStrategyInsidePipelineQueue) String

func (strategy ScheduleStrategyInsidePipelineQueue) String() string

type SchedulerResource

type SchedulerResource struct {
	CPU  float64 `json:"cpus"`
	Mem  float64 `json:"mem"`
	Disk float64 `json:"disk"`
}

type SchedulerResourceFecthRequest

type SchedulerResourceFecthRequest struct {
	Cluster  string            `json:"cluster"`
	Resource SchedulerResource `json:"resource"`
	Attr     Attribute         `json:"attribute"`
	Extra    map[string]string `json:"extra,omitempty"`
}

/api/scheduler/resource method: get 查询调度资源

type SchedulerScaleReq

type SchedulerScaleReq struct {
	AccessKeyId     string `json:"accessKeyId"`
	AccessKeySecret string `json:"accessKeySecret"`
	Region          string `json:"region"`
	ClusterName     string `json:"clusterName"`
	VSwitchID       string `json:"vSwitchID"`
	EcsPassword     string `json:"ecsPassword"`
	SgID            string `json:"sgID"`
	Num             int    `json:"num"`
	LaunchTime      string `json:"launchTime"`
	ScaleDuration   int    `json:"scaleDuration"`
	RecurrenceType  string `json:"recurrenceType"`
	RecurrenceValue string `json:"recurrenceValue"`
	OrgID           int    `json:"orgID"`
	IsEdit          bool   `json:"isEdit"`
	ScheduledTaskId string `json:"scheduledTaskId"`
}

type Scope

type Scope struct {
	// 范围类型
	// 可选值: sys, org, project, app
	Type ScopeType `json:"type"`

	// 范围对应的实例 ID (orgID, projectID, applicationID ...)
	// 比如 type == "org" 时, id 即为 orgID
	ID string `json:"id,omitempty"`
}

Scope 范围 (作用域)

type ScopeResource

type ScopeResource struct {
	// Resource 资源类型, eg: ticket/release
	Resource string `json:"resource"`
	// Action Create/Update/Delete/
	Action string `json:"action"`
	// resource 角色: Creator, Assignee
	ResourceRole string `json:"resourceRole,omitempty"`
}

ScopeResource Scope 对应的权限信息

type ScopeRole

type ScopeRole struct {
	Scope  Scope    `json:"scope"`
	Access bool     `json:"access"`
	Roles  []string `json:"roles"`
}

ScopeRole 权限

type ScopeRoleAccessRequest

type ScopeRoleAccessRequest struct {
	Scope Scope `json:"scope"`
}

ScopeRoleAccessRequest Request for API `POST /api/permissions/actions/access`

type ScopeRoleAccessResponse

type ScopeRoleAccessResponse struct {
	Header
	Data ScopeRole `json:"data"`
}

ScopeRoleAccessResponse Response for API `POST /api/permissions/actions/access`

type ScopeRoleList

type ScopeRoleList struct {
	List []ScopeRole `json:"list"`
}

ScopeRoleList 权限列表

type ScopeRoleListResponse

type ScopeRoleListResponse struct {
	Header
	Data ScopeRoleList `json:"data"`
}

ScopeRoleListResponse Response for API `GET /api/permissions`

type ScopeType

type ScopeType string
const (
	// SysScope 系统范围
	SysScope ScopeType = "sys"
	// OrgScope 企业范围
	OrgScope ScopeType = "org"
	// ProjectScope 项目范围
	ProjectScope ScopeType = "project"
	// AppScope 应用范围
	AppScope ScopeType = "app"
	// AppScope Publisher范围
	PublisherScope ScopeType = "publisher"
)

type ScriptInfo

type ScriptInfo struct {
	Md5  string `json:"md5"`
	Name string `json:"name"`
	Size int64  `json:"size"`
	// 脚本名逗号分隔,ALL代表终止全部脚本
	ScriptBlackList []string `json:"blackList"`
}

ScriptInfo 脚本信息

type SearchOperationQueryParameters

type SearchOperationQueryParameters struct {
	Keyword string
}

type SearchOperationsReq

type SearchOperationsReq struct {
	OrgID       uint64
	Identity    *IdentityInfo
	QueryParams SearchOperationQueryParameters
}

type Service

type Service struct {
	// unique name between services in one Dice (ServiceGroup)
	Name string `json:"name"`
	// namespace of service, equal to the namespace in Dice
	Namespace string `json:"namespace,omitempty"`
	// docker's image url
	Image string `json:"image"`
	// docker's image username
	ImageUsername string `json:"image_username"`
	// docker's image password
	ImagePassword string `json:"image_password"`
	// docker's CMD
	Cmd string `json:"cmd,omitempty"`
	// port list user-defined, we export these ports on our VIP
	Ports []diceyml.ServicePort `json:"Ports"`
	// only exists if serviceDiscoveryKind is PROXY
	// can not modify directly, assigned by dice
	ProxyPorts []int `json:"proxyPorts,omitempty"`
	// virtual ip
	// can not modify directly, assigned by dice
	Vip string `json:"vip"`
	// ShortVIP 短域名,为解决 DCOS, K8S等短域名不一致问题
	ShortVIP string `json:"shortVIP,omitempty"`
	// only exists if serviceDiscoveryKind is PROXY
	// can not modify directly, assigned by dice
	ProxyIp string `json:"proxyIp,omitempty"`
	// TODO: refactor it, currently only work with label X_ENABLE_PUBLIC_IP=true
	PublicIp string `json:"publicIp,omitempty"`
	// instances of containers should running
	Scale int `json:"scale"`
	// resources like cpu, mem, disk
	Resources Resources `json:"resources"`
	// list of service names depends by this service, used for dependency scheduling
	Depends []string `json:"depends,omitempty"`
	// environment variables inject into container
	Env map[string]string `json:"env"`
	// labels for extension and some tags
	Labels map[string]string `json:"labels"`
	// deploymentLabels 会转化到 pod spec label 中, dcos 忽略此字段
	DeploymentLabels map[string]string `json:"deploymentLabels,omitempty"`
	// Selectors see also diceyml.Service.Selectors
	//
	// TODO: 把 ServiceGroup structure  移动到 scheduler 内部,Selectors 类型换为 diceyml.Selectors
	Selectors interface{} `json:"selectors"`
	// disk bind (mount) configuration, hostPath only
	Binds []ServiceBind `json:"binds,omitempty"`
	// Volumes intends to replace Binds
	Volumes []Volume `json:"volumes,omitempty"`
	// hosts append into /etc/hosts
	Hosts []string `json:"hosts,omitempty"`
	// health check
	HealthCheck *HealthCheck `json:"healthCheck"`
	//
	NewHealthCheck *NewHealthCheck                  `json:"health_check,omitempty"`
	SideCars       map[string]*diceyml.SideCar      `json:"sidecars,omitempty"`
	InitContainer  map[string]diceyml.InitContainer `json:"init,omitempty"`
	// instance info, only for display
	// marathon 中对应一个task, k8s中对应一个pod
	InstanceInfos []InstanceInfo `json:"instanceInfos,omitempty"`
	// service mesh 的服务级别开关
	MeshEnable *bool `json:"mesh_enable,omitempty"`
	// 对应 istio 的流量加密策略
	TrafficSecurity diceyml.TrafficSecurity `json:"traffic_security,omitempty"`

	// WorkLoad indicates the type of service,
	//support Kubernetes workload DaemonSet(Per-Node), Statefulset and Deployment
	WorkLoad string `json:"workLoad,omitempty"`

	StatusDesc
}

One single Service which is the minimum scheduling unit

type ServiceAddonRes

type ServiceAddonRes struct {
	InstanceID       string `json:"instanceId" desc:"addon实例Id"`
	InstanceName     string `json:"instanceName" desc:"addon实例名称"`
	AddonName        string `json:"addonName" desc:"addon名称"`
	AddonDisplayName string `json:"addonDisplayName" desc:"addon展示名称"`
	ShareScope       string `json:"shareScope" desc:"共享级别"`
	Version          string `json:"version" desc:"addon版本"`
	OrgID            string `json:"orgId" desc:"企业ID"`
	ProjectID        string `json:"projectId" desc:"项目ID"`
	ProjectName      string `json:"projectName" desc:"项目名称"`
	ApplicationID    string `json:"applicationId" desc:"应用ID"`
	ApplicationName  string `json:"applicationName" desc:"应用名称"`
	Status           string `json:"status" desc:"addon状态"`
	Env              string `json:"env" desc:"所属环境"`
	EnvCn            string `json:"envCn" desc:"所属环境中文"`
	CreateTime       string `json:"createTime" desc:"创建时间"`
	RealInstanceID   string `json:"realInstanceId" desc:"addon实例真实ID"`
	Platform         bool   `json:"platform" desc:"是否平台服务"`
	ConsoleURL       string `json:"consoleUrl" desc:"跳转链接"`
	TerminusKey      bool   `json:"terminusKey" desc:"监控terminusKey"`
}

ServiceAddonRes addon服务目录

type ServiceBind

type ServiceBind struct {
	Bind
	// TODO: refactor it, currently just copy the marathon struct
	Persistent *PersistentVolume `json:"persistent,omitempty"`
}

type ServiceGroup

type ServiceGroup struct {
	// runtime create time
	CreatedTime int64 `json:"created_time"`
	// last modified (update) time
	LastModifiedTime int64 `json:"last_modified_time"`
	// executor for scheduling (e.g. marathon)
	Executor string `json:"executor"`
	// substitute for "Executor" field
	ClusterName string `json:"clusterName"`
	// version to tracing changes (create, update, etc.)
	Version string `json:"version,omitempty"`
	Force   bool   `json:"force,omitempty"`
	// current usage for Extra:
	// 1. record last restart time, to implement RESTART api through PUT api
	Extra map[string]string `json:"extra,omitempty"`

	// 根据集群配置以及 label 所计算出的调度规则
	// TODO: DEPRECATED
	ScheduleInfo ScheduleInfo `json:"scheduleInfo,omitempty"`
	// 将会代替 ScheduleInfo
	ScheduleInfo2 ScheduleInfo2 `json:"scheduleInfo2,omitempty"`
	// ubiquitous dice
	Dice
	// status of this runtime
	StatusDesc
}

The ServiceGroup of a Dice

type ServiceGroupCancelV2Request

type ServiceGroupCancelV2Request struct {
	Namespace string `query:"namespace"`
	Name      string `query:"name"`
}

cancel servicegroup

type ServiceGroupCancelV2Response

type ServiceGroupCancelV2Response struct {
	Header
}

type ServiceGroupConfigUpdateResponse

type ServiceGroupConfigUpdateResponse struct {
	Header
}

type ServiceGroupCreateRequest

type ServiceGroupCreateRequest ServiceGroup

type ServiceGroupCreateResponse

type ServiceGroupCreateResponse struct {
	Version string `json:"version"`
	Name    string `json:"name"`
	Error   string `json:"error"`
}

type ServiceGroupCreateV2Data

type ServiceGroupCreateV2Data struct {
	// 目前没用
	Version string `json:"version"`
	ID      string `json:"namespace"`
	Type    string `json:"name"`
}

type ServiceGroupCreateV2Request

type ServiceGroupCreateV2Request struct {
	DiceYml diceyml.Object `json:"diceyml"`
	// DiceYml              json.RawMessage   `json:"diceyml"`
	ClusterName string `json:"clusterName"`
	ID          string `json:"name"`
	Type        string `json:"namespace"`
	// DEPRECATED, 放在 diceyml.meta 中
	GroupLabels map[string]string `json:"grouplabels"`
	// DEPRECATED, 放在 diceyml.meta 中
	ServiceDiscoveryMode string `json:"serviceDiscoveryMode"`
	// DEPRECATED
	// map[servicename]volumeinfo
	Volumes          map[string]RequestVolumeInfo `json:"volumes"`
	ProjectNamespace string                       `json:"projectNamespace"`
}

创建 servicegroup POST: /api/servicegroup

type ServiceGroupCreateV2Response

type ServiceGroupCreateV2Response struct {
	Header
	Data ServiceGroupCreateV2Data `json:"data"`
}

type ServiceGroupDeleteRequest

type ServiceGroupDeleteRequest struct {
	Namespace string `query:"namespace"`
	Name      string `query:"name"`
	Force     bool   `query:"force"`
}

type ServiceGroupDeleteResponse

type ServiceGroupDeleteResponse struct {
	Name  string `json:"name"`
	Error string `json:"error"`
}

type ServiceGroupDeleteV2Request

type ServiceGroupDeleteV2Request struct {
	Namespace string `query:"namespace"`
	Name      string `query:"name"`
}

删除 servicegroup DELETE: /api/servicegroup

type ServiceGroupDeleteV2Response

type ServiceGroupDeleteV2Response struct {
	Header
}

type ServiceGroupGetErrorResponse

type ServiceGroupGetErrorResponse struct {
	Error string `json:"error"`
}

type ServiceGroupInfoRequest

type ServiceGroupInfoRequest struct {
	Type string `query:"namespace"`
	ID   string `query:"name"`
}

获取 servicegroup 信息 GET: /api/serivcegroup

type ServiceGroupInfoResponse

type ServiceGroupInfoResponse struct {
	Header
	Data ServiceGroup `json:"data"`
}

type ServiceGroupKillPodRequest

type ServiceGroupKillPodRequest struct {
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
	PodName   string `json:"podName"`
}

kill pod POST: /api/servicegroup/actions/killpod

type ServiceGroupKillPodResponse

type ServiceGroupKillPodResponse struct {
	Header
}

type ServiceGroupPrecheckData

type ServiceGroupPrecheckData struct {
	// key: servicename
	Nodes  map[string][]ServiceGroupPrecheckNodeData `json:"nodes"`
	Status string                                    `json:"status"`
	Info   string                                    `json:"info"`
}

type ServiceGroupPrecheckNodeData

type ServiceGroupPrecheckNodeData struct {
	IP     string `json:"ip"`
	Status string `json:"status"`
	Info   string `json:"info"`
}

type ServiceGroupPrecheckRequest

type ServiceGroupPrecheckRequest ServiceGroupCreateV2Request

precheck servicegroup

type ServiceGroupPrecheckResponse

type ServiceGroupPrecheckResponse struct {
	Header
	Data ServiceGroupPrecheckData `json:"data"`
}

type ServiceGroupRestartResponse

type ServiceGroupRestartResponse struct {
	Name  string `json:"name"`
	Error string `json:"error"`
}

type ServiceGroupRestartV2Request

type ServiceGroupRestartV2Request struct {
	Namespace string `query:"namespace"`
	Name      string `query:"name"`
}

restart servicegroup

type ServiceGroupRestartV2Response

type ServiceGroupRestartV2Response struct {
	Header
}

type ServiceGroupUpdateResponse

type ServiceGroupUpdateResponse struct {
	Name  string `json:"name"`
	Error string `json:"error"`
}

type ServiceGroupUpdateV2Request

type ServiceGroupUpdateV2Request ServiceGroupCreateV2Request

更新 servicegroup PUT: /api/servicegroup

type ServiceGroupUpdateV2Response

type ServiceGroupUpdateV2Response ServiceGroupCreateV2Response

type ServiceInfoData

type ServiceInfoData struct {
	Cluster   string `json:"cluster"`
	Namespace string `json:"namespace"`
	Name      string `json:"name"`

	OrgName         string `json:"orgName"`
	OrgID           string `json:"orgId"`
	ProjectName     string `json:"projectName"`
	ProjectID       string `json:"projectId"`
	ApplicationName string `json:"applicationName"`
	ApplicationID   string `json:"applicationId"`
	RuntimeName     string `json:"runtimeName"`
	RuntimeID       string `json:"runtimeId"`
	ServiceName     string `json:"serviceName"`
	Workspace       string `json:"workspace"`
	ServiceType     string `json:"serviceType"`

	Meta string `json:"meta"`

	Phase      string     `json:"phase"`
	Message    string     `json:"message"`
	StartedAt  time.Time  `json:"startedAt"`
	FinishedAt *time.Time `json:"finishedAt"`
}

type ServiceInfoDataList

type ServiceInfoDataList []ServiceInfoData

type ServiceInfoResponse

type ServiceInfoResponse struct {
	Header
	Data ServiceInfoDataList `json:"data"`
}

type ServiceItem

type ServiceItem struct {
	// ServiceName 服务名称
	ServiceName string `json:"serviceName"`
	// InnerAddress 服务内部地址
	InnerAddress string `json:"innerAddress"`
}

ServiceItem service信息

type ServicePort

type ServicePort struct {
	// Port is port for service connection
	Port int `json:"port"`
	// Protocol support kubernetes orn Protocol Type. It
	// contains ProtocolTCP, ProtocolUDP,ProtocolSCTP
	Protocol corev1.Protocol `json:"protocol"`
}

ServicePort support service set port and protocol

type ServiceResource

type ServiceResource struct {
	Name             string                               `json:"name"`
	ProjectUsage     *ProjectUsageFetchResponseData       `json:"project_usage"`
	ApplicationUsage []*ApplicationUsageFetchResponseData `json:"application_usage"`
	RuntimeUsage     []*RuntimeUsageFetchResponseData     `json:"runtime_usage"`
	ServiceUsage     []*ServiceUsageFetchResponseData     `json:"service_usage"`
	Resource         []*ContainerFetchResponseData        `json:"resource"`
}

ServiceResource dice上的资源

type ServiceUsageData

type ServiceUsageData struct {
	ID          string  `json:"id"` // 实例ID
	Name        string  `json:"name"`
	Project     string  `json:"project"`
	Application string  `json:"application"`
	SharedLevel string  `json:"sharedLevel"`
	Workspace   string  `json:"workspace"`
	Type        string  `json:"type"`
	Instance    int     `json:"instance"` // 实例对应容器数
	Memory      float64 `json:"memory"`   // 分配的内存大小单位(MB)
	Disk        float64 `json:"disk"`     // 分配的磁盘大小单位(MB)
	CPU         float64 `json:"cpu"`
}

ServiceUsageData 服务资源(包括应用服务和addon)分配

type ServiceUsageFetchResponseData

type ServiceUsageFetchResponseData struct {
	Name         string  `json:"name"`
	Instance     int     `json:"instance"`
	UnhealthyNum int     `json:"unhealthy"` // 项目对应的实例不健康数量
	Memory       float64 `json:"memory"`    // 分配的内存大小单位(MB)
	Disk         float64 `json:"disk"`      // 分配的磁盘大小单位(MB)
	CPU          float64 `json:"cpu"`
	Runtime      string  `json:"runtime,omitempty"`
}

ServiceUsageFetchResponseData 服务资源分配

type ServicesUsageFetchResponse

type ServicesUsageFetchResponse struct {
	Header
	Data []ServiceUsageFetchResponseData `json:"data"`
}

type ServicesUsageListRequest

type ServicesUsageListRequest struct {
	Cluster string `query:"cluster"`
}

ServiceUsageListRequest 服务资源(包括应用服务和addon)分配

type ServicesUsageListResponse

type ServicesUsageListResponse struct {
	Header
	Data []ServiceUsageData `json:"data"`
}

ServiceUsageListResponse 服务资源(包括应用服务和addon)分配列表

type SetMBoxReadStatusRequest

type SetMBoxReadStatusRequest struct {
	OrgID  int64   `json:"-"`
	IDs    []int64 `json:"ids"`
	UserID string  `json:"-"`
}

SetMBoxReadStatusRequest 标记站内信已读请求

type SetMBoxReadStatusResponse

type SetMBoxReadStatusResponse struct {
	Header
}

SetMBoxReadStatusResponse 批量标记站内信已读响应

type ShowMessage

type ShowMessage struct {
	Msg      string   `json:"msg"`
	Stacks   []string `json:"stacks"`
	AbortRun bool     `json:"abortRun"` // if false, canManualRun should be false
}

type Signature

type Signature struct {
	Email string    `json:"email"`
	Name  string    `json:"name"`
	When  time.Time `json:"when"`
}

Signature git操作人结构

type SimpleUser

type SimpleUser struct {
	Id      uint64 `json:"id"`
	Email   string `json:"email"`
	Mobile  string `json:"mobile"`
	Nick    string `json:"nick"`
	Avatar  string `json:"avatar"`
	Status  string `json:"status"`
	OrgId   uint64 `json:"orgId"`
	OrgRole string `json:"orgRole"`
	OrgName string `json:"orgName"`
}

type SnippetConfig

type SnippetConfig struct {
	Source string            `json:"source,omitempty" yaml:"source,omitempty"` // 来源 gittar dice test
	Name   string            `json:"name,omitempty" yaml:"name,omitempty"`     // 名称
	Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` // 额外标签
}

func (*SnippetConfig) ToString

func (snippetConfig *SnippetConfig) ToString() string

type SnippetDetailQuery

type SnippetDetailQuery struct {
	SnippetConfig
	Alias string `json:"alias,omitempty"` // 别名
}

type SnippetFormatOutputs

type SnippetFormatOutputs struct {
	PreOutputName   string `json:"PreOutputName"`
	AfterOutputName string `json:"AfterOutputName"`
}

type SnippetLabel

type SnippetLabel struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type SnippetLabels

type SnippetLabels []SnippetLabel

func (SnippetLabels) Len

func (p SnippetLabels) Len() int

func (SnippetLabels) Less

func (p SnippetLabels) Less(i, j int) bool

func (SnippetLabels) Swap

func (p SnippetLabels) Swap(i, j int)

type SnippetQueryDetail

type SnippetQueryDetail struct {
	Params  []*PipelineParam `json:"params,omitempty"`
	Outputs []string         `json:"outputs,omitempty"`
}

type SnippetQueryDetailsRequest

type SnippetQueryDetailsRequest struct {
	SnippetConfigs []SnippetDetailQuery `json:"snippetConfigs,omitempty"`
}

type SnippetQueryDetailsResponse

type SnippetQueryDetailsResponse struct {
	Header
	Data map[string]SnippetQueryDetail `json:"data,omitempty"`
}

type SnippetStages

type SnippetStages struct {
	Params  []*PipelineParam       `json:"params,omitempty"`  // 流水线输入
	Outputs []*PipelineOutput      `json:"outputs,omitempty"` // 流水线输出
	Stages  [][]*PipelineYmlAction `json:"stages,omitempty"`  // snippetStages snippet 展开
}

type SonarCredential

type SonarCredential struct {
	Server string `json:"server,omitempty"`
	Token  string `json:"token,omitempty"`
}

SonarCredential sonar credential for invoking

type SonarCredentialGetResponse

type SonarCredentialGetResponse struct {
	Header
	Data *SonarCredential `json:"data,omitempty"`
}

SonarCredentialGetResponse

type SonarIssueGetRequest

type SonarIssueGetRequest struct {
	Type  string `schema:"type"`
	Key   string `schema:"key"`
	AppID uint64 `schema:"applicationId"`
}

type SonarIssueResponse

type SonarIssueResponse struct {
	Header
	Data interface{} `json:"data"`
}

type SonarMetricKey

type SonarMetricKey struct {
	ID            int64  `json:"id"`
	MetricKey     string `json:"metricKey"`
	ValueType     string `json:"valueType"`
	Name          string `json:"name"`
	MetricKeyDesc string `json:"metricKeyDesc"`
	Domain        string `json:"domain"`
	Operational   string `json:"operational"`
	Qualitative   bool   `json:"qualitative"`
	Hidden        bool   `json:"hidden"`
	Custom        bool   `json:"custom"`
	DecimalScale  int    `json:"decimalScale"`
	MetricValue   string `json:"metricValue"`
}

func (*SonarMetricKey) FormatValue

func (this *SonarMetricKey) FormatValue()

type SonarMetricRuleDto

type SonarMetricRuleDto struct {
	ID            int64     `json:"id"`
	CreatedAt     time.Time `json:"createdAt"`
	UpdatedAt     time.Time `json:"updatedAt"`
	Description   string    `json:"description"`
	ScopeType     string    `json:"scopeType"`
	ScopeID       string    `json:"scopeId"`
	MetricKey     string    `json:"metricKey"`
	MetricKeyID   int64     `json:"metricKeyId"`
	Operational   string    `json:"operational"`
	MetricValue   string    `json:"metricValue"`
	MetricKeyDesc string    `json:"metricKeyDesc"`
	DecimalScale  int       `json:"decimalScale"`
	ValueType     string    `json:"valueType"`
}

type SonarMetricRulesBatchDeleteRequest

type SonarMetricRulesBatchDeleteRequest struct {
	ScopeType string  `json:"scopeType"`
	ScopeID   string  `json:"scopeId"`
	IDs       []int64 `json:"ids"`
}

type SonarMetricRulesBatchInsertRequest

type SonarMetricRulesBatchInsertRequest struct {
	ScopeType string               `json:"scopeType"`
	ScopeID   string               `json:"scopeId"`
	Metrics   []SonarMetricRuleDto `json:"metrics"`
}

批量插入

type SonarMetricRulesDefinitionListRequest

type SonarMetricRulesDefinitionListRequest struct {
	ScopeType string `json:"scopeType"`
	ScopeID   string `json:"scopeId"`
}

查询用户未添加 metricKey 和 operational 列表

type SonarMetricRulesDeleteRequest

type SonarMetricRulesDeleteRequest struct {
	ID        int64  `json:"id"`
	ScopeType string `json:"scopeType"`
	ScopeID   string `json:"scopeId"`
}

删除

type SonarMetricRulesListRequest

type SonarMetricRulesListRequest struct {
	ScopeType string `json:"scopeType"`
	ScopeID   string `json:"scopeId"`
}

查询用户未添加 metricKey 和 operational 列表

type SonarMetricRulesListResp

type SonarMetricRulesListResp struct {
	Header
	Results []*SonarMetricKey `json:"data"`
}

type SonarMetricRulesPagingRequest

type SonarMetricRulesPagingRequest struct {
	ScopeType string `json:"scopeType"`
	ScopeID   string `json:"scopeId"`
	PageNo    int    `json:"pageNo"`
	PageSize  int    `json:"pageSize"`
}

分页查询

type SonarMetricRulesUpdateRequest

type SonarMetricRulesUpdateRequest struct {
	ID          int64  `json:"id"`
	Description string `json:"description"`
	MetricValue string `json:"metricValue"`
	ScopeType   string `json:"scopeType"`
	ScopeID     string `json:"scopeId"`
}

更新

type SonarStoreRequest

type SonarStoreRequest struct {
	ApplicationID    int64                `json:"applicationId"`
	BuildID          int64                `json:"buildId"`
	ProjectID        int64                `json:"projectId"`
	ApplicationName  string               `json:"applicationName"`
	Branch           string               `json:"branch"`
	GitRepo          string               `json:"gitRepo"`
	CommitID         string               `json:"commitId"`
	ProjectName      string               `json:"projectName"`
	OperatorID       string               `json:"operatorId"`
	LogID            string               `json:"logId"`
	Key              string               `json:"key"`
	Bugs             []*TestIssues        `json:"bugs"`
	CodeSmells       []*TestIssues        `json:"code_smells"`
	Vulnerabilities  []*TestIssues        `json:"vulnerabilities"`
	Coverage         []*TestIssuesTree    `json:"coverage"`
	Duplications     []*TestIssuesTree    `json:"duplications"`
	IssuesStatistics TestIssuesStatistics `json:"issues_statistics"`
}

type SonarStoreResponse

type SonarStoreResponse struct {
	Header
	Data interface{} `json:"data"`
}

type Source

type Source string
const (
	SourceSystem Source = "system"
	SourceUser   Source = "user"
)

type SparkConf

type SparkConf struct {
	Type             string          `json:"type"` // support Java, Python, Scala and R
	Kind             string          `json:"kind"` // support Client and Cluster
	PythonVersion    *string         `json:"pythonVersion,omitempty"`
	DriverResource   BigdataResource `json:"driverResource"`
	ExecutorResource BigdataResource `json:"executorResource"`
}

type Spec

type Spec struct {
	Name              string            `json:"name" yaml:"name"`
	DisplayName       string            `json:"displayName" yaml:"displayName"`
	Version           string            `json:"version" yaml:"version"`
	Type              string            `json:"type" yaml:"type"`
	Category          string            `json:"category" yaml:"category"`
	Desc              string            `json:"desc" yaml:"desc"`
	Labels            map[string]string `json:"labels" yaml:"labels"`
	LogoUrl           string            `json:"logoUrl" yaml:"logoUrl"`
	SupportedVersions []string          `json:"supportedVersions" yaml:"supportedVersions"`
	Public            bool              `json:"public" yaml:"public"`
	IsDefault         bool              `json:"isDefault" yaml:"isDefault"`
}

Spec spec.yml 格式

func (*Spec) CheckDiceVersion

func (spec *Spec) CheckDiceVersion(versionStr string) bool

CheckDiceVersion 检查版本是否支持

type StarDTO

type StarDTO struct {
	Dims          []DimDTO                 `json:"dims"`
	AtomicIndices []AtomicIndexDTO         `json:"atomicIndices"`
	RelationGroup map[string][]RelationDTO `json:"relationGroup"`
}

type StatusCode

type StatusCode string

StatusCode 是调度器资源对象(service,job)的状态码

const (
	// StatusError 底层调度器异常,或者容器异常导致无法拿到 status
	StatusError StatusCode = "Error"
	// StatusCreated 已创建状态
	StatusCreated StatusCode = "Created"
	// StatusStopped 已停止状态
	StatusStopped StatusCode = "Stopped"

	// StatusUnschedulable means that the scheduler can't schedule the job right now.
	// for example:
	// 1. due to resources;
	// 2. due to scheduler inactive (chronos / metronome..)
	// StatusUnschedulable 无法调度状态
	StatusUnschedulable StatusCode = "Unschedulable"
	// StatusNotFoundInCluster 在集群中未找到该job
	StatusNotFoundInCluster StatusCode = "NotFoundInCluster"
	// StatusRunning 正在运行状态
	StatusRunning StatusCode = "Running"
	// StatusStoppedOnOK 已成功退出状态
	StatusStoppedOnOK StatusCode = "StoppedOnOK"
	// StatusStoppedOnFailed 失败退出状态
	StatusStoppedOnFailed StatusCode = "StoppedOnFailed"
	// StatusStoppedByKilled 因被杀而退出状态
	StatusStoppedByKilled StatusCode = "StoppedByKilled"

	// StatusReady 已就绪状态
	StatusReady StatusCode = "Ready"
	// StatusProgressing 正在处理中状态
	StatusProgressing StatusCode = "Progressing"
	// StatusFailing 未成功启动状态
	StatusFailing StatusCode = "Failing"
	// StatusStarting 是实例状态,已运行但未收到健康检查事件,瞬态
	StatusStarting StatusCode = "Starting"
	// StatusHealthy 对实例而言,表示已启动并收到已通过健康检查事件
	// StatusHealthy 对服务而言,表示服务下所有实例均收到通过健康检查事件,且没有Starting状态的实例
	StatusHealthy StatusCode = "Healthy"
	// StatusUnHealthy 对实例而言,表示已启动并收到未通过健康检查事件
	// StatusUnHealthy 对服务而言,表示预期实例数与实际实例数不相等,或者至少一个副本的健康检查未收到或未通过
	StatusUnHealthy StatusCode = "UnHealthy"
	// StatusErrorAndDeleted 表示服务创建过程中出错,系统清理并删除了runtime
	StatusErrorAndDeleted StatusCode = "Error"
	// StatusFinished 已完成状态
	StatusFinished StatusCode = "Finished"
	// StatusFailed 已失败状态
	StatusFailed StatusCode = "Failed"
	// StatusUnknown 未知状态
	StatusUnknown StatusCode = "Unknown"
)

type StatusDesc

type StatusDesc struct {
	// Status 描述状态
	Status StatusCode `json:"status"`
	// LastMessage 描述状态的额外信息
	LastMessage string `json:"last_message,omitempty"`
	Reason      string `json:"reason"`
	// [DEPRECATED] UnScheduledReasons 描述具体资源不足的信息
	UnScheduledReasons ResourceInsufficientInfo `json:"unScheduledReasons,omitempty"`
}

StatusDesc 封装状态描述

type StepAPIMethod

type StepAPIMethod string
const (
	StepAPIMethodGet    StepAPIMethod = "GET"
	StepAPIMethodPOST   StepAPIMethod = "POST"
	StepAPIMethodDELETE StepAPIMethod = "DELETE"
	StepAPIMethodPUT    StepAPIMethod = "PUT"
)

func (StepAPIMethod) String

func (a StepAPIMethod) String() string

type StepAPIType

type StepAPIType string

func (StepAPIType) String

func (v StepAPIType) String() string

type Storage

type Storage struct {
	MountPoint string  `json:"mountPoint"`
	NAS        string  `json:"nas"`
	Gluster    Gluster `json:"gluster"`
}

Storage 共享存储配置

type StorageConfig

type StorageConfig struct {
	EnableNFS   bool `json:"enableNfs"`
	EnableLocal bool `json:"enableLocal"`
}

func (StorageConfig) EnableNFSVolume

func (conf StorageConfig) EnableNFSVolume() bool

whether to close the mounting of the network storage after closing, some special pipeline syntax ( ${{ dirs.xxx }} or old ${xxx} ) will not be available

func (*StorageConfig) EnableShareVolume

func (conf *StorageConfig) EnableShareVolume() bool

whether to open shared storage after open, the context directory in the pipeline will be shared

type SwitchOperation

type SwitchOperation struct {
	Meta SwitchOperationData `json:"meta"`
}

type SwitchOperationData

type SwitchOperationData struct {
	Id     uint64 `json:"id"`
	Enable bool   `json:"enable"`
}

type SwitchOrgRequest

type SwitchOrgRequest struct {
	OrgID  uint64 `json:"orgId"`
	UserID string `json:"userId"`
}

SwitchOrgRequest 切换组织请求结构

type Sysconf

type Sysconf struct {
	Cluster      Cluster           `json:"cluster"`
	SSH          SSH               `json:"ssh"`
	FPS          FPS               `json:"fps"`
	Storage      Storage           `json:"storage"`
	Docker       Docker            `json:"docker"`
	Nodes        Nodes             `json:"nodes"`
	NewNodes     Nodes             `json:"-"` // TODO
	Platform     Platform          `json:"platform"`
	MainPlatform *Platform         `json:"mainPlatform,omitempty"`
	Envs         map[string]string `json:"envs,omitempty"`
	OrgID        int               `json:"orgID,omitempty"`
}

Sysconf dice installer 配置

type TCType

type TCType string

TCType ticket comment type

const (
	// 一般评论
	NormalTCType TCType = "normal"
	// 关联事件评论
	IssueRelationTCType TCType = "issueRelation"
)

type TPRecord

type TPRecord struct {
	ID        int64     `json:"id"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`

	ApplicationID   int64             `json:"applicationId"`
	ProjectID       int64             `json:"projectId"`
	BuildID         int64             `json:"buildId"`
	Name            string            `json:"name"`
	UUID            string            `json:"uuid"`
	ApplicationName string            `json:"applicationName"`
	Output          string            `json:"output"`
	Desc            string            `json:"desc"`
	OperatorID      string            `json:"operatorId"`
	OperatorName    string            `json:"operatorName"`
	CommitID        string            `json:"commitId"`
	Branch          string            `json:"branch"`
	GitRepo         string            `json:"gitRepo"`
	CaseDir         string            `json:"caseDir"`
	Application     string            `json:"application"`
	Avatar          string            `json:"avatar,omitempty"`
	TType           TestType          `json:"type"`
	Totals          *TestTotals       `json:"totals"`
	ParserType      string            `json:"parserType"`
	Extra           map[string]string `json:"extra,omitempty"`
	Envs            map[string]string `json:"envs"`
	Workspace       DiceWorkspace     `json:"workspace"`
	Suites          []*TestSuite      `json:"suites"`
}

type TPStatus

type TPStatus string

TPStatus 测试计划状态

const (
	TPStatusDoing TPStatus = "DOING"
	TPStatusPause TPStatus = "PAUSE"
	TPStatusDone  TPStatus = "DONE"
)

func (TPStatus) Valid

func (s TPStatus) Valid() bool

type Tag

type Tag struct {
	Name    string     `json:"name"`
	ID      string     `json:"id"`
	Object  string     `json:"object"` // The id of this commit object
	Tagger  *Signature `json:"tagger"`
	Message string     `json:"message"`
}

Tag 标签

type TagCloudResourceVPCRequest

type TagCloudResourceVPCRequest struct {
	Vendor  string   `json:"vendor"`
	Cluster []string `json:"cluster"`
	VPCIDs  []string `json:"vpcIDs"`
	Region  string   `json:"region"`
}

type TagCloudResourceVPCResponse

type TagCloudResourceVPCResponse struct {
	Header
}

type TagInfo

type TagInfo struct {
	Name         string     `json:"name"`
	ID           string     `json:"id"`
	Object       string     `json:"object"` // The id of this commit object
	Tagger       *Signature `json:"tagger"`
	Message      string     `json:"message"`
	OperatorID   string     `json:"operatorId"`
	OperatorName string     `json:"operatorName"`
	Link         string     `json:"link"`
	EventName    string     `json:"eventName"`
}

TagInfo 标签详情

type TagResourceRequest

type TagResourceRequest struct {
	OrgID        uint64 `json:"orgID"`
	ClusterName  string `json:"clusterName"`
	IsNewCluster bool   `json:"isNewCluster"`
	Region       string `json:"region"`
	AccessKey    string `json:"accessKey"`
	SecretKey    string `json:"secretKey"`

	VpcID string `json:"vpcID"`

	AckIDs []string `json:"ackIDs"`
	EcsIDs []string `json:"ecsIDs"`
	EipIDs []string `json:"eipIDs"`
	NatIDs []string `json:"natIDs"`
	EsIDs  []string `json:"esIDs"`
	NasIDs []string `json:"nasIDs"`
	RdsIDs []string `json:"rdsIDs"`
	SlbIDs []string `json:"slbIDs"`
}

type Target

type Target struct {
	Receiver string `json:"receiver"`
	// 目前只有钉钉用
	Secret string `json:"secret"`
}

Target 目标详情

func (*Target) GetSignURL

func (t *Target) GetSignURL() (string, error)

type TargetIDSelectByLabelRequest

type TargetIDSelectByLabelRequest struct {
	Type PipelineLabelType `json:"type"`

	PipelineSources  []PipelineSource `json:"pipelineSource"`
	PipelineYmlNames []string         `json:"pipelineYmlName"`

	// AllowNoMatchLabels, default is false.
	AllowNoMatchLabels bool `json:"allowNoMatchLabels,omitempty"`
	// MUST match
	MustMatchLabels map[string][]string `json:"mustMatchLabels"`
	// ANY match
	AnyMatchLabels map[string][]string `json:"anyMatchLabels"`

	// AllowNoPipelineSources, default is false.
	// 默认查询必须带上 pipeline source,增加区分度
	AllowNoPipelineSources bool `json:"allowNoPipelineSources"`

	// OrderByTargetIDAsc 根据 target_id 升序,默认为 false,即降序
	OrderByTargetIDAsc bool `json:"orderByTargetIDAsc"`
}

TargetIDSelectByLabelRequest select target ids by labels.

type TaskInfo

type TaskInfo struct {
	ScriptName  string `json:"scriptName"`
	ClusterName string `json:"clusterName"`
	Running     bool   `json:"running"`
	LastStatus  bool   `json:"lastStatus"`
	Md5         string `json:"md5"`
	StartAt     int64  `json:"startAt"`
	EndAt       int64  `json:"endAt"`
	LastError   string `json:"lastError"`
	ErrorAt     int64  `json:"errorAt"`
}

TaskInfo 自动化运行任务信息

type TaskReportInfo

type TaskReportInfo struct {
	Name             string                   `json:"name"`
	ActionType       string                   `json:"actionType"`
	ActionVersion    string                   `json:"actionVersion"`
	ExecutorType     string                   `json:"executorType"`
	ClusterName      string                   `json:"clusterName"`
	TimeBegin        *time.Time               `json:"timeBegin,omitempty"`
	TimeEnd          *time.Time               `json:"timeEnd,omitempty"`
	TimeBeginQueue   *time.Time               `json:"timeBeginQueue,omitempty"`
	TimeEndQueue     *time.Time               `json:"timeEndQueue,omitempty"`
	QueueCostTimeSec int64                    `json:"queueCostTimeSec"`
	RunCostTimeSec   int64                    `json:"runCostTimeSec"`
	MachineStat      *PipelineTaskMachineStat `json:"machineStat,omitempty"`
	Meta             map[string]string        `json:"meta"`
}

type TemplateName

type TemplateName string

TemplateName 前端模版名称

const (
	// =====================Pipeline=============================
	CancelPipelineTemplate     TemplateName = "cancelPipeline"
	DeletePipelineKeyTemplate  TemplateName = "deletePipelineKey"
	UpdatePipelineKeyTemplate  TemplateName = "updatePipelineKey"
	CreatePipelineTemplate     TemplateName = "createPipeline"
	StartPipelineTimerTemplate TemplateName = "startPipelineTimer"
	StopPipelineTimerTemplate  TemplateName = "stopPipelineTimer"
	TogglePipelineTaskTemplate TemplateName = "togglePipelineTask"
	RerunPipelineTemplate      TemplateName = "rerunPipeline"
	RetryPipelineTemplate      TemplateName = "retryPipeline"
	StartPipelineTemplate      TemplateName = "startPipeline"
	// =====================App==================================
	CreateAppTemplate TemplateName = "createApp"
	DeleteAppTemplate TemplateName = "deleteApp"
	UpdateAppTemplate TemplateName = "updateApp"
	// ====================BranchRule============================
	CreateBranchRuleTemplate TemplateName = "createBranchRule"
	DeleteBranchRuleTemplate TemplateName = "deleteBranchRule"
	UpdateBranchRuleTemplate TemplateName = "updateBranchRule"
	// =====================Issue================================
	BatchUpdateIssueTemplate TemplateName = "batchUpdateIssue"
	CommentOnIssueTemplate   TemplateName = "commentOnIssue"
	DeleteIssueTemplate      TemplateName = "deleteIssue"
	CreateIssueTemplate      TemplateName = "createIssue"
	UpdateIssueTemplate      TemplateName = "updateIssue"
	// =====================Iteration============================
	CreateIterationTemplate TemplateName = "createIteration"
	DeleteIterationTemplate TemplateName = "deleteIteration"
	UpdateIterationTemplate TemplateName = "updateIteration"
	// =====================Org============================
	CreateOrgTemplate TemplateName = "createOrg"
	DeleteOrgTemplate TemplateName = "deleteOrg"
	UpdateOrgTemplate TemplateName = "updateOrg"
	// =====================Project==============================
	CreateProjectLabelTemplate TemplateName = "createProjectLabel"
	DeleteProjectLabelTemplate TemplateName = "deleteProjectLabel"
	UpdateProjectLabelTemplate TemplateName = "updateProjectLabel"
	CreateProjectTemplate      TemplateName = "createProject"
	DeleteProjectTemplate      TemplateName = "deleteProject"
	UpdateProjectTemplate      TemplateName = "updateProject"
	// =====================Member===============================
	AddMemberTemplate    TemplateName = "addMember"
	DeleteMemberTemplate TemplateName = "deleteMember"
	// =====================UC===================================
	LoginTemplate                       TemplateName = "login"
	LogoutTemplate                      TemplateName = "logout"
	UpdatePasswordTemplate              TemplateName = "updatePassword"
	RegisterUserTemplate                TemplateName = "registerUser"
	DisableUserTemplate                 TemplateName = "disableUser"
	EnableUserTemplate                  TemplateName = "enableUser"
	FreezeUserTemplate                  TemplateName = "freezeUser"
	UnfreezeUserTemplate                TemplateName = "unfreezeUser"
	DestroyUserTemplate                 TemplateName = "destroyUser"
	UpdateUserContactTemplate           TemplateName = "updateUserContact" // 已废弃,待删除
	UpdateUserTelTemplate               TemplateName = "updateUserTel"
	UpdateUserMailTemplate              TemplateName = "updateUserMail"
	UpdateUserLoginTypeTemplateName     TemplateName = "userLoginType"
	CreateUserTemplate                  TemplateName = "addUser"
	FreezedSinceLoginFailedTemplateName TemplateName = "freezedSinceLoginFailed"
	WrongPasswordTemplate               TemplateName = "wrongPassword"
	// =====================Domain=================================
	CreateServiceDomainTemplate TemplateName = "createServiceDomain"
	DeleteServiceDomainTemplate TemplateName = "deleteServiceDomain"

	// =====================APIGateway=============================
	CreateEndpointTemplate          TemplateName = "createEndpoint"
	UpdateEndpointTemplate          TemplateName = "updateEndpoint"
	DeleteEndpointTemplate          TemplateName = "deleteEndpoint"
	CreateRouteTemplate             TemplateName = "createRoute"
	UpdateRouteTemplate             TemplateName = "updateRoute"
	DeleteRouteTemplate             TemplateName = "deleteRoute"
	UpdateGlobalRoutePolicyTemplate TemplateName = "updateGlobalRoutePolicy"
	UpdateRoutePolicyTemplate       TemplateName = "updateRoutePolicy"
	CreateGatewayConsumerTemplate   TemplateName = "createGatewayConsumer"
	UpdateGatewayConsumerTemplate   TemplateName = "updateGatewayConsumer"
	DeleteGatewayConsumerTemplate   TemplateName = "deleteGatewayConsumer"
	CreateServiceApiTemplate        TemplateName = "createServiceApi"
	UpdateServiceApiTemplate        TemplateName = "updateServiceApi"
	DeleteServiceApiTemplate        TemplateName = "deleteServiceApi"

	// ==============================OPS=============================
	CreateCloudAccountTemplate  TemplateName = "createCloudAccount"
	DeleteCloudAccountTemplate  TemplateName = "deleteCloudAccount"
	CreateOnsTemplate           TemplateName = "createOns"
	DeleteOnsTemplate           TemplateName = "deleteOns"
	CreateOnsGroupTemplate      TemplateName = "createOnsGroup"
	CreateOnsTopicTemplate      TemplateName = "createOnsTopic"
	DeleteOnsTopicTemplate      TemplateName = "deleteOnsTopic"
	CreateRedisTemplate         TemplateName = "createRedis"
	DeleteRedisTemplate         TemplateName = "deleteRedis"
	CreateOssTemplate           TemplateName = "createOss"
	DeleteOssTemplate           TemplateName = "deleteOss"
	CreateVpcTemplate           TemplateName = "createVpc"
	SetCRTagsTemplate           TemplateName = "setCRTags"
	CreateVswitchTemplate       TemplateName = "createVswitch"
	CreateMysqlTemplate         TemplateName = "createMysql"
	CreateMysqlDbTemplate       TemplateName = "createMysqlDb"
	CreateMysqlAccountTemplate  TemplateName = "createMysqlAccount"
	DeleteMysqlTemplate         TemplateName = "deleteMysql"
	DeleteMysqlDbTemplate       TemplateName = "deleteMysqlDb"
	ImportClusterTemplate       TemplateName = "importCluster"
	CreateClusterTemplate       TemplateName = "createCluster"
	ClusterReferenceTemplate    TemplateName = "clusterReference"
	ClusterDereferenceTemplate  TemplateName = "clusterDereference"
	UpgradeClusterTemplate      TemplateName = "upgradeCluster"
	UpdateClusterConfigTemplate TemplateName = "updateClusterConfig"
	DeleteClusterTemplate       TemplateName = "deleteCluster"
	AddCloudNodeTemplate        TemplateName = "addCloudNode"
	UpdateNodeLabelsTemplate    TemplateName = "updateNodeLabels"
	AddExistNodeTemplate        TemplateName = "addExistNode"
	DeleteNodeTemplate          TemplateName = "deleteNode"
	EcsStartTemplate            TemplateName = "ecsStart"
	EcsStopTemplate             TemplateName = "ecsStop"
	EcsRestartTemplate          TemplateName = "ecsRestart"
	EcsAutoRenewTemplate        TemplateName = "ecsAutoRenew"

	// =====================Monitor=============================
	CreateOrgAlert                TemplateName = "createOrgAlert" // 企业告警
	DeleteOrgAlert                TemplateName = "deleteOrgAlert"
	SwitchOrgAlert                TemplateName = "switchOrgAlert"
	UpdateOrgAlert                TemplateName = "updateOrgAlert"
	CreateOrgCustomAlert          TemplateName = "createOrgCustomAlert" // 企业自定义告警
	DeleteOrgCustomAlert          TemplateName = "deleteOrgCustomAlert"
	SwitchOrgCustomAlert          TemplateName = "switchOrgCustomAlert"
	UpdateOrgCustomAlert          TemplateName = "updateOrgCustomAlert"
	CreateOrgReportTasks          TemplateName = "createOrgReportTasks" // 企业报表任务
	DeleteOrgReportTasks          TemplateName = "deleteOrgReportTasks"
	SwitchOrgReportTasks          TemplateName = "switchOrgReportTasks"
	UpdateOrgReportTasks          TemplateName = "updateOrgReportTasks"
	CreateMicroserviceAlert       TemplateName = "createMicroserviceAlert" // 微服务告警
	DeleteMicroserviceAlert       TemplateName = "deleteMicroserviceAlert"
	SwitchMicroserviceAlert       TemplateName = "switchMicroserviceAlert"
	UpdateMicroserviceAlert       TemplateName = "updateMicroserviceAlert"
	CreateMicroserviceCustomAlert TemplateName = "createMicroserviceCustomAlert" // 微服务自定义告警
	DeleteMicroserviceCustomAlert TemplateName = "deleteMicroserviceCustomAlert"
	SwitchMicroserviceCustomAlert TemplateName = "switchMicroserviceCustomAlert"
	UpdateMicroserviceCustomAlert TemplateName = "updateMicroserviceCustomAlert"
	CreateInitiativeMonitor       TemplateName = "createInitiativeMonitor" // 主动监控
	DeleteInitiativeMonitor       TemplateName = "deleteInitiativeMonitor"
	UpdateInitiativeMonitor       TemplateName = "updateInitiativeMonitor"
	// ========================Addon================================
	CreateCustomAddonTemplate TemplateName = "createCustomAddon"
	DeleteAddonTemplate       TemplateName = "deleteAddon"
	// ========================Runtime================================
	DeleteRuntimeTemplate TemplateName = "deleteRuntime"

	// =====================Notify============================
	CreateProjectNotifyTemplate  TemplateName = "createProjectNotify"
	CreateAppNotifyTemplate      TemplateName = "createAppNotify"
	DeleteProjectNotifyTemplate  TemplateName = "deleteProjectNotify"
	DeleteAppNotifyTemplate      TemplateName = "deleteAppNotify"
	DisableProjectNotifyTemplate TemplateName = "disableProjectNotify"
	DisableAppNotifyTemplate     TemplateName = "disableAppNotify"
	EnableProjectNotifyTemplate  TemplateName = "enableProjectNotify"
	EnableAppNotifyTemplate      TemplateName = "enableAppNotify"
	UpdateProjectNotifyTemplate  TemplateName = "updateProjectNotify"
	UpdateAppNotifyTemplate      TemplateName = "updateAppNotify"

	CreateOrgNotifyGroupTemplate     TemplateName = "createOrgNotifyGroup"
	CreateProjectNotifyGroupTemplate TemplateName = "createProjectNotifyGroup"
	CreateAppNotifyGroupTemplate     TemplateName = "createAppNotifyGroup"
	DeleteOrgNotifyGroupTemplate     TemplateName = "deleteOrgNotifyGroup"
	DeleteProjectNotifyGroupTemplate TemplateName = "deleteProjectNotifyGroup"
	DeleteAppNotifyGroupTemplate     TemplateName = "deleteAppNotifyGroup"
	UpdateOrgNotifyGroupTemplate     TemplateName = "updateOrgNotifyGroup"
	UpdateProjectNotifyGroupTemplate TemplateName = "updateProjectNotifyGroup"
	UpdateAppNotifyGroupTemplate     TemplateName = "updateAppNotifyGroup"

	// ========================Test Platform================================
	QaTestEnvCreateTemplate TemplateName = "qaTestEnvCreate"
	QaTestEnvUpdateTemplate TemplateName = "qaTestEnvUpdate"
	QaTestEnvDeleteTemplate TemplateName = "qaTestEnvDelete"
	// ========================cmdb==========================================
	CreateCertificatesTemplate TemplateName = "createCertificates"
	DeleteCertificatesTemplate TemplateName = "deleteCertificates"
	UpdateCertificatesTemplate TemplateName = "updateCertificates"
	CreateNoticesTemplate      TemplateName = "createNotices"
	DeleteNoticesTemplate      TemplateName = "deleteNotices"
	UpdateNoticesTemplate      TemplateName = "updateNotices"
	PublishNoticesTemplate     TemplateName = "publishNotices"
	UnPublishNoticesTemplate   TemplateName = "unPublishNotices"
	// ========================dicehub=======================================
	AddPublishItemsBlacklistTemplate    TemplateName = "addPublishItemsBlacklist"
	DeletePublishItemsBlacklistTemplate TemplateName = "deletePublishItemsBlacklist"
	ErasePublishItemsBlacklistTemplate  TemplateName = "erasePublishItemsBlacklist"
	// ========================publish=======================================
	CreatePublishItemsTemplate TemplateName = "createPublishItems"
	DeletePublishItemsTemplate TemplateName = "deletePublishItems"
	UpdatePublishItemsTemplate TemplateName = "updatePublishItems"
	// ========================gittar=======================================
	RepoLockedTemplate   TemplateName = "repoLocked"
	DeleteTagTemplate    TemplateName = "deleteTag"
	DeleteBranchTemplate TemplateName = "deleteBranch"
)

type TemplateRes

type TemplateRes struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type TemplateVersion

type TemplateVersion int

type TenantGroupDetails

type TenantGroupDetails struct {
	ProjectID string `json:"projectID"`
}

TenantGroupDetails .

type TenantGroupDetailsResponse

type TenantGroupDetailsResponse struct {
	Header
	Data TenantGroupDetails `json:"data"`
}

TenantGroupDetailsResponse .

type TenantGroupResponse

type TenantGroupResponse struct {
	Header
	Data string `json:"data"`
}

type Test

type Test struct {
	Name      string        `json:"name" yaml:"name"`
	Classname string        `json:"classname" yaml:"classname"`
	Duration  time.Duration `json:"duration" yaml:"duration"`
	Status    TestStatus    `json:"status" yaml:"status"`
	Error     interface{}   `json:"error" yaml:"error"`
	SystemOut string        `json:"stdout,omitempty"`
	SystemErr string        `json:"stderr,omitempty"`
}

Test represents the results of a single test run.

type TestCallBackRequest

type TestCallBackRequest struct {
	Results *TestResults `json:"results"`

	// Totals is the aggregated results of all tests.
	Totals *TestTotals  `json:"totals"`
	Suites []*TestSuite `json:"suites,omitempty"`
}

type TestCallBackResponse

type TestCallBackResponse struct {
	Header
	Data interface{} `json:"data"`
}

type TestCase

type TestCase struct {
	ID             uint64                  `json:"id"`
	Name           string                  `json:"name"`           // 用例名称
	Priority       TestCasePriority        `json:"priority"`       // 优先级
	PreCondition   string                  `json:"preCondition"`   // 前置条件
	Desc           string                  `json:"desc"`           // 补充说明
	Recycled       *bool                   `json:"recycled"`       // 是否回收,0:不回收,1:回收
	TestSetID      uint64                  `json:"testSetID"`      // 所属测试集 ID
	ProjectID      uint64                  `json:"projectID"`      // 当前项目id,用于权限校验
	CreatorID      string                  `json:"creatorID"`      // 创建者 ID
	UpdaterID      string                  `json:"updaterID"`      // 更新者 ID
	BugIDs         []uint64                `json:"bugIDs"`         // 关联缺陷 IDs
	LabelIDs       []uint64                `json:"labelIDs"`       // 关联缺陷 IDs
	Attachments    []string                `json:"attachments"`    // 上传附件 uuid 列表,仅供创建时使用
	StepAndResults []TestCaseStepAndResult `json:"stepAndResults"` // 步骤及结果
	Labels         []ProjectLabel          `json:"labels"`         // 标签
	APIs           []*ApiTestInfo          `json:"apis"`           // 接口测试集合
	APICount       TestCaseAPICount        `json:"apiCount"`
	CreatedAt      time.Time               `json:"createdAt"`
	UpdatedAt      time.Time               `json:"updatedAt"`
}

TestCase 测试用例详情

type TestCaseAPICount

type TestCaseAPICount struct {
	Total   uint64 `json:"total"`
	Created uint64 `json:"created"`
	Running uint64 `json:"running"`
	Passed  uint64 `json:"passed"`
	Failed  uint64 `json:"failed"`
}

TestCaseAPICount 用例接口状态个数

type TestCaseBatchCleanFromRecycleBinRequest

type TestCaseBatchCleanFromRecycleBinRequest struct {
	TestCaseIDs []uint64 `json:"testCaseIDs"`

	IdentityInfo
}

TestCaseBatchCleanFromRecycleBinRequest 从回收站彻底删除测试用例

type TestCaseBatchCleanFromRecycleBinResponse

type TestCaseBatchCleanFromRecycleBinResponse struct {
	Header
}

type TestCaseBatchCopyRequest

type TestCaseBatchCopyRequest struct {
	CopyToTestSetID uint64 `json:"copyToTestSetID"`

	ProjectID   uint64   `json:"projectID"`
	TestCaseIDs []uint64 `json:"testCaseIDs"`

	IdentityInfo
}

type TestCaseBatchCopyResponse

type TestCaseBatchCopyResponse struct {
	Header
	Data []uint64 `json:"data,omitempty"`
}

type TestCaseBatchCreateRequest

type TestCaseBatchCreateRequest struct {
	ProjectID uint64                  `json:"projectID"` // 当前项目 ID,用于权限校验
	TestCases []TestCaseCreateRequest `json:"testCases"`

	IdentityInfo
}

type TestCaseBatchCreateResponse

type TestCaseBatchCreateResponse struct {
	Header
	Data []uint64 `json:"data,omitempty"` // 批量创建出来的 test case id 列表
}

type TestCaseBatchUpdateRequest

type TestCaseBatchUpdateRequest struct {
	Priority        TestCasePriority `json:"priority"`
	Recycled        *bool            `json:"recycled,omitempty"`
	MoveToTestSetID *uint64          `json:"moveToTestSetID,omitempty"`

	TestCaseIDs []uint64 `json:"testCaseIDs"`

	IdentityInfo
}

TestCaseBatchUpdateRequest 测试用例批量更新请求

type TestCaseBatchUpdateResponse

type TestCaseBatchUpdateResponse struct {
	Header
	Data bool `json:"data"`
}

TestCaseBatchUpdateResponse PUT /api/usecases/batch 批量更新测试用例响应

type TestCaseCreateRequest

type TestCaseCreateRequest struct {
	ProjectID      uint64                  `json:"projectID"`      // 当前项目 ID,用于权限校验
	TestSetID      uint64                  `json:"testSetID"`      // 所属测试集 ID
	Name           string                  `json:"name"`           // 用例名称
	PreCondition   string                  `json:"preCondition"`   // 前置条件
	StepAndResults []TestCaseStepAndResult `json:"stepAndResults"` // 步骤及结果
	APIs           []*ApiTestInfo          `json:"apis"`           // 接口测试集合
	Desc           string                  `json:"desc"`           // 补充说明
	Priority       TestCasePriority        `json:"priority"`       // 优先级
	LabelIDs       []uint64                `json:"labelIDs"`       // 关联缺陷 IDs

	IdentityInfo
}

TestCaseCreateRequest POST 创建测试用例请求

type TestCaseCreateResponse

type TestCaseCreateResponse struct {
	Header
	Data uint64 `json:"data"`
}

TestCaseCreateResponse POST /api/usecases 创建测试用例响应

type TestCaseExcel

type TestCaseExcel struct {
	Title          string                  `title:"用例名称"`
	DirectoryName  string                  `title:"测试集"`
	PriorityName   string                  `title:"优先级"`
	PreCondition   string                  `title:"前置条件"`
	StepAndResults []TestCaseStepAndResult `title:"步骤与结果" group:"StepAndResults"`
	ApiInfos       []APIInfo               `title:"接口测试" group:"ApiInfos"`
}

TestCaseExcel 测试用例 Excel

type TestCaseExecStatus

type TestCaseExecStatus string

TestCaseExecStatus 测试用例执行状态

const (
	CaseExecStatusInit    TestCaseExecStatus = "INIT"   // 未执行
	CaseExecStatusSucc    TestCaseExecStatus = "PASSED" // 已通过
	CaseExecStatusFail    TestCaseExecStatus = "FAIL"   // 未通过
	CaseExecStatusBlocked TestCaseExecStatus = "BLOCK"  // 阻塞
)

type TestCaseExportRequest

type TestCaseExportRequest struct {
	TestCasePagingRequest

	FileType TestCaseFileType `schema:"fileType"`

	Locale string `schema:"-"`
}

TestCaseExportRequest 用例导出请求

type TestCaseExportResponse

type TestCaseExportResponse struct {
	Header
	Data int64 `json:"data"`
}

type TestCaseFileType

type TestCaseFileType string

TestCaseFileType 用例导出类型

var (
	TestCaseFileTypeExcel TestCaseFileType = "excel"
	TestCaseFileTypeXmind TestCaseFileType = "xmind"
)

func (TestCaseFileType) Valid

func (t TestCaseFileType) Valid() bool

type TestCaseFrom

type TestCaseFrom string

TestCaseFrom 测试用例来源

type TestCaseGetResponse

type TestCaseGetResponse struct {
	Header
	Data *TestCase `json:"data,omitempty"`
}

type TestCaseImportRequest

type TestCaseImportRequest struct {
	TestSetID uint64           `schema:"testSetID"`
	ProjectID uint64           `schema:"projectID"`
	FileType  TestCaseFileType `schema:"fileType"`

	IdentityInfo
}

TestCaseImportRequest 用例从 Excel 导入请求

type TestCaseImportResponse

type TestCaseImportResponse struct {
	Header
	Data *TestCaseImportResult `json:"data"`
}

type TestCaseImportResult

type TestCaseImportResult struct {
	SuccessCount uint64 `json:"successCount"`
}

type TestCaseListDaoData

type TestCaseListDaoData struct {
	BasicTestCase
	Directory string `json:"directory"` // 展示用例集路径,拼接/项目名称或者/项目名称/回收站
}

TestCaseListDaoData 测试用例List 数据库Data

type TestCaseListRequest

type TestCaseListRequest struct {
	IDs []uint64

	AllowMissingProjectID bool
	ProjectID             uint64

	// AllowEmptyTestSetIDs 是否允许 testSetIDs 为空,默认为 false
	AllowEmptyTestSetIDs bool
	TestSetIDs           []uint64

	Recycled bool
	IDOnly   bool
}

type TestCaseListResponse

type TestCaseListResponse struct {
	Header
	Data []TestCase `json:"data"`
}

type TestCasePagingRequest

type TestCasePagingRequest struct {
	// 分页参数
	PageNo   uint64 `schema:"pageNo"`
	PageSize uint64 `schema:"pageSize"`

	// 项目 ID,目前必填,因为测试用例的 testSetID 可以为 0,若无 projectID 只有 testSetID,会查到别的 project
	ProjectID        uint64              `schema:"projectID"`       // 当前项目 ID,用于权限校验
	TestSetID        uint64              `schema:"testSetID"`       // 所属测试集 ID
	NoSubTestSet     bool                `schema:"noSubTestSet"`    // 是否包括子测试集,默认包括
	NotInTestPlanIDs []uint64            `schema:"notInTestPlanID"` // 不在指定的测试计划中
	TestCaseIDs      []uint64            `schema:"testCaseID"`      // 内部使用,全量测试用例列表,最终结果为子集
	NotInTestCaseIDs []uint64            `schema:"-"`               // 内部使用,NotInTestPlanIDs 会转换为 NotInTestCaseIDs 列表
	TestSetCaseMap   map[uint64][]uint64 `schema:"-"`               // 内部使用,测试集和用例关系

	Query      string             `schema:"query"`     // title 过滤
	Priorities []TestCasePriority `schema:"priority"`  // 优先级
	UpdaterIDs []string           `schema:"updaterID"` // 更新人 ID 列表

	// 更新时间,外部传参使用时间戳
	TimestampSecUpdatedAtBegin *time.Duration `schema:"timestampSecUpdatedAtBegin"` // 更新时间左值, 包含区间值
	TimestampSecUpdatedAtEnd   *time.Duration `schema:"timestampSecUpdatedAtEnd"`   // 更新时间右值, 包含区间值
	// 更新时间,内部使用直接赋值
	UpdatedAtBeginInclude *time.Time `schema:"-"`
	UpdatedAtEndInclude   *time.Time `schema:"-"`

	// TODO 用例类型
	Labels []uint64 `schema:"label"` // 标签

	Recycled bool `schema:"recycled"` // 是否回收

	// order by field
	OrderFields            []string `schema:"orderField"` // order by 的字段顺序,影响排序先后过程
	OrderByPriorityAsc     *bool    `schema:"orderByPriorityAsc"`
	OrderByPriorityDesc    *bool    `schema:"orderByPriorityDesc"`
	OrderByUpdaterIDAsc    *bool    `schema:"orderByUpdaterIDAsc"`
	OrderByUpdaterIDDesc   *bool    `schema:"orderByUpdaterIDDesc"`
	OrderByUpdatedAtAsc    *bool    `schema:"orderByUpdatedAtAsc"`
	OrderByUpdatedAtDesc   *bool    `schema:"orderByUpdatedAtDesc"`
	OrderByIDAsc           *bool    `schema:"orderByIDAsc"`
	OrderByIDDesc          *bool    `schema:"orderByIDDesc"`
	OrderByTestSetIDAsc    *bool    `schema:"orderByTestSetIDAsc"`
	OrderByTestSetIDDesc   *bool    `schema:"orderByTestSetIDDesc"`
	OrderByTestSetNameAsc  *bool    `schema:"orderByTestSetNameAsc"`
	OrderByTestSetNameDesc *bool    `schema:"orderByTestSetNameDesc"`

	IdentityInfo
}

TestCasePagingRequest 测试用例分页查询

type TestCasePagingResponse

type TestCasePagingResponse struct {
	Header
	Data *TestCasePagingResponseData `json:"data"`
}

type TestCasePagingResponseData

type TestCasePagingResponseData struct {
	Total    uint64             `json:"total"`
	TestSets []TestSetWithCases `json:"testSets"`
	UserIDs  []string           `json:"userIDs,omitempty"`
}

type TestCasePriority

type TestCasePriority string

TestCasePriority 测试用例优先级

func (TestCasePriority) IsValid

func (priority TestCasePriority) IsValid() bool

type TestCaseQueryParams

type TestCaseQueryParams struct {
	Exclude         []uint64 `query:"exclude"`
	UsecaseIDs      []uint64 `query:"usecaseIds"`
	PageNo          uint64   `query:"pageNo"`
	TestSetID       uint64   `query:"testSetId"`
	ProjectID       uint64   `query:"projectId"`
	SelectProjectID uint64   `query:"selectProjectId"`
	TargetTestSetID uint64   `query:"targetTestSetId"`
	TargetProjectID uint64   `query:"targetProjectId"`
	Recycled        bool     `query:"recycled"`
}

TestCaseQueryParams 测试用例查询基本参数

type TestCaseStepAndResult

type TestCaseStepAndResult struct {
	Step   string `json:"step"`   // 操作步骤
	Result string `json:"result"` // 预期结果
}

TestCaseStepAndResult 操作步骤信息

type TestCaseUpdateRequest

type TestCaseUpdateRequest struct {
	ID             uint64                  `json:"-"`                  // 程序内部赋值使用
	Name           string                  `json:"name"`               // 用例名称
	Priority       TestCasePriority        `json:"priority"`           // 优先级
	PreCondition   string                  `json:"preCondition"`       // 前置条件,即使为空也会被更新
	StepAndResults []TestCaseStepAndResult `json:"stepAndResults"`     // 步骤及结果,即使为空也会被更新
	APIs           []*ApiTestInfo          `json:"apis"`               // 接口测试集合,更新、创建或删除
	Desc           string                  `json:"desc"`               // 补充说明
	LabelIDs       []uint64                `json:"labelIDs,omitempty"` // 标签列表

	IdentityInfo
}

TestCaseUpdateRequest 更新测试用例请求

type TestCaseUpdateResponse

type TestCaseUpdateResponse struct {
	Header
}

TestCaseUpdateResponse 更新测试用例响应

type TestCaseWithSimpleSetInfo

type TestCaseWithSimpleSetInfo struct {
	TestCase
	Directory string `json:"directory"`
}

TestCaseWithSimpleSetInfo testcase with simple set info

type TestCaseXmind

type TestCaseXmind struct {
	TestCaseExcel
}

TestCaseXmind 测试用例 Xmind

type TestDetailRecordResponse

type TestDetailRecordResponse struct {
	Header
	Data interface{} `json:"data"`
}

type TestError

type TestError struct {
	Message string `json:"message,omitempty" yaml:"message"`
	Type    string `json:"type,omitempty" yaml:"type"`
	Body    string `json:"body,omitempty" yaml:"body"`
}

type TestIssueStatisticsRating

type TestIssueStatisticsRating struct {
	Bugs            CodeQualityRatingLevel `json:"bugs"`
	Vulnerabilities CodeQualityRatingLevel `json:"vulnerabilities"`
	CodeSmells      CodeQualityRatingLevel `json:"codeSmells"`
}

type TestIssues

type TestIssues struct {
	Path      string    `json:"path"`
	TreeID    string    `json:"treeId"`
	Component string    `json:"component"`
	Message   string    `json:"message"`
	Rule      string    `json:"rule"`
	TextRange TextRange `json:"textRange"`
	Severity  string    `json:"severity"`
	Status    string    `json:"status"`
	Line      int       `json:"line"`
	Code      []string  `json:"code"`
}

type TestIssuesStatistics

type TestIssuesStatistics struct {
	Bugs            string                     `json:"bugs"`
	Coverage        string                     `json:"coverage"`
	Vulnerabilities string                     `json:"vulnerabilities"`
	CodeSmells      string                     `json:"codeSmells"`
	Duplications    string                     `json:"duplications"`
	Rating          *TestIssueStatisticsRating `json:"rating,omitempty"`
	SonarKey        string                     `json:"sonarKey"`
	Path            string                     `json:"path"`
	UT              string                     `json:"ut"`
	CommitID        string                     `json:"commitId,omitempty"`
	Branch          string                     `json:"branch,omitempty"`
	Time            time.Time                  `json:"time,omitempty"`
}

type TestIssuesTree

type TestIssuesTree struct {
	Path     string          `json:"path"`
	TreeID   string          `json:"treeId"`
	Lines    []string        `json:"lines"`
	Name     string          `json:"name"`
	Language string          `json:"language"`
	Measures []*TestMeasures `json:"measures"`
}

type TestMeasures

type TestMeasures struct {
	Metric string `json:"metric"`
	Value  string `json:"value"`
}

type TestPlan

type TestPlan struct {
	ID         uint64            `json:"id"`
	Name       string            `json:"name"`
	OwnerID    string            `json:"ownerID"`
	PartnerIDs []string          `json:"partnerIDs"`
	Status     TPStatus          `json:"status"`
	ProjectID  uint64            `json:"projectID"`
	CreatorID  string            `json:"creatorID"`
	UpdaterID  string            `json:"updaterID"`
	CreatedAt  *time.Time        `json:"createdAt"`
	UpdatedAt  *time.Time        `json:"updatedAt"`
	Summary    string            `json:"summary"`
	StartedAt  *time.Time        `json:"startedAt"`
	EndedAt    *time.Time        `json:"endedAt"`
	RelsCount  TestPlanRelsCount `json:"relsCount"`
	Type       TestPlanType      `json:"type"`
	Inode      string            `json:"inode,omitempty"`
}

TestPlan 测试计划

type TestPlanAPITestExecuteRequest

type TestPlanAPITestExecuteRequest struct {
	TestPlanID  uint64   `json:"testPlanID"`
	TestCaseIDs []uint64 `json:"testCaseIDs"`
	EnvID       uint64   `json:"envID"`

	IdentityInfo
}

ApiApiTestExecuteRequest 执行接口测试计划请求

type TestPlanAPITestExecuteResponse

type TestPlanAPITestExecuteResponse struct {
	Header
	Data uint64 `json:"data"` // triggered pipeline id
}

type TestPlanActiveKey

type TestPlanActiveKey string
const (
	ConfigTestPlanActiveKey  TestPlanActiveKey = "Config"
	ExecuteTestPlanActiveKey TestPlanActiveKey = "Execute"
)

func (TestPlanActiveKey) String

func (s TestPlanActiveKey) String() string

type TestPlanCasePagingResponseData

type TestPlanCasePagingResponseData struct {
	Total    uint64                    `json:"total"`
	TestSets []TestSetWithPlanCaseRels `json:"testSets"`
	UserIDs  []string                  `json:"userIDs"`
}

TestPlanCasePagingResponseData 测试计划内测试用例列表响应数据

type TestPlanCaseRel

type TestPlanCaseRel struct {
	ID         uint64             `json:"id"`
	Name       string             `json:"name"`
	Priority   TestCasePriority   `json:"priority"`
	TestPlanID uint64             `json:"testPlanID"`
	TestSetID  uint64             `json:"testSetID"`
	TestCaseID uint64             `json:"testCaseID"`
	ExecStatus TestCaseExecStatus `json:"execStatus"`
	CreatorID  string             `json:"creatorID"`
	UpdaterID  string             `json:"updaterID"`
	ExecutorID string             `json:"executorID"`
	CreatedAt  time.Time          `json:"createdAt"`
	UpdatedAt  time.Time          `json:"updatedAt"`
	APICount   TestCaseAPICount   `json:"apiCount"`

	IssueBugs []TestPlanCaseRelIssueBug `json:"issueBugs"`
}

TestPlanCaseRel

type TestPlanCaseRelBatchUpdateRequest

type TestPlanCaseRelBatchUpdateRequest struct {
	Delete     bool               `json:"delete"`
	ExecutorID string             `json:"executorID"`
	ExecStatus TestCaseExecStatus `json:"execStatus"`

	TestPlanID  uint64   `json:"-"`
	TestSetID   *uint64  `json:"testSetID"` // 批量递归操作测试集下的所有关联;与 relationIDs 的关系为 并集
	RelationIDs []uint64 `json:"relationIDs"`

	ProjectID uint64 `json:"-"`

	IdentityInfo
}

TestPlanCaseRelBatchUpdateRequest 测试计划用例关系更新请求

type TestPlanCaseRelCreateRequest

type TestPlanCaseRelCreateRequest struct {
	TestPlanID  uint64   `json:"testPlanID"`
	TestCaseIDs []uint64 `json:"testCaseIDs"`
	// 若 TestSetIDs 不为空,则添加测试集下所有测试用例到测试集下,与 TestCaseIDs 取合集
	TestSetIDs []uint64 `json:"testSetIDs"`

	IdentityInfo
}

TestPlanCaseRelCreateRequest 测试计划用例关系创建请求

type TestPlanCaseRelCreateResponse

type TestPlanCaseRelCreateResponse struct {
	Header
	Data *TestPlanCaseRelCreateResult `json:"data,omitempty"`
}

type TestPlanCaseRelCreateResult

type TestPlanCaseRelCreateResult struct {
	TotalCount uint64 `json:"totalCount"`
}

type TestPlanCaseRelExportRequest

type TestPlanCaseRelExportRequest struct {
	TestPlanCaseRelPagingRequest

	Locale   string           `schema:"-"`
	FileType TestCaseFileType `schema:"fileType"`
}

TestPlanCaseRelExportRequest 测试计划用例导出请求

type TestPlanCaseRelExportResponse

type TestPlanCaseRelExportResponse struct {
	Header
	Data int64 `json:"data"`
}

type TestPlanCaseRelGetRequest

type TestPlanCaseRelGetRequest struct {
	RelationID uint64 `json:"relationID"`
}

type TestPlanCaseRelGetResponse

type TestPlanCaseRelGetResponse struct {
	Header
	Data *TestPlanCaseRel `json:"data"`
}

type TestPlanCaseRelIssueBug

type TestPlanCaseRelIssueBug struct {
	IssueRelationID uint64           `json:"issueRelationID"`
	IssueID         uint64           `json:"issueID"`
	IterationID     int64            `json:"iterationID"`
	Title           string           `json:"title"`
	State           IssueState       `json:"state"`
	StateBelong     IssueStateBelong `json:"stateBelong"`
	Priority        IssuePriority    `json:"priority"`
	CreatedAt       time.Time        `json:"createdAt"`
}

type TestPlanCaseRelIssueRelationAddRequest

type TestPlanCaseRelIssueRelationAddRequest struct {
	IssueIDs []uint64 `json:"issueIDs"`

	TestPlanID        uint64 `json:"-"`
	TestPlanCaseRelID uint64 `json:"-"`

	IdentityInfo
}

TestPlanCaseRelIssueRelationAddRequest 新增测试计划用例与缺陷关联关系请求

type TestPlanCaseRelIssueRelationAddResponse

type TestPlanCaseRelIssueRelationAddResponse struct {
	Header
}

type TestPlanCaseRelIssueRelationRemoveRequest

type TestPlanCaseRelIssueRelationRemoveRequest struct {
	IssueTestCaseRelationIDs []uint64 `json:"issueTestCaseRelationIDs"`

	TestPlanID        uint64 `json:"-"`
	TestPlanCaseRelID uint64 `json:"-"`

	IdentityInfo
}

TestPlanCaseRelIssueRelationRemoveRequest 解除测试计划用例与缺陷关联关系请求

type TestPlanCaseRelIssueRelationRemoveResponse

type TestPlanCaseRelIssueRelationRemoveResponse struct {
	Header
}

type TestPlanCaseRelListRequest

type TestPlanCaseRelListRequest struct {
	IDs                   []uint64             `schema:"id"`
	TestPlanIDs           []uint64             `schema:"testPlanID"`
	TestSetIDs            []uint64             `schema:"testSetID"`
	CreatorIDs            []string             `schema:"creatorID"`
	UpdaterIDs            []string             `schema:"updaterID"`
	ExecutorIDs           []string             `schema:"executorID"`
	ExecStatuses          []TestCaseExecStatus `schema:"execStatus"`
	UpdatedAtBeginInclude *time.Time
	UpdatedAtEndInclude   *time.Time
	IDOnly                bool

	IdentityInfo
}

TestPlanCaseRelListRequest 测试计划用户关系列表请求

type TestPlanCaseRelListResponse

type TestPlanCaseRelListResponse struct {
	Header
	Data []TestPlanCaseRel `json:"data"`
}

TestPlanCaseRelListResponse 测试计划测试用例关系响应

type TestPlanCaseRelPagingRequest

type TestPlanCaseRelPagingRequest struct {
	PageNo   uint64 `schema:"pageNo"`
	PageSize uint64 `schema:"pageSize"`

	RelIDs       []uint64             `schema:"relationID"`
	TestPlanID   uint64               `schema:"-"`
	TestSetID    uint64               `schema:"testSetID"`
	Query        string               `schema:"query"`
	Priorities   []TestCasePriority   `schema:"priority"`
	UpdaterIDs   []string             `schema:"updaterID"`
	ExecutorIDs  []string             `schema:"executorID"`
	ExecStatuses []TestCaseExecStatus `schema:"execStatus"`

	// 更新时间,外部传参使用时间戳
	TimestampSecUpdatedAtBegin *time.Duration `schema:"timestampSecUpdatedAtBegin"` // 更新时间左值, 包含区间值
	TimestampSecUpdatedAtEnd   *time.Duration `schema:"timestampSecUpdatedAtEnd"`   // 更新时间右值, 包含区间值
	// 更新时间,内部使用直接赋值
	UpdatedAtBeginInclude *time.Time `schema:"-"`
	UpdatedAtEndInclude   *time.Time `schema:"-"`

	// order by field
	OrderByPriorityAsc   *bool `schema:"orderByPriorityAsc"`
	OrderByPriorityDesc  *bool `schema:"orderByPriorityDesc"`
	OrderByUpdaterIDAsc  *bool `schema:"orderByUpdaterIDAsc"`
	OrderByUpdaterIDDesc *bool `schema:"orderByUpdaterIDDesc"`
	OrderByUpdatedAtAsc  *bool `schema:"orderByUpdatedAtAsc"`
	OrderByUpdatedAtDesc *bool `schema:"orderByUpdatedAtDesc"`
	OrderByIDAsc         *bool `schema:"orderByIDAsc"`
	OrderByIDDesc        *bool `schema:"orderByIDDesc"`

	IdentityInfo
}

TestPlanCaseRelPagingRequest 测试计划内测试用例列表请求

type TestPlanCaseRelPagingResponse

type TestPlanCaseRelPagingResponse struct {
	Header
	Data *TestPlanCasePagingResponseData `json:"data"`
}

type TestPlanCreateRequest

type TestPlanCreateRequest struct {
	Name       string   `json:"name"`
	OwnerID    string   `json:"ownerID"`
	PartnerIDs []string `json:"partnerIDs"`
	ProjectID  uint64   `json:"projectID"`

	// 是否是自动化测试计划
	IsAutoTest bool `json:"isAutoTest"`

	IdentityInfo
}

TestPlanCreateRequest 测试计划创建请求

type TestPlanCreateResponse

type TestPlanCreateResponse struct {
	Header
	Data uint64 `json:"data"`
}

TestPlanCreateResponse 测试计划创建响应

type TestPlanGetResponse

type TestPlanGetResponse struct {
	Header
	Data TestPlan `json:"data"`
}

TestPlanGetResponse 测试计划详情响应

type TestPlanMember

type TestPlanMember struct {
	ID         uint64             `json:"id"`
	TestPlanID uint64             `json:"testPlanID"`
	Role       TestPlanMemberRole `json:"role"`
	UserID     string             `json:"userID"`
	CreatedAt  time.Time          `json:"createdAt"`
	UpdatedAt  time.Time          `json:"updatedAt"`
}

type TestPlanMemberRole

type TestPlanMemberRole string
var (
	TestPlanMemberRoleOwner   TestPlanMemberRole = "Owner"
	TestPlanMemberRolePartner TestPlanMemberRole = "Partner"
)

func (TestPlanMemberRole) Invalid

func (role TestPlanMemberRole) Invalid() bool

func (TestPlanMemberRole) IsOwner

func (role TestPlanMemberRole) IsOwner() bool

func (TestPlanMemberRole) IsPartner

func (role TestPlanMemberRole) IsPartner() bool

func (TestPlanMemberRole) Valid

func (role TestPlanMemberRole) Valid() bool

type TestPlanPagingRequest

type TestPlanPagingRequest struct {
	Name      string       `schema:"name"`
	Statuses  []TPStatus   `schema:"status"`
	ProjectID uint64       `schema:"projectID"`
	Type      TestPlanType `schema:"type"`

	// member about
	OwnerIDs   []string `schema:"ownerID"`
	PartnerIDs []string `schema:"partnerID"`
	UserIDs    []string `schema:"userID"` // 只要是成员就可以,即我负责的或我参与的

	// +optional default 1
	PageNo uint64 `schema:"pageNo"`
	// +optional default 10
	PageSize uint64 `schema:"pageSize"`

	IdentityInfo
}

TestPlanPagingRequest 测试计划列表请求

type TestPlanPagingResponse

type TestPlanPagingResponse struct {
	Header
	UserInfoHeader
	Data TestPlanPagingResponseData `json:"data"`
}

TestPlanPagingResponse 测试计划响应

type TestPlanPagingResponseData

type TestPlanPagingResponseData struct {
	Total   uint64     `json:"total"`
	List    []TestPlan `json:"list"`
	UserIDs []string   `json:"userIDs,omitempty"`
}

TestPlanPagingResponseData 测试计划响应数据

type TestPlanRelsCount

type TestPlanRelsCount struct {
	Total uint64 `json:"total"`
	Init  uint64 `json:"init"`
	Succ  uint64 `json:"succ"`
	Fail  uint64 `json:"fail"`
	Block uint64 `json:"block"`
}

TestPlanRelsCount 测试计划关联的测试用例状态个数

type TestPlanReport

type TestPlanReport struct {
	TestPlan       TestPlan                     `json:"testPlan"`
	RelsCount      TestPlanRelsCount            `json:"relsCount"`
	APICount       TestCaseAPICount             `json:"apiCount"`
	ExecutorStatus map[string]TestPlanRelsCount `json:"executorStatus"`

	UserIDs []string `json:"userIDs"`
}

type TestPlanReportGenerateResponse

type TestPlanReportGenerateResponse struct {
	Header
	Data *TestPlanReport `json:"data"`
}

TestPlanReportGenerateResponse 测试计划报告生成响应

type TestPlanTestCaseRelDeleteRequest

type TestPlanTestCaseRelDeleteRequest struct {
	// +required
	ProjectID uint64 `json:"projectId"`
	// +required
	TestPlanID  uint64   `json:"testPlanId"`
	UsecaseIDs  []uint64 `json:"usecaseIds"`
	ExcludeIDs  []uint64 `json:"excludeIds"`
	AllSelected bool     `json:"allSelected"` // 为 true 时,usecaseIDs 为空

	IdentityInfo
}

TestPlanTestCaseRelDeleteRequest 测试计划用例关系删除请求

type TestPlanTestSetListResponse

type TestPlanTestSetListResponse TestSetListResponse

type TestPlanTestSetsListRequest

type TestPlanTestSetsListRequest struct {
	TestPlanID      uint64 `schema:"-"`
	ParentTestSetID uint64 `schema:"parentTestSetID"`

	IdentityInfo
}

TestPlanTestSetsListRequest 测试计划下的测试集列表请求

type TestPlanType

type TestPlanType string
var (
	TestPlanTypeManual   TestPlanType = "m"
	TestPlanTypeAutoTest TestPlanType = "a"
)

type TestPlanUpdateRequest

type TestPlanUpdateRequest struct {
	Name                  string         `json:"name"`
	OwnerID               string         `json:"ownerID"`
	PartnerIDs            []string       `json:"partnerIDs"`
	Status                TPStatus       `json:"status"`
	Summary               string         `json:"summary"`
	TimestampSecStartedAt *time.Duration `json:"timestampSecStartedAt"`
	TimestampSecEndedAt   *time.Duration `json:"timestampSecEndedAt"`

	TestPlanID uint64 `json:"-"`

	IdentityInfo
}

TestPlanUpdateRequest 测试计划更新请求

type TestPlanV2

type TestPlanV2 struct {
	ID        uint64            `json:"id"`
	Name      string            `json:"name"`
	Desc      string            `json:"desc"`
	ProjectID uint64            `json:"project"`
	SpaceID   uint64            `json:"spaceID"`
	SpaceName string            `json:"spaceName"`
	Creator   string            `json:"creator"`
	Owners    []string          `json:"owners"`
	Updater   string            `json:"updater"`
	Steps     []*TestPlanV2Step `json:"steps"`
	CreateAt  *time.Time        `json:"createAt"`
	UpdateAt  *time.Time        `json:"updateAt"`
}

TestPlanV2 testplan

type TestPlanV2CreateRequest

type TestPlanV2CreateRequest struct {
	Name      string   `json:"name"`
	Desc      string   `json:"desc"`
	Owners    []string `json:"owners"`
	ProjectID uint64   `json:"projectID"`
	SpaceID   uint64   `json:"spaceID"`

	IdentityInfo
}

TestPlanV2CreateRequest testplan v2 create request

func (*TestPlanV2CreateRequest) Check

func (tp *TestPlanV2CreateRequest) Check() error

Check check create request is valid

type TestPlanV2CreateResponse

type TestPlanV2CreateResponse struct {
	Header
	Data uint64 `json:"data"`
}

TestPlanV2CreateResponse testplan v2 create response

type TestPlanV2GetResponse

type TestPlanV2GetResponse struct {
	Header
	UserInfoHeader
	Data TestPlanV2 `json:"data"`
}

TestPlanV2GetResponse testplan get response

type TestPlanV2PagingRequest

type TestPlanV2PagingRequest struct {
	Name      string   `schema:"name"`
	Owners    []string `schema:"owners"`
	Creator   string   `schema:"creator"`
	Updater   string   `schema:"updater"`
	SpaceID   uint64   `schema:"spaceID"`
	ProjectID uint64   `schema:"projectID"`

	// +optional default 1
	PageNo uint64 `schema:"pageNo"`
	// +optional default 20
	PageSize uint64 `schema:"pageSize"`
	// ids
	IDs []uint64

	IdentityInfo
}

TestPlanV2PagingRequest testplan v2 query request

func (*TestPlanV2PagingRequest) UrlQueryString

func (tpr *TestPlanV2PagingRequest) UrlQueryString() map[string][]string

type TestPlanV2PagingResponse

type TestPlanV2PagingResponse struct {
	Header
	UserInfoHeader
	Data TestPlanV2PagingResponseData `json:"data"`
}

TestPlanV2PagingResponse testplan query response

type TestPlanV2PagingResponseData

type TestPlanV2PagingResponseData struct {
	Total   int           `json:"total"`
	List    []*TestPlanV2 `json:"list"`
	UserIDs []string      `json:"userIDs,omitempty"`
}

TestPlanV2PagingResponseData testplan query response data

type TestPlanV2Step

type TestPlanV2Step struct {
	SceneSetID   uint64 `json:"sceneSetID"`
	SceneSetName string `json:"sceneSetName"`
	PreID        uint64 `json:"preID"`
	PlanID       uint64 `json:"planID"`
	ID           uint64 `json:"id"`
}

TestPlanV2Step step of test plan

type TestPlanV2StepAddRequest

type TestPlanV2StepAddRequest struct {
	SceneSetID uint64 `json:"sceneSetID"`
	PreID      uint64 `json:"preID"`
	TestPlanID uint64 `json:"-"`

	IdentityInfo
}

TestPlanV2StepAddRequest Add a step in the test plan request

type TestPlanV2StepAddResp

type TestPlanV2StepAddResp struct {
	Header
	Data uint64 `json:"data"`
}

type TestPlanV2StepDeleteRequest

type TestPlanV2StepDeleteRequest struct {
	StepID     uint64 `json:"stepID"`
	TestPlanID uint64 `json:"-"`

	IdentityInfo
}

TestPlanV2StepDeleteRequest Delete a step in the test plan request

type TestPlanV2StepGetResponse

type TestPlanV2StepGetResponse struct {
	Header
	Data TestPlanV2Step `json:"data"`
}

TestPlanV2GetResponse testplan get response

type TestPlanV2StepMoveResp

type TestPlanV2StepMoveResp struct {
	Header
	Data string `json:"data"`
}

type TestPlanV2StepUpdateRequest

type TestPlanV2StepUpdateRequest struct {
	StepID      uint64 `json:"stepID"`
	PreID       uint64 `json:"preID"`
	ScenesSetId uint64 `json:"scenesSetId"`
	TestPlanID  uint64 `json:"-"`

	IdentityInfo
}

TestPlanV2StepUpdateRequest Update a step in the test plan request

type TestPlanV2StepUpdateResp

type TestPlanV2StepUpdateResp struct {
	Header
	Data string `json:"data"`
}

type TestPlanV2UpdateRequest

type TestPlanV2UpdateRequest struct {
	Name       string   `json:"name"`
	Desc       string   `json:"desc"`
	SpaceID    uint64   `json:"spaceID"`
	Owners     []string `json:"owners"`
	TestPlanID uint64   `json:"-"`

	IdentityInfo
}

TestPlanV2UpdateRequest testplan v2 update request

type TestPlanV2UpdateResponse

type TestPlanV2UpdateResponse struct {
	Header
	Data uint64 `json:"data"`
}

TestPlanV2UpdateResponse testplan v2 update response

type TestRecordPagingRequest

type TestRecordPagingRequest struct {
	PageNo   int `schema:"pageNo"`
	PageSize int `schema:"pageSize"`

	AppID uint64 `schema:"applicationId,required"`
}

type TestRecordsResponse

type TestRecordsResponse struct {
	Header
	Data interface{} `json:"data"`
}

type TestResults

type TestResults struct {
	ApplicationID   int64             `json:"applicationId"`
	BuildID         int64             `json:"buildId"`
	ProjectID       int64             `json:"projectId"`
	Type            TestType          `json:"type"`
	Name            string            `json:"name"`
	ApplicationName string            `json:"applicationName"`
	Branch          string            `json:"branch"`
	GitRepo         string            `json:"gitRepo"`
	CommitID        string            `json:"commitId"`
	OperatorName    string            `json:"operatorName"`
	OperatorID      string            `json:"operatorId"`
	Status          string            `json:"status"`
	Workspace       string            `json:"workspace"`
	ParserType      string            `json:"parserType"`
	UUID            string            `json:"uuid"`
	Extra           map[string]string `json:"extra,omitempty"`
}

type TestSet

type TestSet struct {
	// 测试集ID
	ID uint64 `json:"id"`
	// 测试集名称
	Name string `json:"name"`
	// 项目 ID
	ProjectID uint64 `json:"projectID"`
	// 父测试集ID
	ParentID uint64 `json:"parentID"`
	// 是否回收
	Recycled bool `json:"recycled"`
	// 显示的目录地址
	Directory string `json:"directoryName"`
	// 排序
	Order int `json:"order"`
	// 创建人ID
	CreatorID string `json:"creatorID"`
	// 更新人ID
	UpdaterID string `json:"updaterID"`
}

TestSetCreateRequest POST /api/testsets 创建测试集返回结构

type TestSetCleanFromRecycleBinRequest

type TestSetCleanFromRecycleBinRequest struct {
	TestSetID uint64 `json:"-"`

	IdentityInfo
}

TestSetCleanFromRecycleBinRequest 从回收站彻底删除测试集

type TestSetCleanFromRecycleBinResponse

type TestSetCleanFromRecycleBinResponse struct {
	Header
}

type TestSetCommonResponse

type TestSetCommonResponse struct {
	Header
	Data string `json:"data"`
}

TestSetCommonResponse 通用返回结构

type TestSetCopyRequest

type TestSetCopyRequest struct {
	CopyToTestSetID uint64 `json:"copyToTestSetID"`

	TestSetID uint64 `json:"-"`

	IdentityInfo
}

TestSetCopyRequest 测试集复制请求

type TestSetCopyResponse

type TestSetCopyResponse struct {
	Header
	Data uint64 `json:"data"`
}

type TestSetCreateRequest

type TestSetCreateRequest struct {
	// 项目ID
	ProjectID *uint64 `json:"projectID"`
	// 父测试集ID
	ParentID *uint64 `json:"parentID"`
	// 名称
	Name string `json:"name"`

	IdentityInfo
}

TestSetCreateRequest POST /api/testsets 创建测试集

type TestSetCreateResponse

type TestSetCreateResponse struct {
	Header
	Data *TestSet `json:"data"`
}

TestSetCreateResponse POST /api/testsets 创建测试集合

type TestSetGetRequest

type TestSetGetRequest struct {
	ID uint64 `json:"id"`
}

type TestSetGetResponse

type TestSetGetResponse struct {
	Header
	Data *TestSetWithAncestors `json:"data"`
}

type TestSetListRequest

type TestSetListRequest struct {
	// 是否回收
	Recycled bool `schema:"recycled"`
	// 父测试集 ID
	ParentID *uint64 `schema:"parentID"`
	// 项目 ID
	ProjectID *uint64 `schema:"projectID"`

	// 指定 id 列表
	TestSetIDs []uint64 `schema:"testSetID"`

	// 是否不递归,默认 false,即默认递归
	NoSubTestSets bool `json:"noSubTestSets"`
}

TestSetListRequest GET /api/testsets 测试集列表

type TestSetListResponse

type TestSetListResponse struct {
	Header
	Data []TestSet `json:"data"`
}

TestSetListResponse GET /api/testsets 测试集列表

type TestSetRecoverFromRecycleBinRequest

type TestSetRecoverFromRecycleBinRequest struct {
	TestSetID          uint64  `json:"-"`
	RecoverToTestSetID *uint64 `json:"recoverToTestSetID"`

	IdentityInfo
}

TestSetRecoverFromRecycleBinRequest 从回收站恢复测试集

type TestSetRecoverFromRecycleBinResponse

type TestSetRecoverFromRecycleBinResponse struct {
	Header
}

type TestSetRecycleRequest

type TestSetRecycleRequest struct {
	TestSetID uint64 `json:"-"`

	// IsRoot 表示递归回收测试集时是否是最外层的根测试集
	// 如果是根测试集,且 parentID != 0,回收时需要将 parentID 置为 0,否则在回收站中无法找到
	IsRoot bool `json:"-"`

	IdentityInfo
}

TestSetRecycleRequest 回收测试集至回收站

type TestSetRecycleResponse

type TestSetRecycleResponse struct {
	Header
}

type TestSetUpdateRequest

type TestSetUpdateRequest struct {
	// 基础信息
	TestSetID uint64 `json:"testsetID"`

	// 待更新项
	Name           *string `json:"name"`
	MoveToParentID *uint64 `json:"moveToParentID"` // 移动至哪个父测试集下

	IdentityInfo
}

TestSetUpdateRequest PUT /api/testset 更新测试集

type TestSetUpdateResponse

type TestSetUpdateResponse struct {
	TestSetGetResponse
}

type TestSetWithAncestors

type TestSetWithAncestors struct {
	TestSet
	// ancestors
	Ancestors []TestSet `json:"ancestors,omitempty"`
}

type TestSetWithCases

type TestSetWithCases struct {
	TestSetID uint64     `json:"testSetID"` // 所属测试集 ID
	Recycled  bool       `json:"recycled"`  // 用例集是否回收
	Directory string     `json:"directory"` // 展示用例集路径,拼接/项目名称或者/项目名称/回收站
	TestCases []TestCase `json:"testCases"` // 当前用例集路径下的测试用例集合
}

TestSetWithCases 测试集且包含测试用例

type TestSetWithPlanCaseRels

type TestSetWithPlanCaseRels struct {
	TestSetID uint64            `json:"testSetID"`
	Directory string            `json:"directory"`
	TestCases []TestPlanCaseRel `json:"testCases"`

	// 当前测试集下所有测试用例的个数,不考虑过滤条件;
	// 场景:分页查询,当前页只能显示部分用例,批量删除这部分用例后,前端需要根据这个参数值判断当前测试集下是否还有用例。
	//      若已全部删除,则前端删除目录栏里的当前目录。
	TestCaseCountWithoutFilter uint64 `json:"testCaseCountWithoutFilter"`
}

type TestStatus

type TestStatus string
const (
	TestStatusPassed  TestStatus = "passed"
	TestStatusSkipped TestStatus = "skipped"
	TestStatusFailed  TestStatus = "failed"
	TestStatusError   TestStatus = "error"
)

test case result status

type TestSuite

type TestSuite struct {
	// Name is a descriptor given to the suite.
	Name string `json:"name" yaml:"name"`

	// Package is an additional descriptor for the hierarchy of the suite.
	Package string `json:"package" yaml:"package"`

	// Properties is a mapping of key-value pairs that were available when the
	// tests were run.
	Properties map[string]string `json:"properties,omitempty" yaml:"properties"`

	// Tests is an ordered collection of tests with associated results.
	Tests []*Test `json:"tests" yaml:"tests"`

	// SystemOut is textual test output for the suite. Usually output that is
	// written to stdout.
	SystemOut string `json:"stdout,omitempty"`

	// SystemErr is textual test error output for the suite. Usually output that is
	// written to stderr.
	SystemErr string `json:"stderr,omitempty"`

	// Totals is the aggregated results of all tests.
	Totals *TestTotals `json:"totals" yaml:"totals"`

	Extra map[string]string `json:"extra,omitempty"`
}

Suite represents a logical grouping (suite) of tests.

type TestTotals

type TestTotals struct {
	Tests    int                `json:"tests" yaml:"tests"`
	Duration time.Duration      `json:"duration" yaml:"duration"`
	Statuses map[TestStatus]int `json:"statuses" yaml:"statuses"`
}

The following relation should hold true.

Tests == (Passed + Skipped + Failed + Error)

type TestType

type TestType string
const (
	UT TestType = "UT"
	IT TestType = "IT"
)

test type

type TestTypesResponse

type TestTypesResponse struct {
	Header
	Data []TestType `json:"data"`
}

type TextRange

type TextRange struct {
	EndLine     int `json:"endLine"`
	EndOffset   int `json:"endOffset"`
	StartLine   int `json:"startLine"`
	StartOffset int `json:"startOffset"`
}

type Ticket

type Ticket struct {
	// 工单ID
	TicketID int64 `json:"id"`

	// 工单标题
	Title string `json:"title"`

	// 工单内容
	Content string `json:"content"`

	// 工单类型,可选值: bug/vulnerability/codeSmell/task
	Type TicketType `json:"type"`

	// 工单优先级,可选值: high/medium/low
	Priority TicketPriority `json:"priority"`

	// 工单状态,可选值: open/closed
	Status TicketStatus `json:"status"`

	// 告警工单 key,选填, 用于定位告警类工单
	Key string `json:"key"`

	OrgID string `json:"orgID"`

	// 告警指标,告警使用,其他类型工单不传
	Metric   string `json:"metric"`
	MetricID string `json:"metricID"`

	// 累计告警次数
	Count int64 `json:"count"`

	// 工单创建者ID
	Creator string `json:"creator"`

	// 工单最近操作者ID
	LastOperator string `json:"lastOperator"`

	// 标签
	Label map[string]interface{} `json:"label"`

	// 工单目标类型,可选值: cluster/project/application
	TargetType TicketTarget `json:"targetType"`

	// 工单最新评论,仅主动监控使用
	LastComment *Comment `json:"lastComment,omitempty"`

	// 工单目标ID
	TargetID string `json:"targetID"`

	// 创建时间
	CreatedAt time.Time `json:"createdAt"`

	// 更新时间
	UpdatedAt time.Time `json:"updatedAt"`

	// 关闭时间
	ClosedAt time.Time `json:"closedAt"`

	// 触发时间
	TriggeredAt time.Time `json:"triggeredAt"`
}

Ticket 工单数据DTO

type TicketCloseRequest

type TicketCloseRequest struct {
	TicketID int64 `path:"ticketID"`
}

TicketCloseRequest 工单关闭请求

type TicketCloseResponse

type TicketCloseResponse struct {
	Header

	// 工单ID
	Data int64 `json:"data"`
}

TicketCloseResponse 工单关闭响应

type TicketCreateRequest

type TicketCreateRequest struct {
	// 工单标题
	Title string `json:"title"`

	// 工单内容
	Content string `json:"content"`

	// 工单类型 可选值: task/bug/vulnerability/codeSmell/machine/component/addon/trace/glance/exception
	Type TicketType `json:"type"`

	// 工单优先级,可选值: high/medium/low
	Priority TicketPriority `json:"priority"`

	// 告警工单使用,作为唯一 key 定位工单
	Key string `json:"key"`

	// 企业ID
	OrgID string `json:"orgID,omitempty"`

	// 告警指标,告警使用,其他类型工单不传
	Metric   string `json:"metric,omitempty"`
	MetricID string `json:"metricID,omitempty"`

	// 用户ID
	UserID string `json:"userID"`

	// 标签
	Label map[string]interface{} `json:"label,omitempty"`

	// 工单目标类型,可选值: machine/addon/project/application
	TargetType TicketTarget `json:"targetType,omitempty"`

	// 工单目标ID
	TargetID string `json:"targetID,omitempty"`

	// 触发时间
	TriggeredAt int64 `json:"triggeredAt,omitempty"`

	// 告警恢复时间
	ClosedAt int64 `json:"closedAt,omitempty"`
}

TicketCreateRequest 工单创建请求

type TicketCreateResponse

type TicketCreateResponse struct {
	Header

	// 工单ID
	Data int64 `json:"data"`
}

TicketCreateResponse 工单创建响应

type TicketDeleteRequest

type TicketDeleteRequest struct {
	TicketID int64 `path:"ticketID"`
}

TicketDeleteRequest 工单删除请求

type TicketDeleteResponse

type TicketDeleteResponse struct {
	Header

	// 工单ID
	Data int64 `json:"data"`
}

TicketDeleteResponse 工单删除响应

type TicketFetchRequest

type TicketFetchRequest struct {
	TicketID int64 `path:"ticketID"`
}

TicketFetchRequest 工单详情请求

type TicketFetchResponse

type TicketFetchResponse struct {
	Header
	Data Ticket `json:"data"`
}

TicketFetchResponse 工单详情响应

type TicketListRequest

type TicketListRequest struct {
	// 工单类型,选填 可选值: task/bug/vulnerability/codeSmell/machine/component/addon/trace/glance/exception
	Type []TicketType `query:"type"`

	// 工单优先级,选填 可选值: high/medium/low
	Priority TicketPriority `query:"priority"`

	// 工单状态,选填 可选值: open/closed
	Status TicketStatus `query:"status"`

	// 工单关联目标类型, 选填 可选值: cluster/project/application
	TargetType TicketTarget `query:"targetType"`

	// 工单关联目标ID,选填
	TargetID string `query:"targetID"`

	// 告警工单 key,选填, 用于定位告警类工单
	Key string `json:"key"`

	// 企业ID, 选填,集群类告警时使用
	OrgID int64 `query:"orgID"`

	// 告警维度,选填(仅供告警类工单使用) eg: cpu/mem/load
	Metric string `query:"metric"`

	// 告警维度取值, 选填
	MetricID []string `query:"metricID"`

	// 起始时间戳(ms),选填
	StartTime int64 `query:"startTime"`

	// 截止时间戳(ms),选填 默认为当前时间
	EndTime int64 `query:"endTime"`

	// 是否包含工单最新评论,默认false
	Comment bool `query:"comment"`

	// 查询参数,按title/label模糊匹配
	Q string `query:"q"`

	// 页号, 默认值:1
	PageNo int `query:"pageNo,omitempty"`

	// 分页大小, 默认值20
	PageSize int `query:"pageSize,omitempty"`
}

TicketListRequest 工单列表请求

type TicketListResponse

type TicketListResponse struct {
	Header
	Data TicketListResponseData `json:"data"`
}

TicketListResponse 工单列表响应

type TicketListResponseData

type TicketListResponseData struct {
	Total   int64    `json:"total"`
	Tickets []Ticket `json:"tickets"`
}

TicketListResponseData 工单列表响应数据

type TicketPriority

type TicketPriority string

TicketPriority 工单优先级: 紧急/严重/一般

const (
	TicketHigh   TicketPriority = "high"
	TicketMedium TicketPriority = "medium"
	TicketLow    TicketPriority = "low"
)

工单优先级可选项

type TicketReopenRequest

type TicketReopenRequest struct {
	TicketID int64 `path:"ticketID"`
}

TicketReopenRequest 已关闭工单打开请求

type TicketReopenResponse

type TicketReopenResponse struct {
	Header

	// 工单ID
	Data int64 `json:"data"`
}

TicketReopenResponse 已关闭工单打开响应

type TicketStatus

type TicketStatus string

TicketStatus 工单状态

const (
	TicketOpen   TicketStatus = "open"
	TicketClosed TicketStatus = "closed"
)

工单状态可选项

type TicketTarget

type TicketTarget string

TicketTarget 工单目标类型

const (
	TicketCluster      TicketTarget = "cluster"
	TicketOrg          TicketTarget = "org"
	TicketProject      TicketTarget = "project"
	TicketMicroService TicketTarget = "micro_service"
	TicketApp          TicketTarget = "application"
)

工单目标类型可选值

type TicketType

type TicketType string

TicketType 工单类型 可选值: task/bug/vulnerability/codeSmell/machine/component/addon/trace/glance/exception

const (
	TicketTask                TicketType = "task"
	TicketBug                 TicketType = "bug"
	TicketVulnerability       TicketType = "vulnerability"
	TicketCodeSmell           TicketType = "codeSmell"
	TicketMergeRequest        TicketType = "mr"
	TicketMachineAlert        TicketType = "machine"         // 机器告警
	TicketComponentAlert      TicketType = "dice_component"  // 平台组件告警
	TicketAddOnAlert          TicketType = "addon"           // 中间件addon告警
	TicketDiceAddOnAlert      TicketType = "dice_addon"      // 平台addon告警
	TicketKubernetesAlert     TicketType = "kubernetes"      // kubernetes告警
	TicketAppStatusAlert      TicketType = "app_status"      // 主动监控告警
	TicketAppResourceAlert    TicketType = "app_resource"    // 应用(容器)资源告警
	TicketExceptionAlert      TicketType = "app_exception"   // 应用异常告警
	TicketAppTransactionAlert TicketType = "app_transaction" // 应用异常告警
)

工单类型可选项

type TicketUpdateRequest

type TicketUpdateRequest struct {
	TicketID int64                   `json:"-" path:"ticketID"`
	Body     TicketUpdateRequestBody `json:"body"`
}

TicketUpdateRequest 工单更新请求

type TicketUpdateRequestBody

type TicketUpdateRequestBody struct {
	// 工单标题
	Title string `json:"title"`

	// 工单内容
	Content string `json:"content"`

	// 工单类型,可选值: task/bug/vulnerability/codeSmell/machine/component/addon/trace/glance/exception
	Type TicketType `json:"type"`

	// 工单优先级,可选值: high/medium/low
	Priority TicketPriority `json:"priority"`
}

TicketUpdateRequestBody 工单更新请求body

type TicketUpdateResponse

type TicketUpdateResponse struct {
	Header

	// 工单ID
	Data int64 `json:"data"`
}

TicketUpdateResponse 工单更新响应

type TreeEntry

type TreeEntry struct {
	ID        string  `json:"id"`
	Type      string  `json:"type"`
	Name      string  `json:"name"`
	EntrySize int64   `json:"size"`
	Commit    *Commit `json:"commit"`
}

TreeEntry 文件结构

type TriggerConfig

type TriggerConfig struct {
	Push  *PushTrigger  `yaml:"push,omitempty" json:"push,omitempty"`
	Merge *MergeTrigger `yaml:"merge,omitempty" json:"merge,omitempty"`
}

type UCAudit

type UCAudit struct {
	ID           int64
	TenantID     int64           `json:"tenantId"`
	UserID       int64           `json:"userId"`
	EventType    string          `json:"eventType"`
	Event        string          `json:"event"`
	EventTime    int64           `json:"eventTime"`
	Extra        string          `json:"extra"`
	MacAddress   string          `json:"macAddress"`
	OperatorInfo UCAuditUserInfo `json:"operatorInfo"` // uc的操作人信息
	IP           string          `json:"ip"`
	UserInfo     UCAuditUserInfo `json:"userInfo"` // uc的被操作人信息
}

UCAudit uc审计事件

type UCAuditUserInfo

type UCAuditUserInfo struct {
	ID       int64  `json:"id"`
	UserName string `json:"username"`
	Nick     string `json:"nickname"`
	Avatar   string `json:"avatar"`
	Mobile   string `json:"mobile"`
	Email    string `json:"email"`
	Token    string `json:"token"`
}

UCAuditUserInfo 返回用户数据格式

type UCAuditsListRequest

type UCAuditsListRequest struct {
	Event     string `json:"event,omitempty"`
	EventType string `json:"eventType,omitempty"`
	IP        string `json:"ip,omitempty"`
	LastID    int64  `json:"lastId,omitempty"`
	Size      uint64 `json:"size"`
	UserID    string `json:"userId,omitempty"`
	EventTime int64  `json:"eventTime,omitempty"`
}

UCAuditsListRequest UC List审计事件请求

type UCAuditsListResponse

type UCAuditsListResponse struct {
	Result []UCAudit `json:"result"`
}

UCAuditsListResponse UC List审计事件响应

func (*UCAuditsListResponse) Convert2SysUCAuditBatchCreateRequest

func (ua *UCAuditsListResponse) Convert2SysUCAuditBatchCreateRequest() (AuditBatchCreateRequest, []string, []int64)

Convert2SysUCAuditBatchCreateRequest 转换成批量创建dice审计请求

type UCExtra

type UCExtra struct {
	Request  UCRequest       `json:"request"`
	UserInfo UCAuditUserInfo `json:"user"`
}

UCExtra 更新用户信息时,uc审计返回的extra里有请求uc的request, 需要根据requset里的信息,判断这次更新的是什么用户信息

type UCRequest

type UCRequest struct {
	Source   string `json:"source"`
	NickName string `json:"nickname"`
}

type UCTemplateInfo

type UCTemplateInfo struct {
	TemplateName TemplateName
	Result       Result
	ErrorMsg     string
}

UCTemplateInfo 用于uc模版转换成dice的模版

type UnifiedFileTreeNode

type UnifiedFileTreeNode struct {
	Type      UnifiedFileTreeNodeType `json:"type"`    // 类型
	Inode     string                  `json:"inode"`   // 节点 inode
	Pinode    string                  `json:"pinode"`  // 父节点 inode
	Scope     string                  `json:"scope"`   // scope
	ScopeID   string                  `json:"scopeID"` // scope id
	Name      string                  `json:"name"`
	Desc      string                  `json:"desc"`
	CreatorID string                  `json:"creatorID"`
	UpdaterID string                  `json:"updaterID"`
	CreatedAt time.Time               `json:"createdAt"`
	UpdatedAt time.Time               `json:"updatedAt"`
	Meta      UnifiedFileTreeNodeMeta `json:"meta,omitempty"` // 元信息,各后端返回自定义数据满足个性化业务需求
}

UnifiedFileTreeNode 统一目录树节点

func (UnifiedFileTreeNode) CheckSameScope

func (n UnifiedFileTreeNode) CheckSameScope(n2 UnifiedFileTreeNode) error

CheckSameScope 校验 scope & scopeID 是否一致

func (UnifiedFileTreeNode) GetUserIDs

func (n UnifiedFileTreeNode) GetUserIDs() []string

type UnifiedFileTreeNodeCopyRequest

type UnifiedFileTreeNodeCopyRequest struct {
	Inode string `json:"inode"`

	Pinode string `json:"pinode"`

	IdentityInfo
}

节点拷贝

func (UnifiedFileTreeNodeCopyRequest) BasicValidate

func (req UnifiedFileTreeNodeCopyRequest) BasicValidate() error

type UnifiedFileTreeNodeCopyResponse

type UnifiedFileTreeNodeCopyResponse struct {
	Header
	Data *UnifiedFileTreeNode `json:"data,omitempty"`
}

type UnifiedFileTreeNodeCreateRequest

type UnifiedFileTreeNodeCreateRequest struct {
	Type    UnifiedFileTreeNodeType `json:"type"`
	Scope   string                  `json:"scope"`
	ScopeID string                  `json:"scopeID"`
	Pinode  string                  `json:"pinode"` // 创建根目录时 Pinode 为空
	Name    string                  `json:"name"`
	Desc    string                  `json:"desc"`

	IdentityInfo
}

节点创建

func (UnifiedFileTreeNodeCreateRequest) BasicValidate

func (req UnifiedFileTreeNodeCreateRequest) BasicValidate() error

func (UnifiedFileTreeNodeCreateRequest) ValidateFile

func (req UnifiedFileTreeNodeCreateRequest) ValidateFile() error

func (UnifiedFileTreeNodeCreateRequest) ValidateNonRootDir

func (req UnifiedFileTreeNodeCreateRequest) ValidateNonRootDir() error

func (UnifiedFileTreeNodeCreateRequest) ValidateRootDir

func (req UnifiedFileTreeNodeCreateRequest) ValidateRootDir() error

type UnifiedFileTreeNodeCreateResponse

type UnifiedFileTreeNodeCreateResponse struct {
	Header
	Data *UnifiedFileTreeNode `json:"data,omitempty"`
}

type UnifiedFileTreeNodeDeleteRequest

type UnifiedFileTreeNodeDeleteRequest struct {
	Inode string `json:"inode"`

	Scope   string `json:"scope"`
	ScopeID string `json:"scopeID"`

	IdentityInfo
}

节点删除

func (UnifiedFileTreeNodeDeleteRequest) BasicValidate

func (req UnifiedFileTreeNodeDeleteRequest) BasicValidate() error

type UnifiedFileTreeNodeDeleteResponse

type UnifiedFileTreeNodeDeleteResponse struct {
	Header
	Data *UnifiedFileTreeNode `json:"data,omitempty"`
}

type UnifiedFileTreeNodeFindAncestorsRequest

type UnifiedFileTreeNodeFindAncestorsRequest struct {
	Inode string `json:"inode"`

	Scope   string `json:"scope"`
	ScopeID string `json:"scopeID"`

	IdentityInfo
}

节点寻祖

func (UnifiedFileTreeNodeFindAncestorsRequest) BasicValidate

func (req UnifiedFileTreeNodeFindAncestorsRequest) BasicValidate() error

type UnifiedFileTreeNodeFindAncestorsResponse

type UnifiedFileTreeNodeFindAncestorsResponse struct {
	Header
	Data []UnifiedFileTreeNode `json:"data,omitempty"`
}

type UnifiedFileTreeNodeFuzzySearchRequest

type UnifiedFileTreeNodeFuzzySearchRequest struct {
	Scope   string `schema:"scope"`
	ScopeID string `schema:"scopeID"`

	// 从哪个父节点开始搜索
	FromPinode string `schema:"fromPinode"`

	// 是否需要递归,若不递归,则只返回当前层
	Recursive bool `schema:"recursive" default:"false"`

	// fuzzy search
	PrefixFuzzy  string `schema:"prefixFuzzy,omitempty"`
	SuffixFuzzy  string `schema:"suffixFuzzy,omitempty"`
	Fuzzy        string `schema:"fuzzy,omitempty"`
	CreatorID    string `schema:"creatorID,omitempty"`
	IdentityInfo `schema:"-"`
}

节点搜索

func (UnifiedFileTreeNodeFuzzySearchRequest) BasicValidate

func (req UnifiedFileTreeNodeFuzzySearchRequest) BasicValidate() error

type UnifiedFileTreeNodeFuzzySearchResponse

type UnifiedFileTreeNodeFuzzySearchResponse struct {
	Header
	Data []UnifiedFileTreeNode `json:"data,omitempty"`
}

type UnifiedFileTreeNodeGetRequest

type UnifiedFileTreeNodeGetRequest struct {
	Inode string `json:"inode"`

	Scope   string `json:"scope"`
	ScopeID string `json:"scopeID"`

	IdentityInfo
}

节点查询详情 (meta 包含详情)

func (UnifiedFileTreeNodeGetRequest) BasicValidate

func (req UnifiedFileTreeNodeGetRequest) BasicValidate() error

type UnifiedFileTreeNodeGetResponse

type UnifiedFileTreeNodeGetResponse struct {
	Header
	Data *UnifiedFileTreeNode `json:"data,omitempty"`
}

type UnifiedFileTreeNodeHistorySearchRequest

type UnifiedFileTreeNodeHistorySearchRequest struct {
	Inode string `json:"inode"`
	IdentityInfo
}

节点历史搜索

type UnifiedFileTreeNodeListRequest

type UnifiedFileTreeNodeListRequest struct {
	Scope   string `schema:"scope"`
	ScopeID string `schema:"scopeID"`

	Pinode string `schema:"pinode"`

	IdentityInfo `schema:"-"`
}

节点列表

func (UnifiedFileTreeNodeListRequest) BasicValidate

func (req UnifiedFileTreeNodeListRequest) BasicValidate() error

type UnifiedFileTreeNodeListResponse

type UnifiedFileTreeNodeListResponse struct {
	Header
	Data []UnifiedFileTreeNode `json:"data,omitempty"`
}

type UnifiedFileTreeNodeMeta

type UnifiedFileTreeNodeMeta map[string]interface{}

UnifiedFileTreeNodeMeta 统一目录树节点元信息

type UnifiedFileTreeNodeMoveRequest

type UnifiedFileTreeNodeMoveRequest struct {
	Inode string `json:"inode"`

	Pinode string `json:"pinode"`

	IdentityInfo
}

节点移动

func (UnifiedFileTreeNodeMoveRequest) BasicValidate

func (req UnifiedFileTreeNodeMoveRequest) BasicValidate() error

type UnifiedFileTreeNodeMoveResponse

type UnifiedFileTreeNodeMoveResponse struct {
	Header
	Data *UnifiedFileTreeNode `json:"data,omitempty"`
}

type UnifiedFileTreeNodeType

type UnifiedFileTreeNodeType string

UnifiedFileTreeNodeType 节点类型

var (
	UnifiedFileTreeNodeTypeDir  UnifiedFileTreeNodeType = "d"
	UnifiedFileTreeNodeTypeFile UnifiedFileTreeNodeType = "f"
)

func (UnifiedFileTreeNodeType) IsDir

func (t UnifiedFileTreeNodeType) IsDir() bool

func (UnifiedFileTreeNodeType) IsFile

func (t UnifiedFileTreeNodeType) IsFile() bool

func (UnifiedFileTreeNodeType) String

func (t UnifiedFileTreeNodeType) String() string

func (UnifiedFileTreeNodeType) Valid

func (t UnifiedFileTreeNodeType) Valid() bool

type UnifiedFileTreeNodeUpdateBasicInfoRequest

type UnifiedFileTreeNodeUpdateBasicInfoRequest struct {
	Inode string `json:"inode"`

	Name *string `json:"name"`
	Desc *string `json:"desc"`

	IdentityInfo
}

节点更新基本信息

func (UnifiedFileTreeNodeUpdateBasicInfoRequest) BasicValidate

type UnifiedFileTreeNodeUpdateBasicInfoResponse

type UnifiedFileTreeNodeUpdateBasicInfoResponse struct {
	Header
	Data *UnifiedFileTreeNode `json:"data,omitempty"`
}

type UniversalMenuResponse

type UniversalMenuResponse struct {
	Header
	Data []UniversalMenuResponseData `json:"data"`
}

type UniversalMenuResponseData

type UniversalMenuResponseData struct {
	AddonName        string `json:"addonName"`
	AddonDisplayName string `json:"addonDisplayName"`
	InstanceId       string `json:"instanceId"`
	TerminusKey      string `json:"terminusKey"`
	ConsoleUrl       string `json:"consoleUrl"`
	ProjectName      string `json:"projectName"`
}

type UniversalProjectResponse

type UniversalProjectResponse struct {
	Header
	Data []UniversalProjectResponseData `json:"data"`
}

type UniversalProjectResponseData

type UniversalProjectResponseData struct {
	ProjectID   string   `json:"projectId"`
	ProjectName string   `json:"projectName"`
	LogoURL     string   `json:"logoUrl"`
	Envs        []string `json:"envs"`
}

type UpdateAPIAssetBody

type UpdateAPIAssetBody struct {
	Name      *string `json:"assetName"`
	Desc      *string `json:"desc"`
	ProjectID *uint64 `json:"projectID,omitempty"`
	AppID     *uint64 `json:"appID,omitempty"`
	Public    *bool   `json:"public"`
}

type UpdateAPIAssetReq

type UpdateAPIAssetReq struct {
	OrgID    uint64
	Identity *IdentityInfo

	URIParams *UpdateAPIAssetURIParams
	Keys      map[string]interface{} // assetName, desc, logo, public, projectID, appID
}

type UpdateAPIAssetURIParams

type UpdateAPIAssetURIParams struct {
	AssetID string `json:"assetID"`
}

type UpdateAccessBody

type UpdateAccessBody struct {
	Minor           uint64         `json:"minor"`
	Workspace       string         `json:"workspace"`
	Authentication  Authentication `json:"authentication"`
	Authorization   Authorization  `json:"authorization"`
	BindDomain      []string       `json:"bindDomain"`
	AddonInstanceID string         `json:"addonInstanceID"`
}

type UpdateAccessReq

type UpdateAccessReq struct {
	OrgID     uint64
	Identity  *IdentityInfo
	URIParams *GetAccessURIParams
	Body      *UpdateAccessBody
}

type UpdateAppPublishItemRelationRequest

type UpdateAppPublishItemRelationRequest struct {
	AppID         int64                         `json:"-"`
	UserID        string                        `json:"-"`
	ProdItemID    int64                         `json:"PROD"`
	STAGINGItemID int64                         `json:"STAGING"`
	TESTItemID    int64                         `json:"TEST"`
	DEVItemID     int64                         `json:"DEV"`
	AKAIMap       map[DiceWorkspace]MonitorKeys `json:"-"` // 0是AK,1是AI
}

func (*UpdateAppPublishItemRelationRequest) GetPublishItemIDByWorkspace

func (u *UpdateAppPublishItemRelationRequest) GetPublishItemIDByWorkspace(workspace DiceWorkspace) int64

GetPublishItemIDByWorkspace 根据环境获取对应的 publishItem ID

func (*UpdateAppPublishItemRelationRequest) SetPublishItemIDTo0ByWorkspace

func (u *UpdateAppPublishItemRelationRequest) SetPublishItemIDTo0ByWorkspace(workspace DiceWorkspace)

SetPublishItemIDTo0ByWorkspace 根据环境获取对应的 设置publishItem ID 为 0

type UpdateAppPublishItemRelationResponse

type UpdateAppPublishItemRelationResponse struct {
	Header
}

type UpdateApproval

type UpdateApproval struct {
	Id     int64  `json:"id"`
	OrgId  int64  `json:"orgId"`
	Reject bool   `json:"reject"`
	Reason string `json:"reason" gorm:"commit_message"`
}

type UpdateAssetVersionBody

type UpdateAssetVersionBody struct {
	Deprecated bool `json:"deprecated"`
}

type UpdateAssetVersionReq

type UpdateAssetVersionReq struct {
	OrgID     uint64
	Identity  *IdentityInfo
	URIParams *AssetVersionDetailURI
	Body      *UpdateAssetVersionBody
}

type UpdateBranchRuleRequest

type UpdateBranchRuleRequest struct {
	ID                int64  `json:"-"`
	Rule              string `json:"rule"`
	IsProtect         bool   `json:"isProtect"`
	NeedApproval      bool   `json:"needApproval"`
	IsTriggerPipeline bool   `json:"isTriggerPipeline"`
	Desc              string `json:"desc"`
	Workspace         string `json:"workspace"`
	ArtifactWorkspace string `json:"artifactWorkspace"`
}

type UpdateBranchRuleResponse

type UpdateBranchRuleResponse struct {
	Header
	Data *BranchRule `json:"data"`
}

type UpdateClientBody

type UpdateClientBody struct {
	DisplayName string `json:"displayName"`
	Desc        string `json:"desc"`
}

type UpdateClientQueryParams

type UpdateClientQueryParams struct {
	ResetClientSecret bool `json:"resetClientSecret" schema:"resetClientSecret"`
}

type UpdateClientReq

type UpdateClientReq struct {
	OrgID       uint64
	Identity    *IdentityInfo
	URIParams   *UpdateClientURIParams
	QueryParams *UpdateClientQueryParams
	Body        *UpdateClientBody
}

type UpdateClientURIParams

type UpdateClientURIParams struct {
	ClientID uint64
}

type UpdateContractBody

type UpdateContractBody struct {
	Status       *ContractStatus `json:"status"`
	CurSLAID     *uint64         `json:"curSLAID"`
	RequestSLAID *uint64         `json:"requestSLAID"`
}

type UpdateContractReq

type UpdateContractReq struct {
	OrgID     uint64
	Identity  *IdentityInfo
	URIParams *UpdateContractURIParams
	Body      *UpdateContractBody
}

type UpdateContractURIParams

type UpdateContractURIParams struct {
	ClientID   string
	ContractID string
}

type UpdateCustomAddonRequest

type UpdateCustomAddonRequest struct {
	// 更新custom addon请求体
	Body       UpdateCustomBody `json:"body"`
	ProjectID  string           `query:"projectId" desc:"项目ID"`
	OrgID      string           `query:"orgId" desc:"企业ID"`
	OperatorID string           `query:"operatorId" desc:"操作人ID"`
}

UpdateCustomAddonRequest custom addon 更新请求信息 /api/addons/<addonId>

type UpdateCustomBody

type UpdateCustomBody struct {
	UpdateMap map[string][]string `json:"updateMap"`
}

UpdateCustomBody 更新custom addon请求体

type UpdateInstantiationBody

type UpdateInstantiationBody struct {
	Type        string `json:"type"`
	URL         string `json:"url"`
	ProjectID   uint64 `json:"projectID,omitempty"`
	AppID       uint64 `json:"appID,omitempty"`
	RuntimeID   uint64 `json:"runtimeID"`
	ServiceName string `json:"serviceName"`
	Workspace   string `json:"workspace"`
}

type UpdateInstantiationReq

type UpdateInstantiationReq struct {
	OrgID     uint64
	Identity  *IdentityInfo
	URIParams *UpdateInstantiationURIParams
	Body      *UpdateInstantiationBody
}

更新实例化记录列表的参数

type UpdateInstantiationURIParams

type UpdateInstantiationURIParams struct {
	AssetID         string
	SwaggerVersion  string
	Minor           uint64
	InstantiationID uint64
}

type UpdateLabelsData

type UpdateLabelsData struct {
	RecordID uint64
}

type UpdateLabelsRequest

type UpdateLabelsRequest struct {
	ClusterName     string            `json:"clusterName"`
	OrgID           uint64            `json:"orgID"`
	Hosts           []string          `json:"hosts"`
	Labels          []string          `json:"labels"`
	LabelsWithValue map[string]string `json:"labelsWithValue"`
}

type UpdateLabelsResponse

type UpdateLabelsResponse struct {
	Header
	Data UpdateLabelsData `json:"data"`
}

type UpdateMR

type UpdateMR struct {
	Header
	Data *MergeRequestInfo `json:"data"`
}

type UpdateNotifyGroupRequest

type UpdateNotifyGroupRequest struct {
	ID      int64          `json:"-"`
	Name    string         `json:"name"`
	Targets []NotifyTarget `json:"targets"`
	OrgID   int64          `json:"-"`
}

UpdateNotifyGroupRequest 更新通知组请求

type UpdateNotifyGroupResponse

type UpdateNotifyGroupResponse struct {
	Header
	Data NotifyGroup `json:"data"`
}

UpdateNotifyGroupResponse 更新通知组响应

type UpdateNotifyItemRequest

type UpdateNotifyItemRequest struct {
	ID             int64  `json:"id"`
	MobileTemplate string `json:"mobileTemplate"`
}

UpdateNotifyItemRequest 更新通知项请求

type UpdateNotifyItemResponse

type UpdateNotifyItemResponse struct {
	Header
}

UpdateNotifyItemResponse 更新通知项响应

type UpdateNotifyRequest

type UpdateNotifyRequest struct {
	ID            int64          `json:"id"`
	Channels      string         `json:"channels"`
	NotifyGroupID int64          `json:"notifyGroupId"`
	NotifyItemIDs []int64        `json:"notifyItemIds"`
	NotifySources []NotifySource `json:"notifySources"`
	WithGroup     bool           `json:"withGroup"`
	GroupTargets  []NotifyTarget `json:"groupTargets"`
	GroupName     string         `json:"-"`
	OrgID         int64          `json:"-"`
}

UpdateNotifyRequest 更新通知请求

type UpdateNotifyResponse

type UpdateNotifyResponse struct {
	Header
	Data *NotifyDetail `json:"data"`
}

UpdateNotifyResponse 更新通知响应

type UpdatePublishItemRequest

type UpdatePublishItemRequest struct {
	ID               int64    `json:"-"`
	DisplayName      string   `json:"displayName"`
	Public           bool     `json:"public"`
	Desc             string   `json:"desc"`
	NoJailbreak      bool     `json:"noJailbreak"`      // 越狱控制
	GeofenceLon      float64  `json:"geofenceLon"`      // 地理围栏,坐标经度
	GeofenceLat      float64  `json:"geofenceLat"`      // 地理围栏,坐标纬度
	GeofenceRadius   float64  `json:"geofenceRadius"`   // 地理围栏,合理半径
	GrayLevelPercent int      `json:"grayLevelPercent"` // 灰度百分比,0-100
	PreviewImages    []string `json:"previewImages"`    // 预览图
	BackgroundImage  string   `json:"backgroundImage"`  // 背景图
}

UpdatePublishItemRequest 更新发布内容请求

type UpdatePublishItemResponse

type UpdatePublishItemResponse struct {
	Header
	Data PublishItem `json:"data"`
}

UpdatePublishItemResponse 更新发布内容响应

type UpdatePublishItemVersionStatesRequset

type UpdatePublishItemVersionStatesRequset struct {
	PublishItemID        int64                    `json:"publishItemID"`
	PublishItemVersionID int64                    `json:"publishItemVersionID"`
	PackageName          string                   `json:"packageName"`
	VersionStates        PublishItemVersionStates `json:"versionStates"`
	GrayLevelPercent     int                      `json:"grayLevelPercent"` // 灰度百分比,0-100
	Public               bool                     `json:"-"`
}

UpdatePublishItemVersionStatesRequset 上架下架版本请求

type UpdateRepoRequest

type UpdateRepoRequest struct {
	AppID  int64          `json:"-"`
	Config *GitRepoConfig `json:"config"`
}

UpdateRepoRequest 更新repo配置

type UpdateRepoResponse

type UpdateRepoResponse struct {
	Header
}

UpdateRepoResponse 更新repo响应

type UpdateRunnerTaskRequest

type UpdateRunnerTaskRequest struct {
	ID             int64  `json:"-"`
	TaskID         string `json:"task_id"`
	Status         string `json:"status"`
	ContextDataUrl string `json:"context_data_url"`
	ResultDataUrl  string `json:"result_data_url"`
}

type UpdateSLABody

type UpdateSLABody struct {
	Name     *string                    `json:"name"`
	Desc     *string                    `json:"desc"`
	Approval *Authorization             `json:"approval"`
	Default  *bool                      `json:"default"`
	Limits   []*CreateUpdateSLALimitObj `json:"limits"`
}

type UpdateSLAReq

type UpdateSLAReq struct {
	OrgID     uint64
	Identity  *IdentityInfo
	URIParams *SLADetailURI
	Body      *UpdateSLABody
}

type UpdateSceneSetResponse

type UpdateSceneSetResponse struct {
	Header
	Data SceneSet
}

type UpgradeClusterInfo

type UpgradeClusterInfo struct {
	OrgID            uint64 `json:"orgID"`
	ClusterName      string `json:"clusterName"`
	ClusterType      string `json:"clusterType"` //k8s, dcos, edas
	Version          string `json:"version"`
	IsCentralCluster bool   `json:"isCentralCluster"`
}

type UpgradeEdgeClusterData

type UpgradeEdgeClusterData struct {
	RecordID     uint64 `json:"recordID"`
	Status       int    `json:"status"` // 1: 升级中,2: 确认升级 3: 不可升级
	PrecheckHint string `json:"precheckHint"`
}

type UpgradeEdgeClusterRequest

type UpgradeEdgeClusterRequest struct {
	OrgID       uint64 `json:"orgID"`
	ClusterName string `json:"clusterName"`
	PreCheck    bool   `json:"precheck"`
}

type UpgradeEdgeClusterResponse

type UpgradeEdgeClusterResponse struct {
	Header
	Data UpgradeEdgeClusterData `json:"data"`
}

type User

type User struct {
	Avatar    string    `json:"avatar"`
	CreatedAt time.Time `json:"createdAt"`
	Email     string    `json:"email"`
	Id        string    `json:"id"`
	Mobile    string    `json:"mobile"`
	Nick      string    `json:"nick"`
	Status    string    `json:"status"`

	// 三方用户如wechat,qq等
	ThirdPart string `json:"thirdPart"`

	// 三方用户的id
	ThirdUid  string    `json:"thirdUid"`
	UpdatedAt time.Time `json:"updatedAt"`
}

type UserBatchFreezeRequest

type UserBatchFreezeRequest struct {
	UserIDs []string `json:"userIDs"`
}

UserBatchFreezeRequest 用户批量冻结请求

type UserBatchFreezeResponse

type UserBatchFreezeResponse struct {
	Header
}

UserBatchFreezeResponse 用户批量冻结响应

type UserBatchUnFreezeRequest

type UserBatchUnFreezeRequest struct {
	UserIDs []string `json:"userIDs"`
}

UserBatchUnFreezeRequest 用户批量解冻请求

type UserBatchUnFreezeResponse

type UserBatchUnFreezeResponse struct {
	Header
}

UserBatchUnFreezeResponse 用户批量解冻响应

type UserBatchUpdateLoginMethodRequest

type UserBatchUpdateLoginMethodRequest struct {
	UserIDs []string `json:"userIDs"`
	Source  string   `json:"source"`
}

UserBatchUpdateLoginMethodRequest 批量用户更新登录请求

type UserBatchUpdateLoginMethodResponse

type UserBatchUpdateLoginMethodResponse struct {
	Header
}

UserBatchUpdateLoginMethodResponse 批量用户更新登录方式响应

type UserCreateItem

type UserCreateItem struct {
	Name     string `json:"name"`
	Nick     string `json:"nick"`
	Phone    string `json:"phone"`
	Email    string `json:"email"`
	Password string `json:"password"`
}

UserCreateItem 用户创建数据结构

type UserCreateRequest

type UserCreateRequest struct {
	Users []UserCreateItem `json:"users"`
}

UserCreateRequest 用户创建请求

type UserCreateResponse

type UserCreateResponse struct {
	Header
}

UserCreateResponse 用户创建响应

type UserCurrentResponse

type UserCurrentResponse struct {
	Header
	Data UserInfo `json:"data"`
}

UserCurrentResponse 当前用户信息

type UserFreezeRequest

type UserFreezeRequest struct {
	UserID string `path:"userID"`
}

UserFreezeRequest 用户冻结请求

type UserFreezeResponse

type UserFreezeResponse struct {
	Header
}

UserFreezeResponse 用户冻结响应

type UserGetRequest

type UserGetRequest struct {
	UserId string `path:"userId"`
}

/api/users/<userId> method: get 获取用户

type UserGetResponse

type UserGetResponse struct {
	Header
	Data UserProfile `json:"data"`
}

/api/users/<userId> method: get

type UserInfo

type UserInfo struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Nick        string `json:"nick"`
	Avatar      string `json:"avatar"`
	Phone       string `json:"phone"`
	Email       string `json:"email"`
	Token       string `json:"token"`
	LastLoginAt string `json:"lastLoginAt"`
	PwdExpireAt string `json:"pwdExpireAt"`
	Source      string `json:"source"`
}

UserInfo 返回用户数据格式

func (*UserInfo) ConvertToPipelineUser

func (user *UserInfo) ConvertToPipelineUser() *PipelineUser

type UserInfoDto

type UserInfoDto struct {
	AvatarURL string      `json:"avatarUrl,omitempty"`
	Email     string      `json:"email,omitempty"`
	UserID    interface{} `json:"id,omitempty"`
	NickName  string      `json:"nickName,omitempty"`
	Phone     string      `json:"phone,omitempty"`
	RealName  string      `json:"realName,omitempty"`
	Username  string      `json:"username,omitempty"`
}

UserInfoDto 用户数据

type UserInfoExt

type UserInfoExt struct {
	UserInfo
	Locked bool `json:"locked"`
}

UserInfoExt 用户信息扩展

type UserInfoHeader

type UserInfoHeader struct {
	UserIDs  []string            `json:"userIDs"`
	UserInfo map[string]UserInfo `json:"userInfo"`
}

UserInfoHeader 由 openAPI 统一注入在 response 中

type UserListLoginMethodData

type UserListLoginMethodData struct {
	DisplayName string `json:"displayName"`
	Value       string `json:"value"`
}

UserListLoginMethodData list用户录方式响应

type UserListLoginMethodResponse

type UserListLoginMethodResponse struct {
	Header
	Data []UserListLoginMethodData `json:"data"`
}

UserListLoginMethodResponse list用户录方式响应

type UserListRequest

type UserListRequest struct {
	// 查询关键字,可根据用户名/手机号/邮箱模糊匹配
	Query string `query:"q"`

	// 用户信息是否明文
	Plaintext bool `query:"plaintext"`

	// 支持批量查询,传参形式: userID=xxx&userID=yyy
	UserIDs []string `query:"userID"`
}

UserListRequest 用户批量查询请求

type UserListResponse

type UserListResponse struct {
	Header
	Data UserListResponseData `json:"data"`
}

UserListResponse 用户批量查询响应

type UserListResponseData

type UserListResponseData struct {
	Users []UserInfo `json:"users"`
}

UserListResponseData 用户批量查询响应数据

type UserPagingData

type UserPagingData struct {
	Total int           `json:"total"`
	List  []UserInfoExt `json:"list"`
}

UserPagingData 用户分页数据

type UserPagingRequest

type UserPagingRequest struct {
	Name     string `query:"name"`
	Nick     string `query:"nick"`
	Phone    string `query:"phone"`
	Email    string `query:"email"`
	Locked   *int   `query:"locked"`
	Source   string `query:"source"`
	PageNo   int    `query:"pageNo"`
	PageSize int    `query:"pageSize"`
}

UserPagingRequest 用户分页请求

type UserPagingResponse

type UserPagingResponse struct {
	Header
	Data *UserPagingData `json:"data"`
}

UserPagingResponse 用户分页结果

type UserProfile

type UserProfile struct {
	Id        uint64    `json:"id"`
	Email     string    `json:"email"`
	Mobile    string    `json:"mobile"`
	Nick      string    `json:"nick"`
	Avatar    string    `json:"avatar"`
	Status    string    `json:"status"`
	OrgId     uint64    `json:"orgId"`
	OrgName   string    `json:"orgName"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
	OpenToken string    `json:"openToken"`

	// 用户权限列表
	Authorizes []Authorize `json:"authorizes"`

	// 用户角色列表
	Roles []UserRole `json:"roles"`
}

type UserRole

type UserRole struct {
	// 角色key
	RoleKey  string `json:"roleKey"`
	UserId   string `json:"userId"`
	TargetId string `json:"targetId"`
	Role     Role   `json:"key"`
}

type UserRoleListResponseData

type UserRoleListResponseData struct {
	List  []UserScopeRole `json:"list"`
	Total int             `json:"total"`
}

type UserScopeRole

type UserScopeRole struct {
	ScopeType ScopeType `json:"scopeType"`
	ScopeID   int64     `json:"scopeId"`
	ScopeName string    `json:"scopeName"`
	Roles     []string  `json:"roles,omitempty"`
}

type UserUnfreezeRequest

type UserUnfreezeRequest struct {
	UserID string `path:"userID"`
}

UserFreezeRequest 用户解冻请求

type UserUnfreezeResponse

type UserUnfreezeResponse struct {
	Header
}

UserUnfreezeResponse 用户解冻响应

type UserUpdateInfoRequset

type UserUpdateInfoRequset struct {
	UserID string `json:"userId"`
	Name   string `json:"name"`
	Nick   string `json:"nick"`
	Mobile string `json:"mobile"`
	Email  string `json:"email"`
}

UserUpdateInfoRequset 更新用户信息请求

type UserUpdateInfoResponse

type UserUpdateInfoResponse struct {
	Header
}

UserUpdateInfoResponse 更新用户信息响应

type UserUpdateLoginMethodRequest

type UserUpdateLoginMethodRequest struct {
	ID     string `json:"id"`
	Source string `json:"source"`
}

UserUpdateLoginMethodRequest 更新用户登录方式请求

type UserUpdateLoginMethodResponse

type UserUpdateLoginMethodResponse struct {
	Header
}

UserUpdateLoginMethodResponse 更新用户录方式响应

type VClusterCreateRequest

type VClusterCreateRequest struct {
	// 集群名称
	Name string `json:"name"`

	// 物理集群Id
	ClusterID int64 `json:"clusterId"`

	// 物理集群名称
	ClusterName string `json:"clusterName"`

	// 集群对应组织Id
	OrgID int64 `json:"orgId"`

	// 集群对应组织名称
	OrgName string `json:"orgName"`

	// 集群拥有者
	Owner string `json:"owner"`
}

VClusterCreateRequest 创建虚拟集群请求结构

type VClusterCreateResponse

type VClusterCreateResponse struct {
	Header

	// 集群Id
	Data int64 `json:"data"`
}

VClusterCreateResponse 创建集群响应结构

type VClusterFetchResponse

type VClusterFetchResponse struct {
	Header
	Data VClusterFetchResponseData `json:"data"`
}

VClusterFetchResponse 集群详情响应结构

type VClusterFetchResponseData

type VClusterFetchResponseData struct {
	// 集群uuid
	UUID string `json:"uuid"`

	// 集群名称
	Name string `json:"name"`

	// 物理集群Id
	ClusterID int64 `json:"clusterId"`

	// 物理集群名称
	ClusterName string `json:"clusterName"`

	// 集群对应组织ID
	OrgID int64 `json:"orgId"`

	// 集群对应组织名称
	OrgName string `json:"orgName"`

	// 集群拥有者
	Owner     string    `json:"owner"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

VClusterFetchResponseData 集群详情数据

type VClusterListResponse

type VClusterListResponse struct {
	Header
	Data VClusterListResponseData `json:"data"`
}

VClusterListResponse 集群列表响应结构

type VClusterListResponseData

type VClusterListResponseData struct {
	Clusters []VClusterFetchResponseData `json:"clusters"`
}

VClusterListResponseData 集群列表数据

type ValidBranch

type ValidBranch struct {
	Name              string `json:"name"`
	IsProtect         bool   `json:"isProtect"`
	NeedApproval      bool   `json:"needApproval"`
	IsTriggerPipeline bool   `json:"isTriggerPipeline"`
	// 通过分支创建的流水线环境
	Workspace string `json:"workspace"`
	// 制品可部署的环境
	ArtifactWorkspace string `json:"artifactWorkspace"`
}

func (*ValidBranch) GetPermissionResource

func (branch *ValidBranch) GetPermissionResource() string

type Value

type Value struct {
	Type   string       `json:"type"`
	Values []ValueValue `json:"values"`
}

type ValueValue

type ValueValue struct {
	Receiver string `json:"receiver"`
	Secret   string `json:"secret"`
}

type VersionInfo

type VersionInfo struct {
	PackageName string `json:"packageName"` // 包名
	Version     string `json:"version"`     // 版本
	BuildID     string `json:"buildId"`     // 用来校验同version时的版本新旧,默认是pipelineID
}

VersionInfo 版本信息

type Volume

type Volume struct {
	// volume ID
	ID string `json:"volumeID,omitempty"`

	// 由volume driver来填 volume 所在地址
	// 对于 localvolume: hostpath
	// 对于 nasvolume: nas网盘地址(/netdata/xxx/...)
	VolumePath string `json:"volumePath"`

	// 避免与原有的volumeType冲突,类型不同
	// 所以叫做 ‘volumeTp’
	VolumeType `json:"volumeTp"`

	// 单位 G
	Size int `json:"storage,omitempty"`

	// 挂载到容器中的卷路径
	ContainerPath string `json:"containerPath"`

	// TODO: k8s.go 需要这个字段,现在对于k8s先不使用其插件中实现的volume相关实现(现在也没有用的地方)
	// k8s plugin 重构的时候才去实现 k8s 特定的 volume 逻辑
	Storage string `json:"-"`
}

type VolumeCreateRequest

type VolumeCreateRequest struct {

	// 单位 G
	Size int    `json:"size"`
	Type string `json:"type"`
}

VolumeCreateRequest 创建 volume POST: <scheduler>/api/volumes

type VolumeCreateResponse

type VolumeCreateResponse struct {
	Header
	Data VolumeInfo `json:"data"`
}

VolumeCreateResponse 创建 volume POST: <scheduler>/api/volumes

type VolumeDeleteRequest

type VolumeDeleteRequest struct {
	ID string `path:"id"`
}

VolumeDeleteRequest 删除 volume DELETE: <scheduler>/api/volumes/<id>

type VolumeDeleteResponse

type VolumeDeleteResponse struct {
	Header
}

VolumeDeleteResponse 删除 volume DELETE: <scheduler>/api/volumes/<id>

type VolumeInfo

type VolumeInfo struct {
	// volume ID, 可能是 uuid 也可能是 unique name
	ID         string            `json:"id"`
	References []VolumeReference `json:"references"`
	Size       int               `json:"size"`
	Type       VolumeType        `json:"type"`

	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
	DeletedAt time.Time `json:"deleted_at"`
}

VolumeInfo volume 信息

type VolumeInfoRequest

type VolumeInfoRequest struct {
	ID string `path:"id"`
}

VolumeInfoRequest 查询 volume GET: <scheduler>/api/volumes/<id>

type VolumeInfoResponse

type VolumeInfoResponse struct {
	Header
	Data VolumeInfo `json:"data"`
}

VolumeInfoResponse 查询 volume GET: <scheduler>/api/volumes/<id>

type VolumeReference

type VolumeReference struct {
	Info AttachDest
}

VolumeReference Volume 被使用的信息

type VolumeType

type VolumeType string

VolumeType volume 类型

const (
	// LocalVolume 本地盘
	LocalVolume VolumeType = "local"
	// NasVolume nas网盘
	NasVolume VolumeType = "nas"
)

func VolumeTypeFromString

func VolumeTypeFromString(s string) (VolumeType, error)

VolumeTypeFromString 从 string 转化成 VolumeType

type WebhookCreateRequest

type WebhookCreateRequest CreateHookRequest

WebhookCreateRequest 创建 webhook Path: "/api/webhooks", BackendPath: "/api/dice/eventbox/webhooks",

type WebhookCreateResponse

type WebhookCreateResponse struct {
	Header
	Data WebhookCreateResponseData `json:"data"`
}

WebhookCreateResponse 创建 webhook Path: "/api/webhooks", BackendPath: "/api/dice/eventbox/webhooks",

type WebhookCreateResponseData

type WebhookCreateResponseData string

WebhookCreateResponseData WebhookCreateResponse 的 Data

type WebhookDeleteRequest

type WebhookDeleteRequest struct {
	// webhook ID
	ID string `path:"id"`
}

WebhookDeleteRequest 删除 webhook Path: "/api/webhooks/<id>", BackendPath: "/api/dice/eventbox/webhooks/<id>",

type WebhookDeleteResponse

type WebhookDeleteResponse struct {
	Header
	Data WebhookDeleteResponseData `json:"data"`
}

WebhookDeleteResponse 删除 webhook Path: "/api/webhooks/<id>", BackendPath: "/api/dice/eventbox/webhooks/<id>",

type WebhookDeleteResponseData

type WebhookDeleteResponseData string

WebhookDeleteResponseData WebhookDeleteResponse 的 Data

type WebhookInspectRequest

type WebhookInspectRequest struct {
	// 所查询的 webhook ID
	ID string `path:"id"`
}

WebhookInspectRequest 获取 webhook 详情 Path: "/api/webhooks/<id>", BackendPath: "/api/dice/eventbox/webhooks/<id>",

type WebhookInspectResponse

type WebhookInspectResponse struct {
	Header
	Data WebhookInspectResponseData `json:"data"`
}

WebhookInspectResponse 获取 webhook 详情 Path: "/api/webhooks/<id>", BackendPath: "/api/dice/eventbox/webhooks/<id>",

type WebhookInspectResponseData

type WebhookInspectResponseData Hook

WebhookInspectResponseData WebhookInspectResponse 的 Data

type WebhookListEventsRequest

type WebhookListEventsRequest struct{}

WebhookListEventsRequest webhook 事件列表 Path: "/api/webhook-events", BackendPath: "/api/dice/eventbox/webhook_events",

type WebhookListEventsResponse

type WebhookListEventsResponse struct {
	Header
	Data WebhookListEventsResponseData `json:"data"`
}

WebhookListEventsResponse webhook 事件列表 Path: "/api/webhook-events", BackendPath: "/api/dice/eventbox/webhook_events",

type WebhookListEventsResponseData

type WebhookListEventsResponseData []struct {
	// webhook key 名字,是实际起作用的名字
	Key string `json:"key"`

	// webhook 描述性 title
	Title string `json:"title"`

	// webhook 描述文本
	Desc string `json:"desc"`
}

WebhookListEventsResponseData WebhookListEventsResponse 的 Data

type WebhookListRequest

type WebhookListRequest struct {
	// 列出 orgid & projectID & applicationID & env 下的 webhook
	OrgID string `query:"orgID"`

	// 列出 orgid & projectID & applicationID & env 下的 webhook
	ProjectID string `query:"projectID"`

	// 列出 orgid & projectID & applicationID & env 下的 webhook
	ApplicationID string `query:"applicationID"`

	// 列出 orgid & projectID & applicationID & env 下的 webhook, env格式:test,prod,dev
	Env string `query:"env"`
}

WebhookListRequest webhook 列表 Path: "/api/webhooks", BackendPath: "/api/dice/eventbox/webhooks",

type WebhookListResponse

type WebhookListResponse struct {
	Header
	Data WebhookListResponseData `json:"data"`
}

WebhookListResponse webhook 列表 Path: "/api/webhooks", BackendPath: "/api/dice/eventbox/webhooks",

type WebhookListResponseData

type WebhookListResponseData []Hook

WebhookListResponseData WebhookListResponse 的 Data

type WebhookPingRequest

type WebhookPingRequest struct {
	// webhook ID
	ID string `path:"id"`
}

WebhookPingRequest ping webhook, 发送 ping 事件 Path: "/api/webhooks/<id>/actions/ping", BackendPath: "/api/dice/eventbox/webhooks/<id>/actions/ping",

type WebhookPingResponse

type WebhookPingResponse struct {
	Header
	Data WebhookPingResponseData `json:"data"`
}

WebhookPingResponse ping webhook, 发送 ping 事件 Path: "/api/webhooks/<id>/actions/ping", BackendPath: "/api/dice/eventbox/webhooks/<id>/actions/ping",

type WebhookPingResponseData

type WebhookPingResponseData string

WebhookPingResponseData WebhookPingResponse 的 Data

type WebhookUpdateRequest

type WebhookUpdateRequest struct {
	// webhook ID
	ID   string                   `json:"-" path:"id"`
	Body WebhookUpdateRequestBody `json:"body"`
}

WebhookUpdateRequest 更新 webhook Path: "/api/webhooks/<id>", BackendPath: "/api/dice/eventbox/webhooks/<id>",

type WebhookUpdateRequestBody

type WebhookUpdateRequestBody struct {
	// 全量更新这个 webhook 关心的 event 列表
	Events []string `json:"events"`

	// 从 webhook event 列表中删除
	RemoveEvents []string `json:"removeEvents"`

	// 从 webhook event 列表中增加
	AddEvents []string `json:"addEvents"`

	// 该 webhook 对应的 URL, 所关心事件触发后会POST到该URL
	URL string `json:"url"`

	// 是否激活,如果没有该参数,默认为false
	Active bool `json:"active"`
}

WebhookUpdateRequestBody WebhookUpdateRequest

type WebhookUpdateResponse

type WebhookUpdateResponse struct {
	Header
	Data WebhookUpdateResponseData `json:"data"`
}

WebhookUpdateResponse 更新 webhook Path: "/api/webhooks/<id>", BackendPath: "/api/dice/eventbox/webhooks/<id>",

type WebhookUpdateResponseData

type WebhookUpdateResponseData string

WebhookUpdateResponseData WebhookUpdateResponse 的 Data

type WebsocketRequest

type WebsocketRequest struct {
	SessionID string          `json:"sessionID"`
	MessageID uint64          `json:"messageID"`
	Type      string          `json:"type"`
	CreatedAt time.Time       `json:"createdAt,omitempty"`
	Data      json.RawMessage `json:"data,omitempty"`
}

type WidgetResponse

type WidgetResponse struct {
	// 图形名称
	Name string `json:"name"`
	// 字段名列表
	Names []string `json:"names"`
	// 图形标题
	Titles []interface{} `json:"titles"`
	// 字段数据列表
	Datas []interface{} `json:"datas"`
}

type WorkSpace

type WorkSpace string
const (
	WorkspaceDev     WorkSpace = "DEV"
	WorkspaceTest    WorkSpace = "TEST"
	WorkspaceStaging WorkSpace = "STAGING"
	WorkspaceProd    WorkSpace = "PROD"
)

type WorkbenchProjectItem

type WorkbenchProjectItem struct {
	ProjectDTO          ProjectDTO `json:"projectDTO"`
	TotalIssueNum       int        `json:"totalIssueNum"`
	UnSpecialIssueNum   int        `json:"unSpecialIssueNum"`
	ExpiredIssueNum     int        `json:"expiredIssueNum"`
	ExpiredOneDayNum    int        `json:"expiredOneDayNum"`
	ExpiredTomorrowNum  int        `json:"expiredTomorrowNum"`
	ExpiredSevenDayNum  int        `json:"expiredSevenDayNum"`
	ExpiredThirtyDayNum int        `json:"expiredThirtyDayNum"`
	FeatureDayNum       int        `json:"featureDayNum"`
	IssueList           []Issue    `json:"issueList"`
}

type WorkbenchRequest

type WorkbenchRequest struct {
	OrgID     uint64 `json:"orgID"`
	PageNo    int    `json:"pageNo"`
	PageSize  int    `json:"pageSize"`
	IssueSize int    `json:"issueSize"`
}

type WorkbenchResponse

type WorkbenchResponse struct {
	Header
	Data WorkbenchResponseData `json:"data"`
}

type WorkbenchResponseData

type WorkbenchResponseData struct {
	TotalProject int                    `json:"totalProject"`
	TotalIssue   int                    `json:"totalIssue"`
	List         []WorkbenchProjectItem `json:"list"`
}

type WsAPIDocAutoSaveReqData

type WsAPIDocAutoSaveReqData struct {
	Pinode  string `json:"pinode"`
	Inode   string `json:"inode"`
	Content string `json:"content"`
}

type WsAPIDocHandShakeReq

type WsAPIDocHandShakeReq struct {
	OrgID     uint64
	Identity  *IdentityInfo
	URIParams *FileTreeDetailURI
}

type WsAPIDocHeartBeatReqData

type WsAPIDocHeartBeatReqData struct {
	Pinode string `json:"pinode"`
	Inode  string `json:"inode"`
}

Source Files

Jump to

Keyboard shortcuts

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