v1

package
v1.8.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: Apache-2.0 Imports: 16 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 the workflow
	CtxKeyWorkflow = "workflow"
	// CtxKeyWorkflowRecord request context key of the workflow record
	CtxKeyWorkflowRecord = "workflow-record"
	// 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"
	// CtxKeyProject request context key of project
	CtxKeyProject = "project"
	// CtxKeyToken request context key of request token
	CtxKeyToken = "token"
	// CtxKeyPipeline request context key of pipeline
	CtxKeyPipeline = "pipeline"
	// CtxKeyPipelineContext request context key of pipeline context
	CtxKeyPipelineContext = "pipeline-context"
	// CtxKeyPipelineRun request context key of pipeline run
	CtxKeyPipelineRun = "pipeline-run"
)

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 `json:",inline"`
	WorkflowRecord          WorkflowRecordBase `json:"record"`
}

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"`
	// TriggerType the event trigger source, Web or API or Webhook
	TriggerType string `json:"triggerType"`
	// WorkflowName deploy controller by workflow
	WorkflowName string `json:"workflowName"`
	// 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 ApplicationRollbackResponse

type ApplicationRollbackResponse struct {
	WorkflowRecord WorkflowRecordBase `json:"record"`
}

ApplicationRollbackResponse the response body that rollback with the revision

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"`
	Registry      string    `json:"registry"`
	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

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

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

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

type CompareRevisionWithLatestOption

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

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        workflowv1alpha1.StepInputs   `json:"inputs,omitempty"`
	Outputs       workflowv1alpha1.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 {
	Template    config.NamespacedName         `json:"template"`
	Name        string                        `json:"name"`
	Namespace   string                        `json:"namespace"`
	Sensitive   bool                          `json:"sensitive"`
	Project     string                        `json:"project"`
	Alias       string                        `json:"alias"`
	Description string                        `json:"description"`
	CreatedTime *time.Time                    `json:"createdTime"`
	Properties  map[string]interface{}        `json:"properties,omitempty"`
	Shared      bool                          `json:"shared"`
	Secret      *corev1.Secret                `json:"-"`
	Targets     []*config.ClusterTargetStatus `json:"targets"`
}

Config define the metadata of a config

type ConfigTemplate

type ConfigTemplate struct {
	Alias       string    `json:"alias"`
	Name        string    `json:"name"`
	Namespace   string    `json:"namespace"`
	Description string    `json:"description"`
	Scope       string    `json:"scope"`
	Sensitive   bool      `json:"sensitive"`
	CreateTime  time.Time `json:"createTime"`
}

ConfigTemplate define the format for listing configuration types

type ConfigTemplateDetail

type ConfigTemplateDetail struct {
	ConfigTemplate
	APISchema *openapi3.Schema `json:"schema"`
	UISchema  schema.UISchema  `json:"uiSchema"`
}

ConfigTemplateDetail define the format for detail the config template

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 Context

type Context struct {
	Name   string        `json:"name"`
	Values []model.Value `json:"values"`
}

Context is an internal struct for the context

type ContextNameResponse

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

ContextNameResponse is the response body of getting context name

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

CreateComponentRequest create component request model

type CreateConfigDistributionRequest

type CreateConfigDistributionRequest struct {
	Name    string            `json:"name"`
	Configs []*NamespacedName `json:"configs"`
	Targets []*ClusterTarget  `json:"targets"`
}

CreateConfigDistributionRequest the request body of applying the distribution job.

type CreateConfigRequest

type CreateConfigRequest struct {
	Name        string         `json:"name" validate:"checkname"`
	Alias       string         `json:"alias"`
	Description string         `json:"description"`
	Template    NamespacedName `json:"template"`
	Properties  string         `json:"properties,omitempty"`
}

CreateConfigRequest is the request body to creates a config

type CreateContextValuesRequest

type CreateContextValuesRequest struct {
	Name   string        `json:"name"`
	Values []model.Value `json:"values"`
}

CreateContextValuesRequest is the request body of creating context values

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 CreatePipelineRequest

