v1

package
v1.5.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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"
	// CtxKeyUser request context key of user
	CtxKeyUser = "user"
	// CtxKeyToken request context key of request token
	CtxKeyToken = "token"
)

Functions

This section is empty.

Types

type ACRPushData

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

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

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

AccessKeyRequest request parameters to access cloud provider

type AddProjectUserRequest

type AddProjectUserRequest struct {
	UserName  string   `json:"userName" validate:"checkname"`
	UserRoles []string `json:"userRoles"`
}

AddProjectUserRequest the request body that add user to project

type AddonArgsResponse

type AddonArgsResponse struct {
	Args map[string]string `json:"args"`
}

AddonArgsResponse defines the response of addon args

type AddonBaseStatus

type AddonBaseStatus struct {
	Name  string     `json:"name"`
	Phase AddonPhase `json:"phase"`
}

AddonBaseStatus addon base status

type AddonDefinition

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 AddonInfo

type AddonInfo struct {
	*addon.Meta
	RegistryName string `json:"registryName"`
}

AddonInfo contain addon metaData and some baseInfo

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

type AddonRegistry struct {
	Name   string                   `json:"name" validate:"required"`
	Helm   *addon.HelmSource        `json:"helm,omitempty"`
	Git    *addon.GitAddonSource    `json:"git,omitempty"`
	OSS    *addon.OSSAddonSource    `json:"oss,omitempty"`
	Gitee  *addon.GiteeAddonSource  `json:"gitee,omitempty" `
	Gitlab *addon.GitlabAddonSource `json:"gitlab,omitempty" `
}

AddonRegistry defines the format for a single addon registry

type AddonStatusResponse

type AddonStatusResponse struct {
	AddonBaseStatus
	Args             map[string]interface{} `json:"args"`
	EnablingProgress *EnablingProgress      `json:"enabling_progress,omitempty"`
	AppStatus        common.AppStatus       `json:"appStatus,omitempty"`
	InstalledVersion string                 `json:"installedVersion,omitempty"`

	// the status of multiple clusters
	Clusters    map[string]map[string]interface{} `json:"clusters,omitempty"`
	AllClusters []NameAlias                       `json:"allClusters,omitempty"`
}

AddonStatusResponse defines the format of addon status response

type AppCompareReq

type AppCompareReq struct {
	CompareRevisionWithRunning *CompareRevisionWithRunningOption `json:"compareRevisionWithRunning,omitempty"`
	CompareRevisionWithLatest  *CompareRevisionWithLatestOption  `json:"compareRevisionWithLatest,omitempty"`
	CompareLatestWithRunning   *CompareLatestWithRunningOption   `json:"compareLatestWithRunning,omitempty"`
}

AppCompareReq application compare req

type AppCompareResponse

type AppCompareResponse struct {
	IsDiff        bool   `json:"isDiff"`
	DiffReport    string `json:"diffReport"`
	BaseAppYAML   string `json:"baseAppYAML"`
	TargetAppYAML string `json:"targetAppYAML"`
}

AppCompareResponse application compare result

type AppDryRunReq

type AppDryRunReq struct {
	DryRunType string `json:"dryRunType" validate:"oneof=APP REVISION"`
	Env        string `json:"env"`
	Workflow   string `json:"workflow"`
	Version    string `json:"version"`
}

AppDryRunReq application dry-run req

type AppDryRunResponse

type AppDryRunResponse struct {
	YAML    string `json:"yaml"`
	Success bool   `json:"success"`
	Message string `json:"message,omitempty"`
}

AppDryRunResponse application dry-run result

type AppResetResponse

type AppResetResponse struct {
	IsReset bool `json:"isReset"`
}

AppResetResponse application reset result

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"`
	ReadOnly    bool              `json:"readOnly,omitempty"`
}

ApplicationBase application base model

type ApplicationDeployRequest

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

type ApplicationDeployResponse struct {
	ApplicationRevisionBase
}

ApplicationDeployResponse application deploy response body

type ApplicationDockerhubWebhookResponse

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

