v1

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddonMeta

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

	Version string `json:"version"`

	Description string `json:"description"`

	Icon string `json:"icon"`

	Tags []string `json:"tags"`

	Phase AddonPhase `json:"phase"`
}

AddonMeta defines the format for a single addon

type AddonPhase

type AddonPhase string

AddonPhase defines the phase of an addon

const (
	// AddonPhaseDisabled indicates the addon is disabled
	AddonPhaseDisabled AddonPhase = "disabled"
	// AddonPhaseDisabling indicates the addon is disabling
	AddonPhaseDisabling AddonPhase = "disabling"
	// AddonPhaseEnabled indicates the addon is enabled
	AddonPhaseEnabled AddonPhase = "enabled"
	// AddonPhaseEnabling indicates the addon is enabling
	AddonPhaseEnabling AddonPhase = "enabling"
)

type AddonStatusResponse

type AddonStatusResponse struct {
	Phase AddonPhase `json:"phase"`
}

AddonStatusResponse defines the format of addon status response

type ApplicationBase

type ApplicationBase struct {
	Name            string            `json:"name"`
	Namespace       string            `json:"namespace"`
	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"`
	ClusterBindList []ClusterBase     `json:"clusterList,omitempty"`
	Status          string            `json:"status"`
	GatewayRuleList []GatewayRule     `json:"gatewayRule"`
}

ApplicationBase application base model

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 int `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 ApplicationTemplateBase

type ApplicationTemplateBase struct {
	TemplateName string                        `json:"templateName"`
	Versions     []*ApplicationTemplateVersion `json:"versions,omitempty"`
}

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 ClusterBase

type ClusterBase struct {
	Name        string            `json:"name"`
	Description string            `json:"description"`
	Icon        string            `json:"icon"`
	Labels      map[string]string `json:"labels"`
	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"`
	StorageClassList []string `json:"storageClassList,omitempty"`
}

ClusterResourceInfo resource info of cluster

type ComponentBase

type ComponentBase struct {
	Name          string            `json:"name"`
	Description   string            `json:"description"`
	Labels        map[string]string `json:"labels,omitempty"`
	ComponentType string            `json:"componentType"`
	BindClusters  []string          `json:"bindClusters"`
	Icon          string            `json:"icon,omitempty"`
	DependOn      []string          `json:"dependOn"`
	Creator       string            `json:"creator,omitempty"`
	DeployVersion string            `json:"deployVersion"`
}

ComponentBase component base model

type ComponentDefinitionBase

type ComponentDefinitionBase struct {
	Name           string  `json:"name"`
	Description    string  `json:"description"`
	Icon           string  `json:"icon"`
	RequiredParams []Param `json:"requiredParams"`
}

ComponentDefinitionBase component definition base model

type ComponentListResponse

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

ComponentListResponse list component

type CreateAddonRequest

type CreateAddonRequest struct {
	Name string `json:"name" validate:"required"`

	Version string `json:"version" validate:"required"`

	// Short description about the addon.
	Description string `json:"description,omitempty"`

	Icon string `json:"icon"`

	Tags []string `json:"tags"`

	// The detail of the addon. Could be the entire README data.
	Detail string `json:"detail,omitempty"`

	// DeployData is the object to deploy to the cluster to enable addon
	DeployData string `json:"deploy_data,omitempty" validate:"required_without=deploy_url"`

	// DeployURL is the URL to the data file location in a Git repository
	DeployURL string `json:"deploy_url,omitempty"  validate:"required_without=deploy_data"`
}

CreateAddonRequest defines the format for addon create request

type CreateApplicationRequest

type CreateApplicationRequest struct {
	Name        string            `json:"name" validate:"required"`
	Namespace   string            `json:"namespace" validate:"required"`
	Description string            `json:"description"`
	Icon        string            `json:"icon"`
	Labels      map[string]string `json:"labels,omitempty"`
	ClusterList []string          `json:"clusterList,omitempty"`
	YamlConfig  string            `json:"yamlConfig,omitempty"`
}

CreateApplicationRequest create application request body

type CreateApplicationTemplateRequest

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

CreateApplicationTemplateRequest create app template request model

type CreateClusterRequest