type CreatePipelineRequest struct {
	Name        string             `json:"name" validate:"checkname"`
	Alias       string             `json:"alias" validate:"checkalias" optional:"true"`
	Description string             `json:"description" optional:"true"`
	Spec        model.WorkflowSpec `json:"spec"`
}

CreatePipelineRequest is the request body of creating pipeline

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"`
	// the namespace to save the pipelines belong to this project.
	Namespace string `json:"namespace" 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"`
	Mode        string         `json:"mode" validate:"oneof=DAG StepByStep"`
	SubMode     string         `json:"subMode" validate:"oneof=DAG StepByStep"`
	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  schema.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  schema.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"`
	// RegistryName specify the registry name
	RegistryName string `json:"registryName,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"`
	Workflow           NameAlias          `json:"workflow"`
}

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 GetPipelineResponse

type GetPipelineResponse struct {
	PipelineBase `json:",inline"`
	PipelineInfo `json:"info"`
}

GetPipelineResponse is the response body of getting pipeline

type GetPipelineRunInputResponse

type GetPipelineRunInputResponse struct {
	StepInputs []StepInputBase `json:"inputs"`
}

GetPipelineRunInputResponse is the response body of getting pipeline run input

type GetPipelineRunLogResponse

type GetPipelineRunLogResponse struct {
	StepBase  `json:",inline"`
	LogSource string `json:"source"`
	Log       string `json:"log"`
}

GetPipelineRunLogResponse is the response body of getting pipeline run log

type GetPipelineRunOutputResponse

type GetPipelineRunOutputResponse struct {
	StepOutputs []StepOutputBase `json:"outputs"`
}

GetPipelineRunOutputResponse is the response body of getting pipeline run output

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

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

type ImageRegistry struct {
	Name       string         `json:"name"`
	SecretName string         `json:"secretName"`
	Domain     string         `json:"domain"`
	Secret     *corev1.Secret `json:"-"`
}

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 InputVar

type InputVar struct {
	From         string `json:"from"`
	FromStep     string `json:"fromStep"`
	ParameterKey string `json:"parameterKey"`
	Value        string `json:"value"`
}

InputVar is one input var

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 ListConfigDistributionResponse

type ListConfigDistributionResponse struct {
	Distributions []*config.Distribution `json:"distributions"`
}

ListConfigDistributionResponse is the response body for listing the distribution

type ListConfigResponse

type ListConfigResponse struct {
	Configs []*Config `json:"configs"`
}

ListConfigResponse is the response body for listing the configs

type ListConfigTemplateResponse

type ListConfigTemplateResponse struct {
	Templates []*ConfigTemplate `json:"templates"`
}

ListConfigTemplateResponse is the response body for listing the config templates

type ListContextValueResponse

type ListContextValueResponse struct {
	Total    int                      `json:"total"`
	Contexts map[string][]model.Value `json:"contexts"`
}

ListContextValueResponse is the response body of listing context values

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

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

ListImageRegistryResponse the response struct of listing the image registries

type ListPipelineRequest

type ListPipelineRequest struct {
	Projects []string `json:"projects" optional:"true"`
	Query    string   `json:"query" optional:"true"`
	Detailed bool     `json:"detailed" optional:"true"`
}

ListPipelineRequest is the request body of listing pipeline

type ListPipelineResponse

type ListPipelineResponse struct {
	Total     int                `json:"total"`
	Pipelines []PipelineListItem `json:"pipelines"`
}

ListPipelineResponse is the response body of listing pipeline

type ListPipelineRunResponse

type ListPipelineRunResponse struct {
	Total int64                 `json:"total"`
	Runs  []PipelineRunBriefing `json:"runs"`
}

ListPipelineRunResponse is the response body of listing pipeline run

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 ListTerraformProviderResponse

type ListTerraformProviderResponse struct {
	Providers []*TerraformProvider `json:"providers"`
}

ListTerraformProviderResponse is the response body for listing the terraform provider

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 NamespacedName

type NamespacedName struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace" optional:"true"`
}

