v1

package
Version: v1.3.5 Latest Latest
Warning

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

Go to latest
Published: May 20, 2022 License: Apache-2.0 Imports: 10 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"
)

Functions

This section is empty.

Types

type ACRPushData added in v1.2.0

type ACRPushData struct {
	Digest   string `json:"digest"`
	PushedAt string `json:"pushed_at"`
	Tag      string `json:"tag"`
}

ACRPushData is the push data of ACR

type ACRRepository added in v1.2.0

type ACRRepository struct {
	DateCreated            string `json:"date_created"`
	Name                   string `json:"name"`
	Namespace              string `json:"namespace"`
	Region                 string `json:"region"`
	RepoAuthenticationType string `json:"repo_authentication_type"`
	RepoFullName           string `json:"repo_full_name"`
	RepoOriginType         string `json:"repo_origin_type"`
	RepoType               string `json:"repo_type"`
}

ACRRepository is the repository of ACR

type AccessKeyRequest added in v1.2.0

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

AccessKeyRequest request parameters to access cloud provider

type AddProjectUserRequest added in v1.3.0

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

AddProjectUserRequest the request body that add user to project

type AddonArgsResponse added in v1.2.0

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

AddonArgsResponse defines the response of addon args

type AddonBaseStatus added in v1.2.0

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

AddonBaseStatus addon base status

type AddonDefinition added in v1.2.0

type AddonDefinition struct {
	Name string `json:"name,omitempty"`
	// can be component/trait...definition
	DefType     string `json:"type,omitempty"`
	Description string `json:"description,omitempty"`
}

AddonDefinition is definition an addon can provide

type AddonInfo added in v1.2.0

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

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

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

type AppCompareReq struct {
	Env string `json:"env"`
}

AppCompareReq application compare req

type AppCompareResponse added in v1.3.0

type AppCompareResponse struct {
	IsDiff     bool   `json:"isDiff"`
	DiffReport string `json:"diffReport"`
	NewAppYAML string `json:"newAppYAML"`
	OldAppYAML string `json:"oldAppYAML"`
}

AppCompareResponse application compare result

type AppDryRunReq added in v1.3.0

type AppDryRunReq struct {
	AppName    string `json:"appName"`
	DryRunType string `json:"dryRunType"`
	Env        string `json:"env"`
	Version    string `json:"version"`
}

AppDryRunReq application dry-run req

type AppDryRunResponse added in v1.3.0

type AppDryRunResponse struct {
	YAML string `json:"yaml"`
}

AppDryRunResponse application dry-run result

type AppResetResponse added in v1.3.0

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

type ApplicationDeployRequest struct {
	WorkflowName string `json:"workflowName"`
	// User note message, optional
	Note string `json:"note"`
	// TriggerType the event trigger source, Web or API or Webhook
	TriggerType string `json:"triggerType" validate:"oneof=web api webhook"`
	// Force set to True to ignore unfinished events.
	Force bool `json:"force"`
	// CodeInfo is the source code info of this deploy
	CodeInfo *model.CodeInfo `json:"codeInfo,omitempty"`
	// ImageInfo is the image code info of this deploy
	ImageInfo *model.ImageInfo `json:"imageInfo,omitempty"`
}

ApplicationDeployRequest the application deploy or update event request

type ApplicationDeployResponse added in v1.2.0

type ApplicationDeployResponse struct {
	ApplicationRevisionBase
}

ApplicationDeployResponse application deploy response body

type ApplicationDockerhubWebhookResponse added in v1.2.0

type ApplicationDockerhubWebhookResponse struct {
	State       string `json:"state,omitempty"`
	Description string `json:"description,omitempty"`
	Context     string `json:"context,omitempty"`
	TargetURL   string `json:"target_url,omitempty"`
}

ApplicationDockerhubWebhookResponse dockerhub webhook response body

type ApplicationRequest

type ApplicationRequest struct {
	Components []common.ApplicationComponent `json:"components"`
	Policies   []v1beta1.AppPolicy           `json:"policies,omitempty"`
	Workflow   *v1beta1.Workflow             `json:"workflow,omitempty"`
}

ApplicationRequest represents application request for APIServer

type ApplicationResourceInfo

type ApplicationResourceInfo struct {
	ComponentNum int64 `json:"componentNum"`
}

ApplicationResourceInfo application-level resource consumption statistics

type ApplicationResponse