type ApplicationRevisionBase struct {
	CreateTime time.Time  `json:"createTime"`
	Version    string     `json:"version"`
	Status     string     `json:"status"`
	Reason     string     `json:"reason,omitempty"`
	DeployUser *NameAlias `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

type ApplicationStatisticsResponse struct {
	EnvCount      int64 `json:"envCount"`
	TargetCount   int64 `json:"targetCount"`
	RevisionCount int64 `json:"revisionCount"`
	WorkflowCount int64 `json:"workflowCount"`
}

ApplicationStatisticsResponse application statistics response body

type ApplicationStatusResponse

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

type ApplicationTrait struct {
	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

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 ChartRepoResponse

type ChartRepoResponse struct {
	URL        string `json:"url"`
	SecretName string `json:"secretName"`
}

ChartRepoResponse the response body of chart repo

type ChartRepoResponseList

type ChartRepoResponseList struct {
	ChartRepoResponse []*ChartRepoResponse `json:"repos"`
}

ChartRepoResponseList the response body of list chart repo

type ChartVersionListResponse

type ChartVersionListResponse struct {
	Versions repo.ChartVersions `json:"versions"`
}

ChartVersionListResponse contains helm chart versions info

type CloudShellPrepareResponse added in v1.5.0

type CloudShellPrepareResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
}

CloudShellPrepareResponse the response for the cloud shell environment creation

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

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

type ClusterTarget struct {
	ClusterName string `json:"clusterName" validate:"checkname"`
	Namespace   string `json:"namespace" optional:"true"`
}

ClusterTarget kubernetes delivery target

type CompareLatestWithRunningOption added in v1.5.0

type CompareLatestWithRunningOption struct {
	Env string `json:"env" validate:"required"`
}

CompareLatestWithRunningOption means compare the latest configuration with the app in cluster.

type CompareRevisionWithLatestOption added in v1.5.0

type CompareRevisionWithLatestOption struct {
	// Revision, If not specified, means use the latest revision.
	Revision string `json:"revision" optional:"true"`
}

CompareRevisionWithLatestOption means compare the the specified version with the latest application configuration

type CompareRevisionWithRunningOption added in v1.5.0

type CompareRevisionWithRunningOption struct {
	// Revision, If not specified, means use the latest revision.
	Revision string `json:"revision" optional:"true"`
}

CompareRevisionWithRunningOption means compare the specified version with the application in cluster.

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"`
	Main          bool                          `json:"main"`
	Icon          string                        `json:"icon,omitempty"`
	DependsOn     []string                      `json:"dependsOn"`
	Creator       string                        `json:"creator,omitempty"`
	CreateTime    time.Time                     `json:"createTime"`
	UpdateTime    time.Time                     `json:"updateTime"`
	Inputs        common.StepInputs             `json:"inputs,omitempty"`
	Outputs       common.StepOutputs            `json:"outputs,omitempty"`
	Traits        []*ApplicationTrait           `json:"traits"`
	WorkloadType  common.WorkloadTypeDescriptor `json:"workloadType,omitempty"`
}

ComponentBase component base model

type ComponentListResponse

type ComponentListResponse struct {
	Components []*ComponentBase `json:"components"`
}

ComponentListResponse list component

type ComponentSelector

type ComponentSelector struct {
	Components []string `json:"components"`
}

ComponentSelector component selector

type Config

type Config struct {
	ConfigType        string                  `json:"configType"`
	ConfigTypeAlias   string                  `json:"configTypeAlias"`
	Name              string                  `json:"name"`
	Project           string                  `json:"project"`
	Identifier        string                  `json:"identifier"`
	Alias             string                  `json:"alias"`
	Description       string                  `json:"description"`
	CreatedTime       *time.Time              `json:"createdTime"`
	UpdatedTime       *time.Time              `json:"updatedTime"`
	ApplicationStatus common.ApplicationPhase `json:"applicationStatus"`
	Status            string                  `json:"status"`
}

Config define the metadata of a config

type ConfigType

type ConfigType struct {
	Definitions []string `json:"definitions"`
	Alias       string   `json:"alias"`
	Name        string   `json:"name"`
	Description string   `json:"description"`
}

ConfigType define the format for listing configuration types

type ConnectCloudClusterRequest

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