NamespacedName the name is required and the namespace is optional

type OutputVar

type OutputVar struct {
	Name      string `json:"name"`
	Value     string `json:"value"`
	ValueFrom string `json:"valueFrom"`
}

OutputVar is one output var

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 PipelineBase

type PipelineBase struct {
	PipelineMeta `json:",inline"`
	Spec         model.WorkflowSpec `json:"spec"`
}

PipelineBase is the base info of pipeline

type PipelineInfo

type PipelineInfo struct {
	LastRun *PipelineRun `json:"lastRun"`
	RunStat RunStat      `json:"runStat"`
}

PipelineInfo is the info of pipeline

type PipelineListItem

type PipelineListItem struct {
	PipelineMeta `json:",inline"`
	Info         PipelineInfo `json:"info"`
}

PipelineListItem is the item of pipeline list

type PipelineMeta

type PipelineMeta struct {
	Name        string    `json:"name"`
	Alias       string    `json:"alias"`
	Project     NameAlias `json:"project"`
	Description string    `json:"description"`
	CreateTime  time.Time `json:"createTime"`
}

PipelineMeta is metadata of pipeline

type PipelineMetaResponse

type PipelineMetaResponse struct {
	PipelineMeta `json:",inline"`
}

PipelineMetaResponse is the response body contains PipelineMeta

type PipelineRun

type PipelineRun struct {
	PipelineRunBase `json:",inline"`
	Status          workflowv1alpha1.WorkflowRunStatus `json:"status"`
}

PipelineRun is the info of pipeline run

type PipelineRunBase

type PipelineRunBase struct {
	PipelineRunMeta `json:",inline"`
	// Record marks the run of the pipeline
	Record        int64                            `json:"record"`
	ContextName   string                           `json:"contextName"`
	ContextValues []model.Value                    `json:"contextValues"`
	Spec          workflowv1alpha1.WorkflowRunSpec `json:"spec"`
}

PipelineRunBase is the base info of pipeline run

type PipelineRunBriefing

type PipelineRunBriefing struct {
	PipelineRunName string                            `json:"pipelineRunName"`
	Finished        bool                              `json:"finished"`
	Phase           workflowv1alpha1.WorkflowRunPhase `json:"phase"`
	Message         string                            `json:"message"`
	StartTime       metav1.Time                       `json:"startTime"`
	EndTime         metav1.Time                       `json:"endTime"`
	ContextName     string                            `json:"contextName"`
	ContextValues   []model.Value                     `json:"contextValues"`
}

PipelineRunBriefing is the brief info of the pipeline run, contains run name and brief status

type PipelineRunMeta

type PipelineRunMeta struct {
	PipelineName    string    `json:"pipelineName"`
	Project         NameAlias `json:"project"`
	PipelineRunName string    `json:"pipelineRunName"`
}

PipelineRunMeta is the metadata of pipeline run

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"`
	Namespace   string    `json:"namespace"`
}

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 Properties

type Properties map[string]interface{}

Properties unmarshal object or string

func (*Properties) UnmarshalJSON

func (p *Properties) UnmarshalJSON(src []byte) error

UnmarshalJSON support to unmarshal the string and struct

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 RunPipelineRequest

type RunPipelineRequest struct {
	// Mode is the mode of the pipeline run. Available values are: "StepByStep", "DAG" for both `step` and `subStep`
	// default: "StepByStep" for `step`, "DAG" for `subStep`
	Mode        workflowv1alpha1.WorkflowExecuteMode `json:"mode" optional:"true"`
	ContextName string                               `json:"contextName"`
}

RunPipelineRequest is the request body of running pipeline

type RunStat

type RunStat struct {
	ActiveNum int           `json:"activeNum"`
	Total     RunStatInfo   `json:"total"`
	Week      []RunStatInfo `json:"week"`
}

RunStat is the statistics of the pipeline in seven days

type RunStatInfo

type RunStatInfo struct {
	Total   int `json:"total"`
	Success int `json:"success"`
	Fail    int `json:"fail"`
}

RunStatInfo is the pipeline run statistics info

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 StepBase