type ApplicationResponse struct {
	APIVersion string                  `json:"apiVersion"`
	Kind       string                  `json:"kind"`
	Spec       v1beta1.ApplicationSpec `json:"spec"`
	Status     common.AppStatus        `json:"status"`
}

ApplicationResponse represents application response for APIServer

type ApplicationRevisionBase added in v1.2.0

type ApplicationRevisionBase struct {
	CreateTime time.Time `json:"createTime"`
	Version    string    `json:"version"`
	Status     string    `json:"status"`
	Reason     string    `json:"reason,omitempty"`
	DeployUser string    `json:"deployUser,omitempty"`
	Note       string    `json:"note"`
	EnvName    string    `json:"envName"`
	// SourceType the event trigger source, Web or API or Webhook
	TriggerType string `json:"triggerType"`
	// CodeInfo is the code info of this application revision
	CodeInfo *model.CodeInfo `json:"codeInfo,omitempty"`
	// ImageInfo is the image info of this application revision
	ImageInfo *model.ImageInfo `json:"imageInfo,omitempty"`
}

ApplicationRevisionBase application revision base spec

type ApplicationStatisticsResponse added in v1.2.0

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

ApplicationStatisticsResponse application statistics response body

type ApplicationStatusResponse added in v1.2.0

type ApplicationStatusResponse struct {
	EnvName string            `json:"envName"`
	Status  *common.AppStatus `json:"status"`
}

ApplicationStatusResponse application status response body

type ApplicationTemplateBase

type ApplicationTemplateBase struct {
	TemplateName string                        `json:"templateName"`
	Versions     []*ApplicationTemplateVersion `json:"versions,omitempty"`
	CreateTime   time.Time                     `json:"createTime"`
	UpdateTime   time.Time                     `json:"updateTime"`
}

ApplicationTemplateBase app template model

type ApplicationTemplateVersion

type ApplicationTemplateVersion struct {
	Version     string    `json:"version"`
	Description string    `json:"description"`
	CreateUser  string    `json:"createUser"`
	CreateTime  time.Time `json:"createTime"`
	UpdateTime  time.Time `json:"updateTime"`
}

ApplicationTemplateVersion template version model

type ApplicationTrait added in v1.2.0

type ApplicationTrait struct {
	Type        string `json:"type"`
	Alias       string `json:"alias,omitempty"`
	Description string `json:"description,omitempty"`
	// Properties json data
	Properties *model.JSONStruct `json:"properties"`
	CreateTime time.Time         `json:"createTime"`
	UpdateTime time.Time         `json:"updateTime"`
}

ApplicationTrait application trait

type ApplicationTriggerBase added in v1.2.0

type ApplicationTriggerBase struct {
	Name          string    `json:"name"`
	Alias         string    `json:"alias,omitempty"`
	Description   string    `json:"description,omitempty"`
	WorkflowName  string    `json:"workflowName"`
	Type          string    `json:"type"`
	PayloadType   string    `json:"payloadType"`
	Token         string    `json:"token"`
	ComponentName string    `json:"componentName,omitempty"`
	CreateTime    time.Time `json:"createTime"`
	UpdateTime    time.Time `json:"updateTime"`
}

ApplicationTriggerBase application trigger base model

type ChartRepoResponse added in v1.3.0

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

ChartRepoResponse the response body of chart repo

type ChartRepoResponseList added in v1.3.0

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

ChartRepoResponseList the response body of list chart repo

type ChartVersionListResponse added in v1.3.0

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

ChartVersionListResponse contains helm chart versions info

type ClusterBase

type ClusterBase struct {
	Name        string            `json:"name"`
	Alias       string            `json:"alias" optional:"true" validate:"checkalias"`
	Description string            `json:"description" optional:"true"`
	Icon        string            `json:"icon" optional:"true"`
	Labels      map[string]string `json:"labels" optional:"true"`

	Provider     model.ProviderInfo `json:"providerInfo"`
	APIServerURL string             `json:"apiServerURL"`
	DashboardURL string             `json:"dashboardURL"`

	Status string `json:"status"`
	Reason string `json:"reason"`
}

ClusterBase cluster base model

type ClusterResourceInfo

