Documentation ¶
Index ¶
- Constants
- Variables
- type ACRPushData
- type ACRRepository
- type AccessKeyRequest
- type AddonArgsResponse
- type AddonBaseStatus
- type AddonDefinition
- type AddonInfo
- type AddonPhase
- type AddonRegistry
- type AddonStatusResponse
- type ApplicationBase
- type ApplicationDeployRequest
- type ApplicationDeployResponse
- type ApplicationDockerhubWebhookResponse
- type ApplicationRequest
- type ApplicationResourceInfo
- type ApplicationResponse
- type ApplicationRevisionBase
- type ApplicationStatisticsResponse
- type ApplicationStatusResponse
- type ApplicationTemplateBase
- type ApplicationTemplateVersion
- type ApplicationTrait
- type ApplicationTriggerBase
- type ClusterBase
- type ClusterResourceInfo
- type ClusterSelector
- type ClusterTarget
- type ComponentBase
- type ComponentListResponse
- type ComponentSelector
- type ConnectCloudClusterRequest
- type CreateAddonRegistryRequest
- type CreateApplicationEnvbindingRequest
- type CreateApplicationRequest
- type CreateApplicationTemplateRequest
- type CreateApplicationTraitRequest
- type CreateApplicationTriggerRequest
- type CreateCloudClusterRequest
- type CreateCloudClusterResponse
- type CreateClusterNamespaceRequest
- type CreateClusterNamespaceResponse
- type CreateClusterRequest
- type CreateComponentRequest
- type CreateEnvRequest
- type CreatePolicyRequest
- type CreateProjectRequest
- type CreateTargetRequest
- type CreateWorkflowRequest
- type DefinitionBase
- type DetailAddonResponse
- type DetailApplicationResponse
- type DetailClusterResponse
- type DetailComponentResponse
- type DetailDefinitionResponse
- type DetailEnvBindingResponse
- type DetailPolicyResponse
- type DetailRevisionResponse
- type DetailTargetResponse
- type DetailWorkflowRecordResponse
- type DetailWorkflowResponse
- type DockerHubData
- type DockerHubRepository
- type EmptyResponse
- type EnableAddonRequest
- type EnablingProgress
- type Env
- type EnvBinding
- type EnvBindingBase
- type EnvBindingList
- type EnvBindingTarget
- type EventData
- type HandleApplicationHarborReq
- type HandleApplicationTriggerACRRequest
- type HandleApplicationTriggerDockerHubRequest
- type HandleApplicationTriggerWebhookRequest
- type ListAddonRegistryResponse
- type ListAddonResponse
- type ListApplicationComponentOptions
- type ListApplicationEnvBinding
- type ListApplicationOptions
- type ListApplicationPolicy
- type ListApplicationResponse
- type ListApplicationTriggerResponse
- type ListCloudClusterCreationResponse
- type ListCloudClusterResponse
- type ListClusterResponse
- type ListDefinitionResponse
- type ListEnabledAddonResponse
- type ListEnvOptions
- type ListEnvResponse
- type ListPolicyDefinitionResponse
- type ListProjectResponse
- type ListRevisionsResponse
- type ListTargetResponse
- type ListWorkflowRecordsResponse
- type ListWorkflowResponse
- type NameAlias
- type PolicyBase
- type PolicyDefinition
- type ProjectBase
- type PutApplicationEnvBindingRequest
- type Repository
- type Resources
- type SystemInfoRequest
- type SystemInfoResponse
- type SystemVersion
- type TargetBase
- type UpdateAddonRegistryRequest
- type UpdateApplicationComponentRequest
- type UpdateApplicationRequest
- type UpdateApplicationTraitRequest
- type UpdateEnvRequest
- type UpdatePolicyRequest
- type UpdateTargetRequest
- type UpdateWorkflowRequest
- type VelaQLViewResponse
- type WorkflowBase
- type WorkflowRecord
- type WorkflowStep
Constants ¶
const ( // TriggerTypeWeb means trigger by web TriggerTypeWeb string = "web" // TriggerTypeAPI means trigger by api TriggerTypeAPI string = "api" // TriggerTypeWebhook means trigger by webhook TriggerTypeWebhook string = "webhook" )
Variables ¶
var ( // CtxKeyApplication request context key of application CtxKeyApplication = "application" // CtxKeyWorkflow request context key of workflow CtxKeyWorkflow = "workflow" // CtxKeyTarget request context key of workflow CtxKeyTarget = "delivery-target" // CtxKeyApplicationEnvBinding request context key of env binding CtxKeyApplicationEnvBinding = "envbinding-policy" // CtxKeyApplicationComponent request context key of component CtxKeyApplicationComponent = "component" )
Functions ¶
This section is empty.
Types ¶
type ACRPushData ¶ added in v1.2.0
type ACRPushData struct { Digest string `json:"digest"` PushedAt string `json:"pushed_at"` Tag string `json:"tag"` }
ACRPushData is the push data of ACR
type ACRRepository ¶ added in v1.2.0
type ACRRepository struct { DateCreated string `json:"date_created"` Name string `json:"name"` Namespace string `json:"namespace"` Region string `json:"region"` RepoAuthenticationType string `json:"repo_authentication_type"` RepoFullName string `json:"repo_full_name"` RepoOriginType string `json:"repo_origin_type"` RepoType string `json:"repo_type"` }
ACRRepository is the repository of ACR
type AccessKeyRequest ¶ added in v1.2.0
type AccessKeyRequest struct { AccessKeyID string `json:"accessKeyID"` AccessKeySecret string `json:"accessKeySecret"` }
AccessKeyRequest request parameters to access cloud provider
type AddonArgsResponse ¶ added in v1.2.0
AddonArgsResponse defines the response of addon args
type AddonBaseStatus ¶ added in v1.2.0
type AddonBaseStatus struct { Name string `json:"name"` Phase AddonPhase `json:"phase"` }
AddonBaseStatus addon base status
type AddonDefinition ¶ added in v1.2.0
type AddonDefinition struct { Name string `json:"name,omitempty"` // can be component/trait...definition DefType string `json:"type,omitempty"` Description string `json:"description,omitempty"` }
AddonDefinition is definition an addon can provide
type AddonPhase ¶
type AddonPhase string
AddonPhase defines the phase of an addon
const ( // AddonPhaseDisabled indicates the addon is disabled AddonPhaseDisabled AddonPhase = "disabled" // AddonPhaseEnabled indicates the addon is enabled AddonPhaseEnabled AddonPhase = "enabled" // AddonPhaseEnabling indicates the addon is enabling AddonPhaseEnabling AddonPhase = "enabling" // AddonPhaseDisabling indicates the addon is enabling AddonPhaseDisabling AddonPhase = "disabling" // AddonPhaseSuspend indicates the addon is suspend AddonPhaseSuspend AddonPhase = "suspend" )
type AddonRegistry ¶ added in v1.2.0
type AddonRegistry struct { Name string `json:"name" validate:"required"` Git *addon.GitAddonSource `json:"git,omitempty"` OSS *addon.OSSAddonSource `json:"oss,omitempty"` }
AddonRegistry defines the format for a single addon registry
type AddonStatusResponse ¶
type AddonStatusResponse struct { AddonBaseStatus Args map[string]string `json:"args"` EnablingProgress *EnablingProgress `json:"enabling_progress,omitempty"` AppStatus common.AppStatus `json:"appStatus,omitempty"` // the status of multiple clusters Clusters map[string]map[string]interface{} `json:"clusters,omitempty"` }
AddonStatusResponse defines the format of addon status response
type ApplicationBase ¶
type ApplicationBase struct { Name string `json:"name"` Alias string `json:"alias"` Project *ProjectBase `json:"project"` Description string `json:"description"` CreateTime time.Time `json:"createTime"` UpdateTime time.Time `json:"updateTime"` Icon string `json:"icon"` Labels map[string]string `json:"labels,omitempty"` }
ApplicationBase application base model
type ApplicationDeployRequest ¶ added in v1.2.0
type ApplicationDeployRequest struct { WorkflowName string `json:"workflowName"` // User note message, optional Note string `json:"note"` // TriggerType the event trigger source, Web or API or Webhook TriggerType string `json:"triggerType" validate:"oneof=web api webhook"` // Force set to True to ignore unfinished events. Force bool `json:"force"` // CodeInfo is the source code info of this deploy CodeInfo *model.CodeInfo `json:"codeInfo,omitempty"` // ImageInfo is the image code info of this deploy ImageInfo *model.ImageInfo `json:"imageInfo,omitempty"` }
ApplicationDeployRequest the application deploy or update event request
type ApplicationDeployResponse ¶ added in v1.2.0
type ApplicationDeployResponse struct {
ApplicationRevisionBase
}
ApplicationDeployResponse application deploy response body
type ApplicationDockerhubWebhookResponse ¶ added in v1.2.0
type ApplicationDockerhubWebhookResponse struct { State string `json:"state,omitempty"` Description string `json:"description,omitempty"` Context string `json:"context,omitempty"` TargetURL string `json:"target_url,omitempty"` }
ApplicationDockerhubWebhookResponse dockerhub webhook response body
type ApplicationRequest ¶
type ApplicationRequest struct { Components []common.ApplicationComponent `json:"components"` Policies []v1beta1.AppPolicy `json:"policies,omitempty"` Workflow *v1beta1.Workflow `json:"workflow,omitempty"` }
ApplicationRequest represents application request for APIServer
type ApplicationResourceInfo ¶
type ApplicationResourceInfo struct {
ComponentNum int64 `json:"componentNum"`
}
ApplicationResourceInfo application-level resource consumption statistics
type ApplicationResponse ¶
type ApplicationResponse struct { APIVersion string `json:"apiVersion"` Kind string `json:"kind"` Spec v1beta1.ApplicationSpec `json:"spec"` Status common.AppStatus `json:"status"` }
ApplicationResponse represents application response for APIServer
type ApplicationRevisionBase ¶ added in v1.2.0
type ApplicationRevisionBase struct { CreateTime time.Time `json:"createTime"` Version string `json:"version"` Status string `json:"status"` Reason string `json:"reason,omitempty"` DeployUser string `json:"deployUser,omitempty"` Note string `json:"note"` EnvName string `json:"envName"` // SourceType the event trigger source, Web or API or Webhook TriggerType string `json:"triggerType"` // CodeInfo is the code info of this application revision CodeInfo *model.CodeInfo `json:"codeInfo,omitempty"` // ImageInfo is the image info of this application revision ImageInfo *model.ImageInfo `json:"imageInfo,omitempty"` }
ApplicationRevisionBase application revision base spec
type ApplicationStatisticsResponse ¶ added in v1.2.0
type ApplicationStatisticsResponse struct { EnvCount int64 `json:"envCount"` TargetCount int64 `json:"targetCount"` RevisonCount int64 `json:"revisonCount"` WorkflowCount int64 `json:"workflowCount"` }
ApplicationStatisticsResponse application statistics response body
type ApplicationStatusResponse ¶ added in v1.2.0
type ApplicationStatusResponse struct { EnvName string `json:"envName"` Status *common.AppStatus `json:"status"` }
ApplicationStatusResponse application status response body
type ApplicationTemplateBase ¶
type ApplicationTemplateBase struct { TemplateName string `json:"templateName"` Versions []*ApplicationTemplateVersion `json:"versions,omitempty"` CreateTime time.Time `json:"createTime"` UpdateTime time.Time `json:"updateTime"` }
ApplicationTemplateBase app template model
type ApplicationTemplateVersion ¶
type ApplicationTemplateVersion struct { Version string `json:"version"` Description string `json:"description"` CreateUser string `json:"createUser"` CreateTime time.Time `json:"createTime"` UpdateTime time.Time `json:"updateTime"` }
ApplicationTemplateVersion template version model
type ApplicationTrait ¶ added in v1.2.0
type ApplicationTrait struct { Name string `json:"name"` Type string `json:"type"` Alias string `json:"alias,omitempty"` Description string `json:"description,omitempty"` // Properties json data Properties *model.JSONStruct `json:"properties"` CreateTime time.Time `json:"createTime"` UpdateTime time.Time `json:"updateTime"` }
ApplicationTrait application trait
type ApplicationTriggerBase ¶ added in v1.2.0
type ApplicationTriggerBase struct { Name string `json:"name"` Alias string `json:"alias,omitempty"` Description string `json:"description,omitempty"` WorkflowName string `json:"workflowName"` Type string `json:"type"` PayloadType string `json:"payloadType"` Token string `json:"token"` ComponentName string `json:"componentName,omitempty"` CreateTime time.Time `json:"createTime"` UpdateTime time.Time `json:"updateTime"` }
ApplicationTriggerBase application trigger base model
type ClusterBase ¶
type ClusterBase struct { Name string `json:"name"` Alias string `json:"alias" optional:"true" validate:"checkalias"` Description string `json:"description" optional:"true"` Icon string `json:"icon" optional:"true"` Labels map[string]string `json:"labels" optional:"true"` Provider model.ProviderInfo `json:"providerInfo"` APIServerURL string `json:"apiServerURL"` DashboardURL string `json:"dashboardURL"` Status string `json:"status"` Reason string `json:"reason"` }
ClusterBase cluster base model
type ClusterResourceInfo ¶
type ClusterResourceInfo struct { WorkerNumber int `json:"workerNumber"` MasterNumber int `json:"masterNumber"` MemoryCapacity int64 `json:"memoryCapacity"` CPUCapacity int64 `json:"cpuCapacity"` GPUCapacity int64 `json:"gpuCapacity,omitempty"` PodCapacity int64 `json:"podCapacity"` MemoryUsed int64 `json:"memoryUsed"` CPUUsed int64 `json:"cpuUsed"` GPUUsed int64 `json:"gpuUsed,omitempty"` PodUsed int64 `json:"podUsed"` StorageClassList []string `json:"storageClassList,omitempty"` }
ClusterResourceInfo resource info of cluster
type ClusterSelector ¶ added in v1.2.0
type ClusterSelector struct { Name string `json:"name" validate:"checkname"` // Adapt to a scenario where only one Namespace is available or a user-defined Namespace is available. Namespace string `json:"namespace,omitempty"` }
ClusterSelector cluster selector
type ClusterTarget ¶ added in v1.2.0
type ClusterTarget struct { ClusterName string `json:"clusterName" validate:"checkname"` Namespace string `json:"namespace" optional:"true"` }
ClusterTarget kubernetes delivery target
type ComponentBase ¶
type ComponentBase struct { Name string `json:"name"` Alias string `json:"alias"` Description string `json:"description"` Labels map[string]string `json:"labels,omitempty"` ComponentType string `json:"componentType"` EnvNames []string `json:"envNames"` Icon string `json:"icon,omitempty"` DependsOn []string `json:"dependsOn"` Creator string `json:"creator,omitempty"` DeployVersion string `json:"deployVersion"` CreateTime time.Time `json:"createTime"` UpdateTime time.Time `json:"updateTime"` }
ComponentBase component base model
type ComponentListResponse ¶
type ComponentListResponse struct {
Components []*ComponentBase `json:"components"`
}
ComponentListResponse list component
type ComponentSelector ¶ added in v1.2.0
type ComponentSelector struct {
Components []string `json:"components"`
}
ComponentSelector component selector
type ConnectCloudClusterRequest ¶ added in v1.2.0
type ConnectCloudClusterRequest struct { AccessKeyID string `json:"accessKeyID"` AccessKeySecret string `json:"accessKeySecret"` ClusterID string `json:"clusterID"` Name string `json:"name" validate:"checkname"` Alias string `json:"alias" optional:"true" validate:"checkalias"` Description string `json:"description,omitempty" optional:"true"` Icon string `json:"icon"` Labels map[string]string `json:"labels,omitempty"` }
ConnectCloudClusterRequest request parameters to create a cluster from cloud cluster
type CreateAddonRegistryRequest ¶ added in v1.2.0
type CreateAddonRegistryRequest struct { Name string `json:"name" validate:"checkname"` Git *addon.GitAddonSource `json:"git,omitempty" ` Oss *addon.OSSAddonSource `json:"oss,omitempty"` }
CreateAddonRegistryRequest defines the format for addon registry create request
type CreateApplicationEnvbindingRequest ¶ added in v1.2.0
type CreateApplicationEnvbindingRequest struct {
EnvBinding
}
CreateApplicationEnvbindingRequest new application env
type CreateApplicationRequest ¶
type CreateApplicationRequest struct { Name string `json:"name" validate:"checkname"` Alias string `json:"alias" validate:"checkalias" optional:"true"` Project string `json:"project" validate:"checkname"` Description string `json:"description" optional:"true"` Icon string `json:"icon"` Labels map[string]string `json:"labels,omitempty"` EnvBinding []*EnvBinding `json:"envBinding,omitempty"` Component *CreateComponentRequest `json:"component"` }
CreateApplicationRequest create application request body
type CreateApplicationTemplateRequest ¶
type CreateApplicationTemplateRequest struct { TemplateName string `json:"templateName" validate:"checkname"` Version string `json:"version" validate:"required"` Description string `json:"description"` }
CreateApplicationTemplateRequest create app template request model
type CreateApplicationTraitRequest ¶ added in v1.2.0
type CreateApplicationTraitRequest struct { Type string `json:"type" validate:"checkname"` Alias string `json:"alias,omitempty" validate:"checkalias" optional:"true"` Description string `json:"description,omitempty" optional:"true"` Properties string `json:"properties"` }
CreateApplicationTraitRequest create application triat req
type CreateApplicationTriggerRequest ¶ added in v1.2.0
type CreateApplicationTriggerRequest struct { Name string `json:"name" validate:"checkname"` Alias string `json:"alias" validate:"checkalias" optional:"true"` Description string `json:"description" optional:"true"` WorkflowName string `json:"workflowName"` Type string `json:"type" validate:"oneof=webhook"` PayloadType string `json:"payloadType" validate:"checkpayloadtype"` ComponentName string `json:"componentName,omitempty" optional:"true"` }
CreateApplicationTriggerRequest create application trigger
type CreateCloudClusterRequest ¶ added in v1.2.0
type CreateCloudClusterRequest struct { AccessKeyID string `json:"accessKeyID"` AccessKeySecret string `json:"accessKeySecret"` Name string `json:"name" validate:"checkname"` Zone string `json:"zone"` WorkerNumber int `json:"workerNumber"` CPUCoresPerWorker int64 `json:"cpuCoresPerWorker"` MemoryPerWorker int64 `json:"memoryPerWorker"` }
CreateCloudClusterRequest request parameters to create a cloud cluster (buy one)
type CreateCloudClusterResponse ¶ added in v1.2.0
type CreateCloudClusterResponse struct { Name string `json:"clusterName"` ClusterID string `json:"clusterID"` Status string `json:"status"` }
CreateCloudClusterResponse return values for cloud cluster create request
type CreateClusterNamespaceRequest ¶ added in v1.2.0
type CreateClusterNamespaceRequest struct {
Namespace string `json:"namespace"`
}
CreateClusterNamespaceRequest request parameter to create namespace in cluster
type CreateClusterNamespaceResponse ¶ added in v1.2.0
type CreateClusterNamespaceResponse struct {
Exists bool `json:"exists"`
}
CreateClusterNamespaceResponse response parameter for created namespace in cluster
type CreateClusterRequest ¶
type CreateClusterRequest struct { Name string `json:"name" validate:"checkname"` Alias string `json:"alias" validate:"checkalias" optional:"true"` Description string `json:"description,omitempty"` Icon string `json:"icon"` KubeConfig string `json:"kubeConfig,omitempty" validate:"required_without=KubeConfigSecret"` KubeConfigSecret string `json:"kubeConfigSecret,omitempty" validate:"required_without=KubeConfig"` Labels map[string]string `json:"labels,omitempty"` DashboardURL string `json:"dashboardURL,omitempty"` }
CreateClusterRequest request parameters to create a cluster
type CreateComponentRequest ¶
type CreateComponentRequest struct { Name string `json:"name" validate:"checkname"` Alias string `json:"alias" validate:"checkalias" optional:"true"` Description string `json:"description" optional:"true"` Icon string `json:"icon" optional:"true"` Labels map[string]string `json:"labels,omitempty"` ComponentType string `json:"componentType" validate:"checkname"` Properties string `json:"properties,omitempty"` DependsOn []string `json:"dependsOn" optional:"true"` Traits []*CreateApplicationTraitRequest `json:"traits,omitempty" optional:"true"` }
CreateComponentRequest create component request model
type CreateEnvRequest ¶ added in v1.2.0
type CreateEnvRequest struct { Name string `json:"name" validate:"checkname"` Alias string `json:"alias" validate:"checkalias" optional:"true"` Description string `json:"description,omitempty" optional:"true"` // Project defines the project this Env belongs to Project string `json:"project"` // Namespace defines the K8s namespace of the Env in control plane Namespace string `json:"namespace"` // Targets defines the name of delivery target that belongs to this env // In one project, a delivery target can only belong to one env. Targets []string `json:"targets,omitempty" optional:"true"` }
CreateEnvRequest contains the env data as request body
type CreatePolicyRequest ¶ added in v1.2.0
type CreatePolicyRequest struct { // Name is the unique name of the policy. Name string `json:"name" validate:"checkname"` Description string `json:"description"` Type string `json:"type" validate:"checkname"` // Properties json data Properties string `json:"properties"` }
CreatePolicyRequest create app policy
type CreateProjectRequest ¶ added in v1.2.0
type CreateProjectRequest struct { Name string `json:"name" validate:"checkname"` Alias string `json:"alias" validate:"checkalias" optional:"true"` Description string `json:"description" optional:"true"` }
CreateProjectRequest create project request body
type CreateTargetRequest ¶ added in v1.2.0
type CreateTargetRequest struct { Name string `json:"name" validate:"checkname"` Alias string `json:"alias,omitempty" validate:"checkalias" optional:"true"` Description string `json:"description,omitempty" optional:"true"` Cluster *ClusterTarget `json:"cluster,omitempty"` Variable map[string]interface{} `json:"variable,omitempty"` }
CreateTargetRequest create delivery target request body
type CreateWorkflowRequest ¶ added in v1.2.0
type CreateWorkflowRequest struct { Name string `json:"name" validate:"checkname"` Alias string `json:"alias" validate:"checkalias" optional:"true"` Description string `json:"description" optional:"true"` Steps []WorkflowStep `json:"steps,omitempty"` Default *bool `json:"default"` EnvName string `json:"envName"` }
CreateWorkflowRequest create workflow request
type DefinitionBase ¶ added in v1.2.0
type DefinitionBase struct { Name string `json:"name"` Description string `json:"description"` WorkloadType string `json:"workloadType,omitempty"` Icon string `json:"icon"` }
DefinitionBase is the definition base model
type DetailAddonResponse ¶
type DetailAddonResponse struct { addon.Meta APISchema *openapi3.Schema `json:"schema"` UISchema []*utils.UIParameter `json:"uiSchema"` // More details about the addon, e.g. README Detail string `json:"detail,omitempty"` Definitions []*AddonDefinition `json:"definitions"` RegistryName string `json:"registryName,omitempty"` }
DetailAddonResponse defines the format for showing the addon details
type DetailApplicationResponse ¶
type DetailApplicationResponse struct { ApplicationBase Policies []string `json:"policies"` EnvBindings []string `json:"envBindings"` Status string `json:"status"` ApplicationType string `json:"applicationType"` ResourceInfo ApplicationResourceInfo `json:"resourceInfo"` }
DetailApplicationResponse application detail
type DetailClusterResponse ¶
type DetailClusterResponse struct { model.Cluster ResourceInfo ClusterResourceInfo `json:"resourceInfo"` }
DetailClusterResponse cluster detail information model
type DetailComponentResponse ¶ added in v1.2.0
type DetailComponentResponse struct {
model.ApplicationComponent
}
DetailComponentResponse detail component response body
type DetailDefinitionResponse ¶ added in v1.2.0
type DetailDefinitionResponse struct { APISchema *openapi3.Schema `json:"schema"` UISchema []*utils.UIParameter `json:"uiSchema"` }
DetailDefinitionResponse get definition detail
type DetailEnvBindingResponse ¶ added in v1.2.0
type DetailEnvBindingResponse struct {
EnvBindingBase
}
DetailEnvBindingResponse defines the response of env-binding details
type DetailPolicyResponse ¶ added in v1.2.0
type DetailPolicyResponse struct {
PolicyBase
}
DetailPolicyResponse app policy detail model
type DetailRevisionResponse ¶ added in v1.2.0
type DetailRevisionResponse struct {
model.ApplicationRevision
}
DetailRevisionResponse get application revision detail
type DetailTargetResponse ¶ added in v1.2.0
type DetailTargetResponse struct {
TargetBase
}
DetailTargetResponse detail Target response
type DetailWorkflowRecordResponse ¶ added in v1.2.0
type DetailWorkflowRecordResponse struct { WorkflowRecord DeployTime time.Time `json:"deployTime"` DeployUser string `json:"deployUser"` Note string `json:"note"` // TriggerType the event trigger source, Web or API or Webhook TriggerType string `json:"triggerType"` }
DetailWorkflowRecordResponse get workflow record detail
type DetailWorkflowResponse ¶ added in v1.2.0
type DetailWorkflowResponse struct {
WorkflowBase
}
DetailWorkflowResponse detail workflow response
type DockerHubData ¶ added in v1.2.0
type DockerHubData struct { Images []string `json:"images"` PushedAt int64 `json:"pushed_at"` Pusher string `json:"pusher"` Tag string `json:"tag"` }
DockerHubData is the push data of dockerhub
type DockerHubRepository ¶ added in v1.2.0
type DockerHubRepository struct { CommentCount int `json:"comment_count"` DateCreated int64 `json:"date_created"` Description string `json:"description"` Dockerfile string `json:"dockerfile"` FullDescription string `json:"full_description"` IsOfficial bool `json:"is_official"` IsPrivate bool `json:"is_private"` IsTrusted bool `json:"is_trusted"` Name string `json:"name"` Namespace string `json:"namespace"` Owner string `json:"owner"` RepoName string `json:"repo_name"` RepoURL string `json:"repo_url"` StartCount int `json:"star_count"` Status string `json:"status"` }
DockerHubRepository is the repository of dockerhub
type EmptyResponse ¶ added in v1.2.0
type EmptyResponse struct{}
EmptyResponse empty response, it will used for delete api
type EnableAddonRequest ¶ added in v1.2.0
type EnableAddonRequest struct { // Args is the key-value environment variables, e.g. AK/SK credentials. Args map[string]interface{} `json:"args,omitempty"` }
EnableAddonRequest defines the format for enable addon request
type EnablingProgress ¶ added in v1.2.0
type EnablingProgress struct { EnabledComponents int `json:"enabled_components"` TotalComponents int `json:"total_components"` }
EnablingProgress defines the progress of enabling an addon
type Env ¶ added in v1.2.0
type Env struct { Name string `json:"name"` Alias string `json:"alias"` Description string `json:"description,omitempty" optional:"true"` // Project defines the project this Env belongs to Project NameAlias `json:"project"` // Namespace defines the K8s namespace of the Env in control plane Namespace string `json:"namespace"` // Targets defines the name of delivery target that belongs to this env // In one project, a delivery target can only belong to one env. Targets []NameAlias `json:"targets,omitempty" optional:"true"` CreateTime time.Time `json:"createTime"` UpdateTime time.Time `json:"updateTime"` }
Env models the data of env in API
type EnvBinding ¶ added in v1.2.0
type EnvBinding struct {
Name string `json:"name" validate:"checkname"`
}
EnvBinding application env binding
type EnvBindingBase ¶ added in v1.2.0
type EnvBindingBase struct { Name string `json:"name" validate:"checkname"` Alias string `json:"alias" validate:"checkalias" optional:"true"` Description string `json:"description,omitempty" optional:"true"` TargetNames []string `json:"targetNames"` Targets []EnvBindingTarget `json:"targets,omitempty"` ComponentSelector *ComponentSelector `json:"componentSelector" optional:"true"` CreateTime time.Time `json:"createTime"` UpdateTime time.Time `json:"updateTime"` AppDeployName string `json:"appDeployName"` AppDeployNamespace string `json:"appDeployNamespace"` }
EnvBindingBase application env binding
type EnvBindingList ¶ added in v1.2.0
type EnvBindingList []*EnvBinding
EnvBindingList env binding list
type EnvBindingTarget ¶ added in v1.2.0
type EnvBindingTarget struct { NameAlias Cluster *ClusterTarget `json:"cluster,omitempty"` }
EnvBindingTarget the target struct in the envbinding base struct
type EventData ¶ added in v1.2.0
type EventData struct { Resources []Resources `json:"resources"` Repository Repository `json:"repository"` }
EventData is the event info of harbor
type HandleApplicationHarborReq ¶ added in v1.2.0
type HandleApplicationHarborReq struct { Type string `json:"type"` OccurAt int64 `json:"occur_at"` Operator string `json:"operator"` EventData EventData `json:"event_data"` }
HandleApplicationHarborReq handles application trigger harbor request
type HandleApplicationTriggerACRRequest ¶ added in v1.2.0
type HandleApplicationTriggerACRRequest struct { PushData ACRPushData `json:"push_data"` Repository ACRRepository `json:"repository"` }
HandleApplicationTriggerACRRequest handles application trigger ACR request
type HandleApplicationTriggerDockerHubRequest ¶ added in v1.2.0
type HandleApplicationTriggerDockerHubRequest struct { CallbackURL string `json:"callback_url"` PushData DockerHubData `json:"push_data"` Repository DockerHubRepository `json:"repository"` }
HandleApplicationTriggerDockerHubRequest application trigger DockerHub webhook request
type HandleApplicationTriggerWebhookRequest ¶ added in v1.2.0
type HandleApplicationTriggerWebhookRequest struct { Upgrade map[string]*model.JSONStruct `json:"upgrade,omitempty"` CodeInfo *model.CodeInfo `json:"codeInfo,omitempty"` }
HandleApplicationTriggerWebhookRequest handles application trigger webhook request
type ListAddonRegistryResponse ¶ added in v1.2.0
type ListAddonRegistryResponse struct {
Registries []*AddonRegistry `json:"registries"`
}
ListAddonRegistryResponse list addon registry
type ListAddonResponse ¶
type ListAddonResponse struct { Addons []*AddonInfo `json:"addons"` // Message demonstrate the error info if exists Message string `json:"message,omitempty"` }
ListAddonResponse defines the format for addon list response
type ListApplicationComponentOptions ¶ added in v1.2.0
type ListApplicationComponentOptions struct {
EnvName string `json:"envName"`
}
ListApplicationComponentOptions list app component list
type ListApplicationEnvBinding ¶ added in v1.2.0
type ListApplicationEnvBinding struct {
EnvBindings []*EnvBindingBase `json:"envBindings"`
}
ListApplicationEnvBinding list app envBindings
type ListApplicationOptions ¶ added in v1.2.0
type ListApplicationOptions struct { Project string `json:"project"` Env string `json:"env"` TargetName string `json:"targetName"` Query string `json:"query"` }
ListApplicationOptions list application query options
type ListApplicationPolicy ¶ added in v1.2.0
type ListApplicationPolicy struct {
Policies []*PolicyBase `json:"policies"`
}
ListApplicationPolicy list app policies
type ListApplicationResponse ¶
type ListApplicationResponse struct {
Applications []*ApplicationBase `json:"applications"`
}
ListApplicationResponse list applications by query params
type ListApplicationTriggerResponse ¶ added in v1.2.0
type ListApplicationTriggerResponse struct {
Triggers []*ApplicationTriggerBase `json:"triggers"`
}
ListApplicationTriggerResponse list application triggers response body
type ListCloudClusterCreationResponse ¶ added in v1.2.0
type ListCloudClusterCreationResponse struct {
Creations []CreateCloudClusterResponse `json:"creations"`
}
ListCloudClusterCreationResponse return the cluster names of creation process of cloud clusters
type ListCloudClusterResponse ¶ added in v1.2.0
type ListCloudClusterResponse struct { Clusters []cloudprovider.CloudCluster `json:"clusters"` Total int `json:"total"` }
ListCloudClusterResponse list cloud clusters
type ListClusterResponse ¶
type ListClusterResponse struct { Clusters []ClusterBase `json:"clusters"` Total int64 `json:"total"` }
ListClusterResponse list cluster
type ListDefinitionResponse ¶ added in v1.2.0
type ListDefinitionResponse struct {
Definitions []*DefinitionBase `json:"definitions"`
}
ListDefinitionResponse list definition response model
type ListEnabledAddonResponse ¶ added in v1.2.0
type ListEnabledAddonResponse struct {
EnabledAddons []*AddonBaseStatus `json:"enabledAddons"`
}
ListEnabledAddonResponse defines the format for enabled addon list response
type ListEnvOptions ¶ added in v1.2.0
type ListEnvOptions struct {
Project string `json:"project"`
}
ListEnvOptions list envs by query options
type ListEnvResponse ¶ added in v1.2.0
type ListEnvResponse struct {
Envs []*Env `json:"envs"`
}
ListEnvResponse response the while env list
type ListPolicyDefinitionResponse ¶ added in v1.2.0
type ListPolicyDefinitionResponse struct {
PolicyDefinitions []PolicyDefinition `json:"policyDefinitions"`
}
ListPolicyDefinitionResponse list available
type ListProjectResponse ¶ added in v1.2.0
type ListProjectResponse struct {
Projects []*ProjectBase `json:"projects"`
}
ListProjectResponse list project response body
type ListRevisionsResponse ¶ added in v1.2.0
type ListRevisionsResponse struct { Revisions []ApplicationRevisionBase `json:"revisions"` Total int64 `json:"total"` }
ListRevisionsResponse list application revisions
type ListTargetResponse ¶ added in v1.2.0
type ListTargetResponse struct { Targets []TargetBase `json:"targets"` Total int64 `json:"total"` }
ListTargetResponse list delivery target response body
type ListWorkflowRecordsResponse ¶ added in v1.2.0
type ListWorkflowRecordsResponse struct { Records []WorkflowRecord `json:"records"` Total int64 `json:"total"` }
ListWorkflowRecordsResponse list workflow execution record
type ListWorkflowResponse ¶ added in v1.2.0
type ListWorkflowResponse struct {
Workflows []*WorkflowBase `json:"workflows"`
}
ListWorkflowResponse list application workflows
type PolicyBase ¶ added in v1.2.0
type PolicyBase struct { // Name is the unique name of the policy. Name string `json:"name"` Type string `json:"type"` Description string `json:"description"` Creator string `json:"creator"` // Properties json data Properties *model.JSONStruct `json:"properties"` CreateTime time.Time `json:"createTime"` UpdateTime time.Time `json:"updateTime"` }
PolicyBase application policy base info
type PolicyDefinition ¶ added in v1.2.0
type PolicyDefinition struct { Name string `json:"name"` Description string `json:"description"` Parameters []types.Parameter `json:"parameters"` }
PolicyDefinition application policy definition
type ProjectBase ¶ added in v1.2.0
type ProjectBase struct { Name string `json:"name"` Alias string `json:"alias"` Description string `json:"description"` CreateTime time.Time `json:"createTime"` UpdateTime time.Time `json:"updateTime"` }
ProjectBase project base model
type PutApplicationEnvBindingRequest ¶ added in v1.2.0
type PutApplicationEnvBindingRequest struct { }
PutApplicationEnvBindingRequest update app envbinding request body
type Repository ¶ added in v1.2.0
type Repository struct { DateCreated int64 `json:"date_created"` Name string `json:"name"` Namespace string `json:"namespace"` RepoFullName string `json:"repo_full_name"` RepoType string `json:"repo_type"` }
Repository is the repository of harbor
type Resources ¶ added in v1.2.0
type Resources struct { Digest string `json:"digest"` Tag string `json:"tag"` ResourceURL string `json:"resource_url"` }
Resources is the image info of harbor
type SystemInfoRequest ¶ added in v1.2.0
type SystemInfoRequest struct {
EnableCollection bool
}
SystemInfoRequest request by update SystemInfo
type SystemInfoResponse ¶ added in v1.2.0
type SystemInfoResponse struct { model.SystemInfo SystemVersion SystemVersion `json:"systemVersion"` }
SystemInfoResponse get SystemInfo
type SystemVersion ¶ added in v1.2.0
type SystemVersion struct { VelaVersion string `json:"velaVersion"` GitVersion string `json:"gitVersion"` }
SystemVersion contains KubeVela version
type TargetBase ¶ added in v1.2.0
type TargetBase struct { Name string `json:"name"` Alias string `json:"alias,omitempty" validate:"checkalias" optional:"true"` Description string `json:"description,omitempty" optional:"true"` Cluster *ClusterTarget `json:"cluster,omitempty"` ClusterAlias string `json:"clusterAlias,omitempty"` Variable map[string]interface{} `json:"variable,omitempty"` CreateTime time.Time `json:"createTime"` UpdateTime time.Time `json:"updateTime"` AppNum int64 `json:"appNum,omitempty"` }
TargetBase Target base model
type UpdateAddonRegistryRequest ¶ added in v1.2.0
type UpdateAddonRegistryRequest struct { Git *addon.GitAddonSource `json:"git,omitempty"` Oss *addon.OSSAddonSource `json:"oss,omitempty"` }
UpdateAddonRegistryRequest defines the format for addon registry update request
type UpdateApplicationComponentRequest ¶ added in v1.2.0
type UpdateApplicationComponentRequest struct { Alias *string `json:"alias" optional:"true"` Description *string `json:"description" optional:"true"` Icon *string `json:"icon" optional:"true"` Labels *map[string]string `json:"labels,omitempty"` Properties *string `json:"properties,omitempty"` DependsOn *[]string `json:"dependsOn" optional:"true"` }
UpdateApplicationComponentRequest update component request body
type UpdateApplicationRequest ¶ added in v1.2.0
type UpdateApplicationRequest struct { Alias string `json:"alias" validate:"checkalias" optional:"true"` Description string `json:"description" optional:"true"` Icon string `json:"icon" optional:"true"` Labels map[string]string `json:"labels,omitempty"` }
UpdateApplicationRequest update application base config
type UpdateApplicationTraitRequest ¶ added in v1.2.0
type UpdateApplicationTraitRequest struct { Alias string `json:"alias,omitempty" validate:"checkalias" optional:"true"` Description string `json:"description,omitempty" optional:"true"` Properties string `json:"properties"` }
UpdateApplicationTraitRequest update application trait req
type UpdateEnvRequest ¶ added in v1.2.0
type UpdateEnvRequest struct { Alias string `json:"alias" validate:"checkalias" optional:"true"` Description string `json:"description,omitempty" optional:"true"` // Targets defines the name of delivery target that belongs to this env // In one project, a delivery target can only belong to one env. Targets []string `json:"targets,omitempty" optional:"true"` }
UpdateEnvRequest defines the data of Env for update
type UpdatePolicyRequest ¶ added in v1.2.0
type UpdatePolicyRequest struct { Description string `json:"description"` Type string `json:"type" validate:"checkname"` // Properties json data Properties string `json:"properties"` }
UpdatePolicyRequest update policy
type UpdateTargetRequest ¶ added in v1.2.0
type UpdateTargetRequest struct { Alias string `json:"alias,omitempty" validate:"checkalias" optional:"true"` Description string `json:"description,omitempty" optional:"true"` Variable map[string]interface{} `json:"variable,omitempty"` }
UpdateTargetRequest only support full quantity update
type UpdateWorkflowRequest ¶ added in v1.2.0
type UpdateWorkflowRequest struct { Alias string `json:"alias" validate:"checkalias" optional:"true"` Description string `json:"description" optional:"true"` Steps []WorkflowStep `json:"steps,omitempty"` Default *bool `json:"default"` }
UpdateWorkflowRequest update or create application workflow
type VelaQLViewResponse ¶ added in v1.2.0
type VelaQLViewResponse map[string]interface{}
VelaQLViewResponse query response
type WorkflowBase ¶ added in v1.2.0
type WorkflowBase struct { Name string `json:"name"` Alias string `json:"alias"` Description string `json:"description"` Enable bool `json:"enable"` Default bool `json:"default"` EnvName string `json:"envName"` CreateTime time.Time `json:"createTime"` UpdateTime time.Time `json:"updateTime"` Steps []WorkflowStep `json:"steps,omitempty"` }
WorkflowBase workflow base model
type WorkflowRecord ¶ added in v1.2.0
type WorkflowRecord struct { Name string `json:"name"` Namespace string `json:"namespace"` WorkflowName string `json:"workflowName"` WorkflowAlias string `json:"workflowAlias"` ApplicationRevision string `json:"applicationRevision"` StartTime time.Time `json:"startTime,omitempty"` Status string `json:"status"` Steps []model.WorkflowStepStatus `json:"steps,omitempty"` }
WorkflowRecord workflow record
type WorkflowStep ¶ added in v1.2.0
type WorkflowStep struct { // Name is the unique name of the workflow step. Name string `json:"name" validate:"checkname"` Alias string `json:"alias" validate:"checkalias" optional:"true"` Type string `json:"type" validate:"checkname"` Description string `json:"description" optional:"true"` DependsOn []string `json:"dependsOn" optional:"true"` Properties string `json:"properties,omitempty"` Inputs common.StepInputs `json:"inputs,omitempty" optional:"true"` Outputs common.StepOutputs `json:"outputs,omitempty" optional:"true"` }
WorkflowStep workflow step config