type CreateAddonRegistryRequest struct {
	Name   string                   `json:"name" validate:"checkname"`
	Helm   *addon.HelmSource        `json:"helm,omitempty"`
	Git    *addon.GitAddonSource    `json:"git,omitempty" `
	Oss    *addon.OSSAddonSource    `json:"oss,omitempty"`
	Gitee  *addon.GiteeAddonSource  `json:"gitee,omitempty" `
	Gitlab *addon.GitlabAddonSource `json:"gitlab,omitempty" `
}

CreateAddonRegistryRequest defines the format for addon registry create request

type CreateApplicationEnvbindingRequest

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

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 trait request

type CreateApplicationTriggerRequest

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

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

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

type CreateClusterNamespaceRequest struct {
	Namespace string `json:"namespace"`
}

CreateClusterNamespaceRequest request parameter to create namespace in cluster

type CreateClusterNamespaceResponse

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"`
	Inputs        common.StepInputs                `json:"inputs,omitempty" optional:"true"`
	Outputs       common.StepOutputs               `json:"outputs,omitempty" optional:"true"`
	Traits        []*CreateApplicationTraitRequest `json:"traits,omitempty" optional:"true"`
}

CreateComponentRequest create component request model

type CreateConfigRequest

type CreateConfigRequest struct {
	Name          string `json:"name" validate:"checkname"`
	Alias         string `json:"alias"`
	Description   string `json:"description"`
	Project       string `json:"project"`
	ComponentType string `json:"componentType" validate:"checkname"`
	Properties    string `json:"properties,omitempty"`
}

CreateConfigRequest is the request body to creates a config

type CreateEnvRequest

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

	// AllowTargetConflict means allow binding the targets that belong to other envs
	AllowTargetConflict bool `json:"allowTargetConflict,omitempty"  optional:"true"`
}

CreateEnvRequest contains the env data as request body

type CreatePermissionRequest

type CreatePermissionRequest struct {
	Name      string   `json:"name" validate:"checkname"`
	Alias     string   `json:"alias" validate:"checkalias"`
	Resources []string `json:"resources"`
	Actions   []string `json:"actions"`
	Effect    string   `json:"effect" validate:"oneof=Allow Deny"`
}

CreatePermissionRequest the request body that creating a permission policy

type CreatePolicyRequest

type CreatePolicyRequest struct {
	// Name is the unique name of the policy.
	Name        string `json:"name" validate:"checkname"`
	Alias       string `json:"alias"`
	EnvName     string `json:"envName"`
	Description string `json:"description"`
	Type        string `json:"type" validate:"checkname"`
	// Properties json data
	Properties string `json:"properties"`

	// Bind this policy to workflow
	WorkflowPolicyBindings []WorkflowPolicyBinding `json:"workflowPolicyBind"`
}

CreatePolicyRequest create app policy

type CreateProjectRequest

type CreateProjectRequest struct {
	Name        string `json:"name" validate:"checkname"`
	Alias       string `json:"alias" validate:"checkalias" optional:"true"`
	Description string `json:"description" optional:"true"`
	Owner       string `json:"owner" optional:"true"`
}

CreateProjectRequest create project request body

type CreateRoleRequest

type CreateRoleRequest struct {
	Name        string   `json:"name" validate:"checkname"`
	Alias       string   `json:"alias" validate:"checkalias"`
	Permissions []string `json:"permissions"`
}

CreateRoleRequest the request body that create a role

type CreateTargetRequest