type CreateClusterRequest struct {
	Name             string            `json:"name" validate:"required"`
	Description      string            `json:"description,omitempty"`
	Icon             string            `json:"icon"`
	KubeConfig       string            `json:"kubeConfig" validate:"required_without=kubeConfigSecret"`
	KubeConfigSecret string            `json:"kubeConfigSecret,omitempty" validate:"required_without=kubeConfig"`
	Labels           map[string]string `json:"labels,omitempty"`
}

CreateClusterRequest request parameters to create a cluster

type CreateComponentRequest

type CreateComponentRequest struct {
	ApplicationName string            `json:"appName" validate:"required"`
	Name            string            `json:"name" validate:"required"`
	Description     string            `json:"description"`
	Labels          map[string]string `json:"labels,omitempty"`
	ComponentType   string            `json:"componentType" validate:"required"`
	BindClusters    []string          `json:"bindClusters"`
	Properties      string            `json:"properties,omitempty"`
}

CreateComponentRequest create component request model

type CreateNamespaceRequest

type CreateNamespaceRequest struct {
	Name        string `json:"name" validate:"required"`
	Description string `json:"description"`
}

CreateNamespaceRequest create namespace request body

type DetailAddonResponse

type DetailAddonResponse struct {
	AddonMeta

	Detail string `json:"detail,omitempty"`

	// DeployData is the object to deploy to the cluster to enable addon
	DeployData string `json:"deploy_data,omitempty"`

	// DeployURL is the URL to the data file location in a Git repository
	DeployURL string `json:"deploy_url,omitempty"`
}

DetailAddonResponse defines the format for showing the addon details

type DetailApplicationResponse

type DetailApplicationResponse struct {
	ApplicationBase
	Policies       []string                `json:"policies"`
	Status         string                  `json:"status"`
	ResourceInfo   ApplicationResourceInfo `json:"resourceInfo"`
	WorkflowStatus []WorkflowStepStatus    `json:"workflowStatus"`
}

DetailApplicationResponse application detail

type DetailClusterResponse

type DetailClusterResponse struct {
	ClusterBase
	ResourceInfo ClusterResourceInfo `json:"resourceInfo"`
	// remote manage url, eg. ACK cluster manage url.
	RemoteManageURL string `json:"remoteManageURL,omitempty"`
	// Dashboard URL
	DashboardURL string `json:"dashboardURL,omitempty"`
}

DetailClusterResponse cluster detail information model

type GatewayRule

type GatewayRule struct {
	RuleType      RuleType `json:"ruleType"`
	Address       string   `json:"address"`
	Protocol      string   `json:"protocol"`
	ComponentName string   `json:"componentName"`
	ComponentPort int32    `json:"componentPort"`
}

GatewayRule application gateway rule

type ListAddonResponse

type ListAddonResponse struct {
	Addons []AddonMeta `json:"addons"`
}

ListAddonResponse defines the format for addon list response

type ListApplicationResponse

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

ListApplicationResponse list applications by query params

type ListClusterResponse

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

ListClusterResponse list cluster

type ListComponentDefinitionResponse

type ListComponentDefinitionResponse struct {
	ComponentDefinitions []ComponentDefinitionBase `json:"componentDefinitions"`
}

ListComponentDefinitionResponse list component dedinition response model

type ListNamespaceResponse

type ListNamespaceResponse struct {
	Namespaces []NamesapceBase `json:"namesapces"`
}

ListNamespaceResponse namesace list model

type NamesapceBase

type NamesapceBase struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

NamesapceBase namespace base model

type NamesapceDetailResponse

type NamesapceDetailResponse struct {
	NamesapceBase
	ClusterBind map[string]string `json:"clusterBind"`
}

NamesapceDetailResponse namespace detail response

type Param

type Param struct {
	Key          string      `json:"key"`
	Name         string      `json:"name"`
	DefaultValue interface{} `json:"defaultValue"`
	Type         string      `json:"type"`
	Description  string      `json:"description"`
}

Param For rendering forms

type RuleType

type RuleType string

RuleType gateway rule type

const (
	// HTTPRule Layer 7 HTTP policy.
	HTTPRule RuleType = "http"
	// StreamRule Layer 4 policy, such as TCP and UDP
	StreamRule RuleType = "stream"
)

type WorkflowStepStatus

type WorkflowStepStatus struct {
	Name     string        `json:"name"`
	Status   string        `json:"status"`
	TakeTime time.Duration `json:"takeTime"`
}

WorkflowStepStatus workflow step status model

Jump to

Keyboard shortcuts

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