type ClusterResourceInfo struct {
	WorkerNumber     int      `json:"workerNumber"`
	MasterNumber     int      `json:"masterNumber"`
	MemoryCapacity   int64    `json:"memoryCapacity"`
	CPUCapacity      int64    `json:"cpuCapacity"`
	GPUCapacity      int64    `json:"gpuCapacity,omitempty"`
	PodCapacity      int64    `json:"podCapacity"`
	MemoryUsed       int64    `json:"memoryUsed"`
	CPUUsed          int64    `json:"cpuUsed"`
	GPUUsed          int64    `json:"gpuUsed,omitempty"`
	PodUsed          int64    `json:"podUsed"`
	StorageClassList []string `json:"storageClassList,omitempty"`
}

ClusterResourceInfo resource info of cluster

type ClusterSelector added in v1.2.0

type ClusterSelector struct {
	Name string `json:"name" validate:"checkname"`
	// Adapt to a scenario where only one Namespace is available or a user-defined Namespace is available.
	Namespace string `json:"namespace,omitempty"`
}

ClusterSelector cluster selector

type ClusterTarget added in v1.2.0

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

ClusterTarget kubernetes delivery target

type ComponentBase

type ComponentBase struct {
	Name          string              `json:"name"`
	Alias         string              `json:"alias"`
	Description   string              `json:"description"`
	Labels        map[string]string   `json:"labels,omitempty"`
	ComponentType string              `json:"componentType"`
	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"`
}

ComponentBase component base model

type ComponentListResponse

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

ComponentListResponse list component

type ComponentSelector added in v1.2.0

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

ComponentSelector component selector

type Config added in v1.3.0

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

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

type ConnectCloudClusterRequest struct {
	AccessKeyID     string            `json:"accessKeyID"`
	AccessKeySecret string            `json:"accessKeySecret"`
	ClusterID       string            `json:"clusterID"`
	Name            string            `json:"name" validate:"checkname"`
	Alias           string            `json:"alias" optional:"true" validate:"checkalias"`
	Description     string            `json:"description,omitempty" optional:"true"`
	Icon            string            `json:"icon"`
	Labels          map[string]string `json:"labels,omitempty"`
}

ConnectCloudClusterRequest request parameters to create a cluster from cloud cluster

type CreateAddonRegistryRequest added in v1.2.0

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

CreateAddonRegistryRequest defines the format for addon registry create request

type CreateApplicationEnvbindingRequest added in v1.2.0

type CreateApplicationEnvbindingRequest struct {
	EnvBinding
}

CreateApplicationEnvbindingRequest new application env

type CreateApplicationRequest

type CreateApplicationRequest struct {
	Name        string                  `json:"name" validate:"checkname"`
	Alias       string                  `json:"alias" validate:"checkalias" optional:"true"`
	Project     string                  `json:"project" validate:"checkname"`
	Description string                  `json:"description" optional:"true"`
	Icon        string                  `json:"icon"`
	Labels      map[string]string       `json:"labels,omitempty"`
	EnvBinding  []*EnvBinding           `json:"envBinding,omitempty"`
	Component   *CreateComponentRequest `json:"component"`
}

CreateApplicationRequest create application request body

type CreateApplicationTemplateRequest

type CreateApplicationTemplateRequest struct {
	TemplateName string `json:"templateName" validate:"checkname"`
	Version      string `json:"version" validate:"required"`
	Description  string `json:"description"`
}

CreateApplicationTemplateRequest create app template request model

type CreateApplicationTraitRequest added in v1.2.0

type CreateApplicationTraitRequest struct {
	Type        string `json:"type" validate:"checkname"`
	Alias       string `json:"alias,omitempty" validate:"checkalias" optional:"true"`
	Description string `json:"description,omitempty" optional:"true"`
	Properties  string `json:"properties"`
}

CreateApplicationTraitRequest create application trait request

type CreateApplicationTriggerRequest added in v1.2.0

type CreateApplicationTriggerRequest struct {
	Name          string `json:"name" validate:"checkname"`
	Alias         string `json:"alias" validate:"checkalias" optional:"true"`
	Description   string `json:"description" optional:"true"`
	WorkflowName  string `json:"workflowName"`
	Type          string `json:"type" validate:"oneof=webhook"`
	PayloadType   string `json:"payloadType" validate:"checkpayloadtype"`
	ComponentName string `json:"componentName,omitempty" optional:"true"`
}

CreateApplicationTriggerRequest create application trigger

type CreateCloudClusterRequest added in v1.2.0