type CreateTargetRequest struct {
	Name        string                 `json:"name" validate:"checkname"`
	Alias       string                 `json:"alias,omitempty" validate:"checkalias" optional:"true"`
	Project     string                 `json:"project" validate:"checkname"`
	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 CreateUserRequest

type CreateUserRequest struct {
	Name     string   `json:"name" validate:"checkname"`
	Alias    string   `json:"alias,omitempty" validate:"checkalias" optional:"true"`
	Email    string   `json:"email" validate:"checkemail"`
	Password string   `json:"password" validate:"checkpassword"`
	Roles    []string `json:"roles"`
}

CreateUserRequest create user request

type CreateWorkflowRequest

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

type DefinitionBase struct {
	Name        string            `json:"name"`
	Alias       string            `json:"alias"`
	Description string            `json:"description"`
	Icon        string            `json:"icon"`
	Status      string            `json:"status"`
	Labels      map[string]string `json:"labels"`
	// WorkloadType the component workload type
	// Deprecated: it same as component.workload.type
	WorkloadType string `json:"workloadType,omitempty"`
	// OwnerAddon indicates which addon created this definition
	OwnerAddon   string                              `json:"ownerAddon"`
	Trait        *v1beta1.TraitDefinitionSpec        `json:"trait,omitempty"`
	Component    *v1beta1.ComponentDefinitionSpec    `json:"component,omitempty"`
	Policy       *v1beta1.PolicyDefinitionSpec       `json:"policy,omitempty"`
	WorkflowStep *v1beta1.WorkflowStepDefinitionSpec `json:"workflowStep,omitempty"`
}

DefinitionBase is the definition base model

type DetailAddonResponse

type DetailAddonResponse struct {
	addon.Meta

	APISchema *openapi3.Schema `json:"schema"`
	UISchema  utils.UISchema   `json:"uiSchema"`

	// More details about the addon, e.g. README
	Detail            string             `json:"detail,omitempty"`
	Definitions       []*AddonDefinition `json:"definitions"`
	RegistryName      string             `json:"registryName,omitempty"`
	AvailableVersions []string           `json:"availableVersions"`
}

DetailAddonResponse defines the format for showing the addon details

type DetailApplicationResponse

type DetailApplicationResponse struct {
	ApplicationBase
	Policies     []string                `json:"policies"`
	EnvBindings  []string                `json:"envBindings"`
	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

type DetailComponentResponse struct {
	model.ApplicationComponent
	Definition v1beta1.ComponentDefinitionSpec `json:"definition"`
}

DetailComponentResponse detail component response body

type DetailDefinitionResponse

type DetailDefinitionResponse struct {
	DefinitionBase
	APISchema *openapi3.Schema `json:"schema"`
	UISchema  utils.UISchema   `json:"uiSchema"`
}

DetailDefinitionResponse get definition detail

type DetailEnvBindingResponse

type DetailEnvBindingResponse struct {
	EnvBindingBase
}

DetailEnvBindingResponse defines the response of env-binding details

type DetailPolicyResponse

type DetailPolicyResponse struct {
	PolicyBase
	// Binding relationShip
	WorkflowPolicyBindings []WorkflowPolicyBinding `json:"workflowPolicyBind,omitempty"`
}

DetailPolicyResponse app policy detail model

type DetailRevisionResponse

type DetailRevisionResponse struct {
	model.ApplicationRevision
	DeployUser NameAlias `json:"deployUser,omitempty"`
}

DetailRevisionResponse get application revision detail

type DetailTargetResponse

type DetailTargetResponse struct {
	TargetBase
}

DetailTargetResponse detail Target response

type DetailUserResponse

type DetailUserResponse struct {
	UserBase
	Projects []*ProjectBase `json:"projects"`
	Roles    []NameAlias    `json:"roles"`
}

DetailUserResponse is the response of user detail

type DetailWorkflowRecordResponse

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

type DetailWorkflowResponse struct {
	WorkflowBase
}

DetailWorkflowResponse detail workflow response

type DexConfigResponse

type DexConfigResponse struct {
	ClientID     string `json:"clientID"`
	ClientSecret string `json:"clientSecret"`
	RedirectURL  string `json:"redirectURL"`
	Issuer       string `json:"issuer"`
}

DexConfigResponse is the response of dex config

type DockerHubData

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

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

type EmptyResponse struct{}

EmptyResponse empty response, it will used for delete api

type EnableAddonRequest

type EnableAddonRequest struct {
	// Args is the key-value environment variables, e.g. AK/SK credentials.
	Args map[string]interface{} `json:"args,omitempty"`
	// Clusters specify the clusters this addon should be installed, if not specified, it will follow the configure in addon metadata.yaml
	Clusters []string `json:"clusters,omitempty"`
	// Version specify the version of addon to enable
	Version string `json:"version,omitempty"`
}

EnableAddonRequest defines the format for enable addon request

type EnablingProgress

type EnablingProgress struct {
	EnabledComponents int `json:"enabled_components"`
	TotalComponents   int `json:"total_components"`
}

EnablingProgress defines the progress of enabling an addon

type Env

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

type EnvBinding struct {
	Name string `json:"name" validate:"checkname"`
}

EnvBinding application env binding

type EnvBindingBase

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

type EnvBindingList []*EnvBinding

EnvBindingList env binding list

type EnvBindingTarget

type EnvBindingTarget struct {
	NameAlias
	Cluster *ClusterTarget `json:"cluster,omitempty"`
}

EnvBindingTarget the target struct in the envbinding base struct

type EventData

type EventData struct {
	Resources  []Resources `json:"resources"`
	Repository Repository  `json:"repository"`
}

EventData is the event info of harbor

type GetLoginTypeResponse

type GetLoginTypeResponse struct {
	LoginType string `json:"loginType"`
}

GetLoginTypeResponse get login type response

type HandleApplicationHarborReq

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

type HandleApplicationTriggerACRRequest struct {
	PushData   ACRPushData   `json:"push_data"`
	Repository ACRRepository `json:"repository"`
}

HandleApplicationTriggerACRRequest handles application trigger ACR request

type HandleApplicationTriggerDockerHubRequest

type HandleApplicationTriggerDockerHubRequest struct {
	CallbackURL string              `json:"callback_url"`
	PushData    DockerHubData       `json:"push_data"`
	Repository  DockerHubRepository `json:"repository"`
}

HandleApplicationTriggerDockerHubRequest application trigger DockerHub webhook request

type HandleApplicationTriggerJFrogRequest

type HandleApplicationTriggerJFrogRequest struct {
	Domain    string           `json:"domain"`
	EventType string           `json:"event_type"`
	Data      JFrogWebhookData `json:"data"`
}

HandleApplicationTriggerJFrogRequest application trigger JFrog webhook request

type HandleApplicationTriggerWebhookRequest

type HandleApplicationTriggerWebhookRequest struct {
	Upgrade  map[string]*model.JSONStruct `json:"upgrade,omitempty"`
	CodeInfo *model.CodeInfo              `json:"codeInfo,omitempty"`
}

HandleApplicationTriggerWebhookRequest handles application trigger webhook request

type ImageInfo added in v1.4.3

type ImageInfo struct {
	Name        string                 `json:"name"`
	SecretNames []string               `json:"secretNames"`
	Registry    string                 `json:"registry"`
	Message     string                 `json:"message,omitempty"`
	Info        *registryv1.ConfigFile `json:"info,omitempty"`
	Size        int64                  `json:"size"`
	Manifest    *registryv1.Manifest   `json:"manifest"`
}

ImageInfo the docker image info

type ImageRegistry added in v1.4.3

type ImageRegistry struct {
	Name       string `json:"name"`
	SecretName string `json:"secretName"`
	Domain     string `json:"domain"`
}

ImageRegistry the image repository info

type ImageResponse

type ImageResponse struct {
	Existed bool   `json:"existed"`
	Secret  string `json:"secret"`
}

ImageResponse is the response for checking image

type JFrogWebhookData

type JFrogWebhookData struct {
	URL       string
	ImageName string `json:"image_name"`
	Name      string `json:"name"`
	Path      string `json:"path"`
	RepoKey   string `json:"repo_key"`
	Digest    string `json:"sha256"`
	Tag       string `json:"tag"`
}

JFrogWebhookData is the data of JFrog webhook request

type ListAddonRegistryResponse

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

type ListApplicationComponentOptions struct {
	EnvName string `json:"envName"`
}

ListApplicationComponentOptions list app component list

type ListApplicationEnvBinding

type ListApplicationEnvBinding struct {
	EnvBindings []*EnvBindingBase `json:"envBindings"`
}

ListApplicationEnvBinding list app envBindings

type ListApplicationOptions

type ListApplicationOptions struct {
	Projects   []string `json:"projects"`
	Env        string   `json:"env"`
	TargetName string   `json:"targetName"`
	Query      string   `json:"query"`
}

ListApplicationOptions list application query options

type ListApplicationPolicy

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

type ListApplicationTriggerResponse struct {
	Triggers []*ApplicationTriggerBase `json:"triggers"`
}

ListApplicationTriggerResponse list application triggers response body

type ListCloudClusterCreationResponse

type ListCloudClusterCreationResponse struct {
	Creations []CreateCloudClusterResponse `json:"creations"`
}

ListCloudClusterCreationResponse return the cluster names of creation process of cloud clusters

type ListCloudClusterResponse

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

type ListDefinitionResponse struct {
	Definitions []*DefinitionBase `json:"definitions"`
}

ListDefinitionResponse list definition response model

type ListEnabledAddonResponse

type ListEnabledAddonResponse struct {
	EnabledAddons []*AddonBaseStatus `json:"enabledAddons"`
}

ListEnabledAddonResponse defines the format for enabled addon list response

type ListEnvOptions

type ListEnvOptions struct {
	Project string `json:"project"`
}

ListEnvOptions list envs by query options

type ListEnvResponse

type ListEnvResponse struct {
	Envs  []*Env `json:"envs"`
	Total int64  `json:"total"`
}

ListEnvResponse response the while env list

type ListImageRegistryResponse added in v1.4.3

type ListImageRegistryResponse struct {
	Registries []ImageRegistry `json:"registries"`
}

ListImageRegistryResponse the response struct of listing the image registries

type ListPolicyDefinitionResponse

type ListPolicyDefinitionResponse struct {
	PolicyDefinitions []PolicyDefinition `json:"policyDefinitions"`
}

ListPolicyDefinitionResponse list available

type ListProjectResponse

type ListProjectResponse struct {
	Projects []*ProjectBase `json:"projects"`
	Total    int64          `json:"total"`
}

ListProjectResponse list project response body

type ListProjectUsersResponse

type ListProjectUsersResponse struct {
	Users []*ProjectUserBase `json:"users"`
	Total int64              `json:"total"`
}

ListProjectUsersResponse the response body that list users belong to a project

type ListRevisionsResponse

type ListRevisionsResponse struct {
	Revisions []ApplicationRevisionBase `json:"revisions"`
	Total     int64                     `json:"total"`
}

ListRevisionsResponse list application revisions

type ListRolesResponse

type ListRolesResponse struct {
	Total int64       `json:"total"`
	Roles []*RoleBase `json:"roles"`
}

ListRolesResponse the response body of list roles

type ListTargetResponse

type ListTargetResponse struct {
	Targets []TargetBase `json:"targets"`
	Total   int64        `json:"total"`
}

ListTargetResponse list delivery target response body

type ListUserOptions

type ListUserOptions struct {
	Name  string `json:"name"`
	Email string `json:"email"`
	Alias string `json:"alias"`
}

ListUserOptions list user options

type ListUserResponse

type ListUserResponse struct {
	Users []*DetailUserResponse `json:"users"`
	Total int64                 `json:"total"`
}

ListUserResponse list user response

type ListWorkflowRecordsResponse

type ListWorkflowRecordsResponse struct {
	Records []WorkflowRecord `json:"records"`
	Total   int64            `json:"total"`
}

ListWorkflowRecordsResponse list workflow execution record

type ListWorkflowResponse

type ListWorkflowResponse struct {
	Workflows []*WorkflowBase `json:"workflows"`
}

ListWorkflowResponse list application workflows

type LoginRequest

type LoginRequest struct {
	Code     string `json:"code,omitempty" optional:"true"`
	Username string `json:"username,omitempty" optional:"true"`
	Password string `json:"password,omitempty" optional:"true"`
}

LoginRequest is the request body for login

type LoginResponse

type LoginResponse struct {
	User         *UserBase `json:"user"`
	AccessToken  string    `json:"accessToken"`
	RefreshToken string    `json:"refreshToken"`
}

LoginResponse is the response of login request

type LoginUserInfoResponse

type LoginUserInfoResponse struct {
	UserBase
	Projects            []*ProjectBase              `json:"projects"`
	PlatformPermissions []PermissionBase            `json:"platformPermissions"`
	ProjectPermissions  map[string][]PermissionBase `json:"projectPermissions"`
}

LoginUserInfoResponse the response body of login user info

type NameAlias

type NameAlias struct {
	Name  string `json:"name"`
	Alias string `json:"alias"`
}

NameAlias name and alias

type PermissionBase

type PermissionBase struct {
	Name       string    `json:"name"`
	Alias      string    `json:"alias"`
	Resources  []string  `json:"resources"`
	Actions    []string  `json:"actions"`
	Effect     string    `json:"effect"`
	CreateTime time.Time `json:"createTime"`
	UpdateTime time.Time `json:"updateTime"`
}

PermissionBase the perm policy base struct

type PermissionTemplateBase

type PermissionTemplateBase struct {
	Name       string    `json:"name"`
	Alias      string    `json:"alias"`
	Resources  []string  `json:"resources"`
	Actions    []string  `json:"actions"`
	Effect     string    `json:"effect"`
	CreateTime time.Time `json:"createTime"`
	UpdateTime time.Time `json:"updateTime"`
}

PermissionTemplateBase the perm policy template base struct

type PolicyBase

type PolicyBase struct {
	// Name is the unique name of the policy.
	Name        string `json:"name"`
	Alias       string `json:"alias"`
	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"`
	EnvName    string            `json:"envName"`
}

PolicyBase application policy base info

type PolicyDefinition

type PolicyDefinition struct {
	Name        string            `json:"name"`
	Description string            `json:"description"`
	Parameters  []types.Parameter `json:"parameters"`
}

PolicyDefinition application policy definition

type ProjectBase

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"`
	Owner       NameAlias `json:"owner,omitempty"`
}

ProjectBase project base model

type ProjectUserBase

type ProjectUserBase struct {
	UserName   string    `json:"name"`
	UserAlias  string    `json:"alias"`
	UserRoles  []string  `json:"userRoles"`
	CreateTime time.Time `json:"createTime"`
	UpdateTime time.Time `json:"updateTime"`
}

ProjectUserBase project user base

type PutApplicationEnvBindingRequest

type PutApplicationEnvBindingRequest struct {
}

PutApplicationEnvBindingRequest update app envbinding request body

type RefreshTokenResponse

type RefreshTokenResponse struct {
	AccessToken  string `json:"accessToken"`
	RefreshToken string `json:"refreshToken"`
}

RefreshTokenResponse is the response of refresh token request

type Repository

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

type Resources struct {
	Digest      string `json:"digest"`
	Tag         string `json:"tag"`
	ResourceURL string `json:"resource_url"`
}

Resources is the image info of harbor

type RoleBase

type RoleBase struct {
	CreateTime  time.Time   `json:"createTime"`
	UpdateTime  time.Time   `json:"updateTime"`
	Name        string      `json:"name"`
	Alias       string      `json:"alias,omitempty"`
	Permissions []NameAlias `json:"permissions"`
}

RoleBase the base struct of role

type SimpleResponse

type SimpleResponse struct {
	Status string `json:"status"`
}

SimpleResponse simple response model for temporary

type StatisticInfo

type StatisticInfo struct {
	ClusterCount               string            `json:"clusterCount,omitempty"`
	AppCount                   string            `json:"appCount,omitempty"`
	EnableAddonList            map[string]string `json:"enableAddonList,omitempty"`
	ComponentDefinitionTopList []string          `json:"componentDefinitionTopList,omitempty"`
	TraitDefinitionTopList     []string          `json:"traitDefinitionTopList,omitempty"`
	WorkflowDefinitionTopList  []string          `json:"workflowDefinitionTopList,omitempty"`
	PolicyDefinitionTopList    []string          `json:"policyDefinitionTopList,omitempty"`
	UpdateTime                 time.Time         `json:"updateTime,omitempty"`
}

StatisticInfo generated by cronJob running in backend

type SystemInfo

type SystemInfo struct {
	PlatformID             string             `json:"platformID"`
	EnableCollection       bool               `json:"enableCollection"`
	LoginType              string             `json:"loginType" validate:"oneof=dex local"`
	InstallTime            time.Time          `json:"installTime,omitempty"`
	DexUserDefaultProjects []model.ProjectRef `json:"dexUserDefaultProjects,omitempty"`
}

SystemInfo system info

type SystemInfoRequest

type SystemInfoRequest struct {
	EnableCollection       bool               `json:"enableCollection"`
	LoginType              string             `json:"loginType"`
	VelaAddress            string             `json:"velaAddress,omitempty"`
	DexUserDefaultProjects []model.ProjectRef `json:"dexUserDefaultProjects,omitempty"`
}

SystemInfoRequest request by update SystemInfo

type SystemInfoResponse

type SystemInfoResponse struct {
	SystemInfo
	SystemVersion SystemVersion `json:"systemVersion"`
	StatisticInfo StatisticInfo `json:"statisticInfo,omitempty"`
}

SystemInfoResponse get SystemInfo

type SystemVersion

type SystemVersion struct {
	VelaVersion string `json:"velaVersion"`
	GitVersion  string `json:"gitVersion"`
}

SystemVersion contains KubeVela version

type TargetBase

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"`
	Project      NameAlias              `json:"project"`
}