type StepBase struct {
	ID    string `json:"id"`
	Name  string `json:"name"`
	Type  string `json:"type"`
	Phase string `json:"phase"`
}

StepBase is the base info of step

type StepInputBase

type StepInputBase struct {
	StepBase `json:",inline"`
	Values   []InputVar `json:"values"`
}

StepInputBase is the input of step

type StepOutputBase

type StepOutputBase struct {
	StepBase `json:",inline"`
	Values   []OutputVar `json:"values"`
}

StepOutputBase is the output of step

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"`
	DexUserDefaultPlatformRoles []string           `json:"dexUserDefaultPlatformRoles,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 TerraformProvider

type TerraformProvider struct {
	Name       string    `json:"name"`
	Region     string    `json:"region"`
	Provider   string    `json:"provider"`
	CreateTime time.Time `json:"createTime"`
}

TerraformProvider define the metadata of a terraform provider

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 UpdateApplicationTriggerRequest

type UpdateApplicationTriggerRequest struct {
	Alias         string `json:"alias" validate:"checkalias" optional:"true"`
	Description   string `json:"description" optional:"true"`
	WorkflowName  string `json:"workflowName"`
	PayloadType   string `json:"payloadType" validate:"checkpayloadtype"`
	ComponentName string `json:"componentName,omitempty" optional:"true"`
	Registry      string `json:"registry,omitempty" optional:"true"`
}

UpdateApplicationTriggerRequest update application trigger

type UpdateConfigRequest

type UpdateConfigRequest struct {
	Alias       string `json:"alias"`
	Description string `json:"description"`
	Properties  string `json:"properties,omitempty"`
}

UpdateConfigRequest is the request body to update a config

type UpdateContextValuesRequest

type UpdateContextValuesRequest struct {
	Values []model.Value `json:"values"`
}

UpdateContextValuesRequest is the request body of updating context values

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 UpdatePipelineRequest

type UpdatePipelineRequest struct {
	Alias       string             `json:"alias" validate:"checkalias" optional:"true"`
	Description string             `json:"description" optional:"true"`
	Spec        model.WorkflowSpec `json:"spec" optional:"true"`
}

UpdatePipelineRequest is the request body of updating pipeline

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       schema.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"`
	Mode        string         `json:"mode" validate:"oneof=DAG StepByStep"`
	SubMode     string         `json:"subMode" validate:"oneof=DAG StepByStep"`
	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"`
	Mode        string         `json:"mode"`
	SubMode     string         `json:"subMode"`
	Steps       []WorkflowStep `json:"steps,omitempty"`
}

WorkflowBase workflow base model

type WorkflowPolicyBinding

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 {
	WorkflowRecordBase `json:",inline"`
	Steps              []model.WorkflowStepStatus `json:"steps,omitempty"`
}

WorkflowRecord workflow record

type WorkflowRecordBase

type WorkflowRecordBase 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"`
	EndTime             time.Time `json:"endTime,omitempty"`
	Status              string    `json:"status"`
	Message             string    `json:"message"`
	Mode                string    `json:"mode"`
}

WorkflowRecordBase workflow record base struct

type WorkflowStep

type WorkflowStep struct {
	WorkflowStepBase `json:",inline"`
	SubSteps         []WorkflowStepBase `json:"subSteps,omitempty"`
}

WorkflowStep workflow step config

type WorkflowStepBase

type WorkflowStepBase 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  Properties                         `json:"properties,omitempty"`
	Meta        *workflowv1alpha1.WorkflowStepMeta `json:"meta,omitempty" optional:"true"`
	If          string                             `json:"if,omitempty" optional:"true"`
	Timeout     string                             `json:"timeout,omitempty" optional:"true"`
	Inputs      workflowv1alpha1.StepInputs        `json:"inputs,omitempty" optional:"true"`
	Outputs     workflowv1alpha1.StepOutputs       `json:"outputs,omitempty" optional:"true"`
}

WorkflowStepBase is the step base of workflow

Jump to

Keyboard shortcuts

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