type CreateCloudClusterRequest struct {
	AccessKeyID       string `json:"accessKeyID"`
	AccessKeySecret   string `json:"accessKeySecret"`
	Name              string `json:"name" validate:"checkname"`
	Zone              string `json:"zone"`
	WorkerNumber      int    `json:"workerNumber"`
	CPUCoresPerWorker int64  `json:"cpuCoresPerWorker"`
	MemoryPerWorker   int64  `json:"memoryPerWorker"`
}

CreateCloudClusterRequest request parameters to create a cloud cluster (buy one)

type CreateCloudClusterResponse added in v1.2.0

type CreateCloudClusterResponse struct {
	Name      string `json:"clusterName"`
	ClusterID string `json:"clusterID"`
	Status    string `json:"status"`
}

CreateCloudClusterResponse return values for cloud cluster create request

type CreateClusterNamespaceRequest added in v1.2.0

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

CreateClusterNamespaceRequest request parameter to create namespace in cluster

type CreateClusterNamespaceResponse added in v1.2.0

type CreateClusterNamespaceResponse struct {
	Exists bool `json:"exists"`
}

CreateClusterNamespaceResponse response parameter for created namespace in cluster

type CreateClusterRequest

type CreateClusterRequest struct {
	Name             string            `json:"name" validate:"checkname"`
	Alias            string            `json:"alias" validate:"checkalias" optional:"true"`
	Description      string            `json:"description,omitempty"`
	Icon             string            `json:"icon"`
	KubeConfig       string            `json:"kubeConfig,omitempty" validate:"required_without=KubeConfigSecret"`
	KubeConfigSecret string            `json:"kubeConfigSecret,omitempty" validate:"required_without=KubeConfig"`
	Labels           map[string]string `json:"labels,omitempty"`
	DashboardURL     string            `json:"dashboardURL,omitempty"`
}

CreateClusterRequest request parameters to create a cluster

type CreateComponentRequest

type CreateComponentRequest struct {
	Name          string                           `json:"name" validate:"checkname"`
	Alias         string                           `json:"alias" validate:"checkalias" optional:"true"`
	Description   string                           `json:"description" optional:"true"`
	Icon          string                           `json:"icon" optional:"true"`
	Labels        map[string]string                `json:"labels,omitempty"`
	ComponentType string                           `json:"componentType" validate:"checkname"`
	Properties    string                           `json:"properties,omitempty"`
	DependsOn     []string                         `json:"dependsOn" optional:"true"`
	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 added in v1.3.0

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

type CreateEnvRequest struct {
	Name        string `json:"name" validate:"checkname"`
	Alias       string `json:"alias" validate:"checkalias" optional:"true"`
	Description string `json:"description,omitempty"  optional:"true"`

	// Project defines the project this Env belongs to
	Project string `json:"project"`
	// Namespace defines the K8s namespace of the Env in control plane
	Namespace string `json:"namespace"`

	// Targets defines the name of delivery target that belongs to this env
	// In one project, a delivery target can only belong to one env.
	Targets []string `json:"targets,omitempty"  optional:"true"`
}

CreateEnvRequest contains the env data as request body

type CreatePolicyRequest added in v1.2.0

type CreatePolicyRequest struct {
	// Name is the unique name of the policy.
	Name string `json:"name" validate:"checkname"`

	Description string `json:"description"`

	Type string `json:"type" validate:"checkname"`

	// Properties json data
	Properties string `json:"properties"`
}

CreatePolicyRequest create app policy

type CreateProjectRequest added in v1.2.0

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

CreateProjectRequest create project request body

type CreateRoleRequest added in v1.3.0

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

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

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

type CreateWorkflowRequest struct {
	Name        string         `json:"name"  validate:"checkname"`
	Alias       string         `json:"alias"  validate:"checkalias" optional:"true"`
	Description string         `json:"description" optional:"true"`
	Steps       []WorkflowStep `json:"steps,omitempty"`
	Default     *bool          `json:"default"`
	EnvName     string         `json:"envName"`
}

CreateWorkflowRequest create workflow request

type DefinitionBase added in v1.2.0

type DefinitionBase struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Icon        string `json:"icon"`
	// WorkloadType the component workload type
	// Deprecated: it same as component.workload.type
	WorkloadType string                              `json:"workloadType,omitempty"`
	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"`
	ApplicationType string                  `json:"applicationType"`
	ResourceInfo    ApplicationResourceInfo `json:"resourceInfo"`
}

DetailApplicationResponse application detail

type DetailClusterResponse

type DetailClusterResponse struct {
	model.Cluster
	ResourceInfo ClusterResourceInfo `json:"resourceInfo"`
}