TargetBase Target base model

type UpdateAddonRegistryRequest

type UpdateAddonRegistryRequest struct {
	Helm   *addon.HelmSource        `json:"helm,omitempty"`
	Git    *addon.GitAddonSource    `json:"git,omitempty"`
	Oss    *addon.OSSAddonSource    `json:"oss,omitempty"`
	Gitee  *addon.GiteeAddonSource  `json:"gitee,omitempty" `
	Gitlab *addon.GitlabAddonSource `json:"gitlab,omitempty" `
}

UpdateAddonRegistryRequest defines the format for addon registry update request

type UpdateApplicationComponentRequest

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

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

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 UpdateDefinitionStatusRequest

type UpdateDefinitionStatusRequest struct {
	DefinitionType string `json:"type"`
	HiddenInUI     bool   `json:"hiddenInUI"`
}

UpdateDefinitionStatusRequest the request body struct about updated definition Only support set the status of definition

type UpdateEnvRequest

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 UpdatePermissionRequest

type UpdatePermissionRequest struct {
	Alias     string   `json:"alias" validate:"checkalias"`
	Resources []string `json:"resources"`
	Actions   []string `json:"actions"`
	Effect    string   `json:"effect" validate:"oneof=Allow Deny"`
}

UpdatePermissionRequest the request body that updating a permission policy

type UpdatePolicyRequest

type UpdatePolicyRequest struct {
	Alias       string `json:"alias"`
	EnvName     string `json:"envName"`
	Description string `json:"description"`
	Type        string `json:"type" validate:"checkname"`
	// Properties json data
	Properties string `json:"properties"`

	// Bind this policy to workflow
	WorkflowPolicyBindings []WorkflowPolicyBinding `json:"workflowPolicyBind"`
}

UpdatePolicyRequest update policy

type UpdateProjectRequest

type UpdateProjectRequest struct {
	Alias       string `json:"alias" validate:"checkalias" optional:"true"`
	Description string `json:"description" optional:"true"`
	Owner       string `json:"owner" optional:"true"`
}

UpdateProjectRequest update a project request body

type UpdateProjectUserRequest

type UpdateProjectUserRequest struct {
	UserRoles []string `json:"userRoles"`
}

UpdateProjectUserRequest the request body that update user role in a project

type UpdateRoleRequest

type UpdateRoleRequest struct {
	Alias       string   `json:"alias" validate:"checkalias"`
	Permissions []string `json:"permissions"`
}

UpdateRoleRequest the request body that update a role

type UpdateTargetRequest

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 UpdateUISchemaRequest

type UpdateUISchemaRequest struct {
	DefinitionType string         `json:"type"`
	UISchema       utils.UISchema `json:"uiSchema"`
}