DetailClusterResponse cluster detail information model

type DetailComponentResponse added in v1.2.0

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

DetailComponentResponse detail component response body

type DetailDefinitionResponse added in v1.2.0

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

DetailDefinitionResponse get definition detail

type DetailEnvBindingResponse added in v1.2.0

type DetailEnvBindingResponse struct {
	EnvBindingBase
}

DetailEnvBindingResponse defines the response of env-binding details

type DetailPolicyResponse added in v1.2.0

type DetailPolicyResponse struct {
	PolicyBase
}

DetailPolicyResponse app policy detail model

type DetailRevisionResponse added in v1.2.0

type DetailRevisionResponse struct {
	model.ApplicationRevision
}

DetailRevisionResponse get application revision detail

type DetailTargetResponse added in v1.2.0

type DetailTargetResponse struct {
	TargetBase
}

DetailTargetResponse detail Target response

type DetailUserResponse added in v1.3.0

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

DetailUserResponse is the response of user detail

type DetailWorkflowRecordResponse added in v1.2.0

type DetailWorkflowRecordResponse struct {
	WorkflowRecord
	DeployTime time.Time `json:"deployTime"`
	DeployUser string    `json:"deployUser"`
	Note       string    `json:"note"`
	// TriggerType the event trigger source, Web or API or Webhook
	TriggerType string `json:"triggerType"`
}

DetailWorkflowRecordResponse get workflow record detail

type DetailWorkflowResponse added in v1.2.0

type DetailWorkflowResponse struct {
	WorkflowBase
}

DetailWorkflowResponse detail workflow response

type DexConfigResponse added in v1.3.0

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

type DockerHubData struct {
	Images   []string `json:"images"`
	PushedAt int64    `json:"pushed_at"`
	Pusher   string   `json:"pusher"`
	Tag      string   `json:"tag"`
}

DockerHubData is the push data of dockerhub

type DockerHubRepository added in v1.2.0

type DockerHubRepository struct {
	CommentCount    int    `json:"comment_count"`
	DateCreated     int64  `json:"date_created"`
	Description     string `json:"description"`
	Dockerfile      string `json:"dockerfile"`
	FullDescription string `json:"full_description"`
	IsOfficial      bool   `json:"is_official"`
	IsPrivate       bool   `json:"is_private"`
	IsTrusted       bool   `json:"is_trusted"`
	Name            string `json:"name"`
	Namespace       string `json:"namespace"`
	Owner           string `json:"owner"`
	RepoName        string `json:"repo_name"`
	RepoURL         string `json:"repo_url"`
	StartCount      int    `json:"star_count"`
	Status          string `json:"status"`
}

DockerHubRepository is the repository of dockerhub

type EmptyResponse added in v1.2.0

type EmptyResponse struct{}

EmptyResponse empty response, it will used for delete api

type EnableAddonRequest added in v1.2.0