UpdateUISchemaRequest the request body struct about updated ui schema

type UpdateUserRequest

type UpdateUserRequest struct {
	Alias    string    `json:"alias,omitempty" optional:"true"`
	Password string    `json:"password,omitempty" validate:"checkpassword" optional:"true"`
	Email    string    `json:"email,omitempty" validate:"checkemail" optional:"true"`
	Roles    *[]string `json:"roles"`
}

UpdateUserRequest update user request

type UpdateWorkflowRequest

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 UserBase

type UserBase struct {
	CreateTime    time.Time `json:"createTime"`
	LastLoginTime time.Time `json:"lastLoginTime"`
	Name          string    `json:"name"`
	Email         string    `json:"email"`
	Alias         string    `json:"alias,omitempty"`
	Disabled      bool      `json:"disabled"`
}

UserBase is the base info of user

type VelaQLViewResponse

type VelaQLViewResponse map[string]interface{}

VelaQLViewResponse query response

type WorkflowBase

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 WorkflowPolicyBinding added in v1.5.0

type WorkflowPolicyBinding struct {
	Name  string   `json:"name"`
	Steps []string `json:"steps"`
}

WorkflowPolicyBinding define the relation binding relationShip between policy and workflowStep

type WorkflowRecord

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

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

Jump to

Keyboard shortcuts

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