type EnableAddonRequest struct {
	// Args is the key-value environment variables, e.g. AK/SK credentials.
	Args map[string]interface{} `json:"args,omitempty"`
	// 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 added in v1.2.0

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

EnablingProgress defines the progress of enabling an addon

type Env added in v1.2.0

type Env struct {
	Name        string `json:"name"`
	Alias       string `json:"alias"`
	Description string `json:"description,omitempty"  optional:"true"`

	// Project defines the project this Env belongs to
	Project NameAlias `json:"project"`
	// Namespace defines the K8s namespace of the Env in control plane
	Namespace string `json:"namespace"`

	// Targets defines the name of delivery target that belongs to this env
	// In one project, a delivery target can only belong to one env.
	Targets []NameAlias `json:"targets,omitempty"  optional:"true"`

	CreateTime time.Time `json:"createTime"`
	UpdateTime time.Time `json:"updateTime"`
}

Env models the data of env in API

type EnvBinding added in v1.2.0

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

EnvBinding application env binding

type EnvBindingBase added in v1.2.0

type EnvBindingBase struct {
	Name               string             `json:"name" validate:"checkname"`
	Alias              string             `json:"alias" validate:"checkalias" optional:"true"`
	Description        string             `json:"description,omitempty" optional:"true"`
	TargetNames        []string           `json:"targetNames"`
	Targets            []EnvBindingTarget `json:"targets,omitempty"`
	ComponentSelector  *ComponentSelector `json:"componentSelector" optional:"true"`
	CreateTime         time.Time          `json:"createTime"`
	UpdateTime         time.Time          `json:"updateTime"`
	AppDeployName      string             `json:"appDeployName"`
	AppDeployNamespace string             `json:"appDeployNamespace"`
}

EnvBindingBase application env binding

type EnvBindingList added in v1.2.0

type EnvBindingList []*EnvBinding

EnvBindingList env binding list

type EnvBindingTarget added in v1.2.0

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

EnvBindingTarget the target struct in the envbinding base struct

type EventData added in v1.2.0

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

EventData is the event info of harbor

type GetLoginTypeResponse added in v1.3.0

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

GetLoginTypeResponse get login type response

type HandleApplicationHarborReq added in v1.2.0

type HandleApplicationHarborReq struct {
	Type      string    `json:"type"`
	OccurAt   int64     `json:"occur_at"`
	Operator  string    `json:"operator"`
	EventData EventData `json:"event_data"`
}

HandleApplicationHarborReq handles application trigger harbor request

type HandleApplicationTriggerACRRequest added in v1.2.0

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

HandleApplicationTriggerACRRequest handles application trigger ACR request

type HandleApplicationTriggerDockerHubRequest added in v1.2.0

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

HandleApplicationTriggerDockerHubRequest application trigger DockerHub webhook request

type HandleApplicationTriggerJFrogRequest added in v1.2.2

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

HandleApplicationTriggerJFrogRequest application trigger JFrog webhook request

type HandleApplicationTriggerWebhookRequest added in v1.2.0

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

HandleApplicationTriggerWebhookRequest handles application trigger webhook request

type JFrogWebhookData added in v1.2.2

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

type ListAddonRegistryResponse struct {
	Registries []*AddonRegistry `json:"registries"`
}

ListAddonRegistryResponse list addon registry

type ListAddonResponse

type ListAddonResponse struct {
	Addons []*AddonInfo `json:"addons"`

	// Message demonstrate the error info if exists
	Message string `json:"message,omitempty"`
}

ListAddonResponse defines the format for addon list response

type ListApplicationComponentOptions added in v1.2.0

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

ListApplicationComponentOptions list app component list

type ListApplicationEnvBinding added in v1.2.0

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

ListApplicationEnvBinding list app envBindings

type ListApplicationOptions added in v1.2.0

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

ListApplicationOptions list application query options

type ListApplicationPolicy added in v1.2.0

type ListApplicationPolicy struct {
	Policies []*PolicyBase `json:"policies"`
}

ListApplicationPolicy list app policies

type ListApplicationResponse

type ListApplicationResponse struct {
	Applications []*ApplicationBase `json:"applications"`
}

ListApplicationResponse list applications by query params

type ListApplicationTriggerResponse added in v1.2.0

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

ListApplicationTriggerResponse list application triggers response body

type ListCloudClusterCreationResponse added in v1.2.0

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

ListCloudClusterCreationResponse return the cluster names of creation process of cloud clusters

type ListCloudClusterResponse added in v1.2.0

type ListCloudClusterResponse struct {
	Clusters []cloudprovider.CloudCluster `json:"clusters"`
	Total    int                          `json:"total"`
}

ListCloudClusterResponse list cloud clusters

type ListClusterResponse

type ListClusterResponse struct {
	Clusters []ClusterBase `json:"clusters"`
	Total    int64         `json:"total"`
}

ListClusterResponse list cluster

type ListDefinitionResponse added in v1.2.0

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

ListDefinitionResponse list definition response model

type ListEnabledAddonResponse added in v1.2.0

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

ListEnabledAddonResponse defines the format for enabled addon list response

type ListEnvOptions added in v1.2.0

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

ListEnvOptions list envs by query options

type ListEnvResponse added in v1.2.0

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

ListEnvResponse response the while env list

type ListPolicyDefinitionResponse added in v1.2.0

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

ListPolicyDefinitionResponse list available

type ListProjectResponse added in v1.2.0

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

ListProjectResponse list project response body

type ListProjectUsersResponse added in v1.3.0

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

ListProjectUsersResponse the response body that list users belong to a project

type ListRevisionsResponse added in v1.2.0

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

ListRevisionsResponse list application revisions

type ListRolesResponse added in v1.3.0

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

ListRolesResponse the response body of list roles

type ListTargetResponse added in v1.2.0

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

ListTargetResponse list delivery target response body

type ListUserOptions added in v1.3.0

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

ListUserOptions list user options

type ListUserResponse added in v1.3.0

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

ListUserResponse list user response

type ListWorkflowRecordsResponse added in v1.2.0

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

ListWorkflowRecordsResponse list workflow execution record

type ListWorkflowResponse added in v1.2.0

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

ListWorkflowResponse list application workflows

type LoginRequest added in v1.3.0

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

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

LoginResponse is the response of login request

type LoginUserInfoResponse added in v1.3.0

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

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

NameAlias name and alias

type PermissionBase added in v1.3.0

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

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

type PolicyBase struct {
	// Name is the unique name of the policy.
	Name        string `json:"name"`
	Type        string `json:"type"`
	Description string `json:"description"`
	Creator     string `json:"creator"`
	// Properties json data
	Properties *model.JSONStruct `json:"properties"`
	CreateTime time.Time         `json:"createTime"`
	UpdateTime time.Time         `json:"updateTime"`
}

PolicyBase application policy base info

type PolicyDefinition added in v1.2.0

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

PolicyDefinition application policy definition

type ProjectBase added in v1.2.0

type ProjectBase struct {
	Name        string    `json:"name"`
	Alias       string    `json:"alias"`
	Description string    `json:"description"`
	CreateTime  time.Time `json:"createTime"`
	UpdateTime  time.Time `json:"updateTime"`
	Owner       NameAlias `json:"owner,omitempty"`
}

ProjectBase project base model

type ProjectUserBase added in v1.3.0

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

ProjectUserBase project user base

type PutApplicationEnvBindingRequest added in v1.2.0

type PutApplicationEnvBindingRequest struct {
}

PutApplicationEnvBindingRequest update app envbinding request body

type RefreshTokenResponse added in v1.3.0

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

RefreshTokenResponse is the response of refresh token request

type Repository added in v1.2.0

type Repository struct {
	DateCreated  int64  `json:"date_created"`
	Name         string `json:"name"`
	Namespace    string `json:"namespace"`
	RepoFullName string `json:"repo_full_name"`
	RepoType     string `json:"repo_type"`
}

Repository is the repository of harbor

type Resources added in v1.2.0

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

Resources is the image info of harbor

type RoleBase added in v1.3.0

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

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

SimpleResponse simple response model for temporary

type StatisticInfo added in v1.3.2

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

type SystemInfo struct {
	PlatformID       string    `json:"platformID"`
	EnableCollection bool      `json:"enableCollection"`
	LoginType        string    `json:"loginType"`
	InstallTime      time.Time `json:"installTime,omitempty"`
}

SystemInfo system info

type SystemInfoRequest added in v1.2.0

type SystemInfoRequest struct {
	EnableCollection bool   `json:"enableCollection"`
	LoginType        string `json:"loginType"`
	VelaAddress      string `json:"velaAddress,omitempty"`
}

SystemInfoRequest request by update SystemInfo

type SystemInfoResponse added in v1.2.0

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

SystemInfoResponse get SystemInfo

type SystemVersion added in v1.2.0

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

SystemVersion contains KubeVela version

type TargetBase added in v1.2.0

type TargetBase struct {
	Name         string                 `json:"name"`
	Alias        string                 `json:"alias,omitempty" validate:"checkalias" optional:"true"`
	Description  string                 `json:"description,omitempty" optional:"true"`
	Cluster      *ClusterTarget         `json:"cluster,omitempty"`
	ClusterAlias string                 `json:"clusterAlias,omitempty"`
	Variable     map[string]interface{} `json:"variable,omitempty"`
	CreateTime   time.Time              `json:"createTime"`
	UpdateTime   time.Time              `json:"updateTime"`
	AppNum       int64                  `json:"appNum,omitempty"`
	Project      NameAlias              `json:"project"`
}

TargetBase Target base model

type UpdateAddonRegistryRequest added in v1.2.0

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

UpdateAddonRegistryRequest defines the format for addon registry update request

type UpdateApplicationComponentRequest added in v1.2.0

type UpdateApplicationComponentRequest struct {
	Alias       *string            `json:"alias" optional:"true"`
	Description *string            `json:"description" optional:"true"`
	Icon        *string            `json:"icon" optional:"true"`
	Labels      *map[string]string `json:"labels,omitempty"`
	Properties  *string            `json:"properties,omitempty"`
	DependsOn   *[]string          `json:"dependsOn" optional:"true"`
}

UpdateApplicationComponentRequest update component request body

type UpdateApplicationRequest added in v1.2.0

type UpdateApplicationRequest struct {
	Alias       string            `json:"alias" validate:"checkalias" optional:"true"`
	Description string            `json:"description" optional:"true"`
	Icon        string            `json:"icon" optional:"true"`
	Labels      map[string]string `json:"labels,omitempty"`
}

UpdateApplicationRequest update application base config

type UpdateApplicationTraitRequest added in v1.2.0

type UpdateApplicationTraitRequest struct {
	Alias       string `json:"alias,omitempty" validate:"checkalias" optional:"true"`
	Description string `json:"description,omitempty" optional:"true"`
	Properties  string `json:"properties"`
}

UpdateApplicationTraitRequest update application trait req

type UpdateEnvRequest added in v1.2.0

type UpdateEnvRequest struct {
	Alias       string `json:"alias" validate:"checkalias" optional:"true"`
	Description string `json:"description,omitempty"  optional:"true"`
	// Targets defines the name of delivery target that belongs to this env
	// In one project, a delivery target can only belong to one env.
	Targets []string `json:"targets,omitempty"  optional:"true"`
}

UpdateEnvRequest defines the data of Env for update

type UpdatePermissionRequest added in v1.3.0

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 update permission policy

type UpdatePolicyRequest added in v1.2.0

type UpdatePolicyRequest struct {
	Description string `json:"description"`
	Type        string `json:"type" validate:"checkname"`
	// Properties json data
	Properties string `json:"properties"`
}

UpdatePolicyRequest update policy

type UpdateProjectRequest added in v1.3.0

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

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

UpdateProjectUserRequest the request body that update user role in a project

type UpdateRoleRequest added in v1.3.0

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

UpdateRoleRequest the request body that update a role

type UpdateTargetRequest added in v1.2.0

type UpdateTargetRequest struct {
	Alias       string                 `json:"alias,omitempty" validate:"checkalias" optional:"true"`
	Description string                 `json:"description,omitempty" optional:"true"`
	Variable    map[string]interface{} `json:"variable,omitempty"`
}

UpdateTargetRequest only support full quantity update

type UpdateUserRequest added in v1.3.0

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

type UpdateWorkflowRequest struct {
	Alias       string         `json:"alias"  validate:"checkalias" optional:"true"`
	Description string         `json:"description" optional:"true"`
	Steps       []WorkflowStep `json:"steps,omitempty"`
	Default     *bool          `json:"default"`
}

UpdateWorkflowRequest update or create application workflow

type UserBase added in v1.3.0

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

type VelaQLViewResponse map[string]interface{}

VelaQLViewResponse query response

type WorkflowBase added in v1.2.0

type WorkflowBase struct {
	Name        string         `json:"name"`
	Alias       string         `json:"alias"`
	Description string         `json:"description"`
	Enable      bool           `json:"enable"`
	Default     bool           `json:"default"`
	EnvName     string         `json:"envName"`
	CreateTime  time.Time      `json:"createTime"`
	UpdateTime  time.Time      `json:"updateTime"`
	Steps       []WorkflowStep `json:"steps,omitempty"`
}

WorkflowBase workflow base model

type WorkflowRecord added in v1.2.0

type WorkflowRecord struct {
	Name                string                     `json:"name"`
	Namespace           string                     `json:"namespace"`
	WorkflowName        string                     `json:"workflowName"`
	WorkflowAlias       string                     `json:"workflowAlias"`
	ApplicationRevision string                     `json:"applicationRevision"`
	StartTime           time.Time                  `json:"startTime,omitempty"`
	Status              string                     `json:"status"`
	Steps               []model.WorkflowStepStatus `json:"steps,omitempty"`
}

WorkflowRecord workflow record

type WorkflowStep added in v1.2.0

type WorkflowStep struct {
	// Name is the unique name of the workflow step.
	Name        string             `json:"name" validate:"checkname"`
	Alias       string             `json:"alias" validate:"checkalias" optional:"true"`
	Type        string             `json:"type" validate:"checkname"`
	Description string             `json:"description" optional:"true"`
	DependsOn   []string           `json:"dependsOn" optional:"true"`
	Properties  string             `json:"properties,omitempty"`
	Inputs      common.StepInputs  `json:"inputs,omitempty" optional:"true"`
	Outputs     common.StepOutputs `json:"outputs,omitempty" optional:"true"`
}

WorkflowStep workflow step config

Jump to

Keyboard shortcuts

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