appconfigform

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2021 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IMAGE                 = "image"
	ADDON                 = "addon"
	MysqlAddonName        = "mysql-edge"
	MysqlAddonVersion     = "5.7"
	ApplicationNameLength = 30
)
View Source
const (
	MIRROR     = "MIRROR"
	MIDDLEWARE = "MIDDLEWARE"

	AppNameMatchPattern = "^[a-z][a-z0-9-]*[a-z0-9]$"
	AppNameRegexpError  = "可输入小写字母、数字、中划线; 必须以小写字母开头, 以小写字母或数字结尾"
)

Variables

View Source
var (
	AppNameMatchRegexp = fmt.Sprintf("/%v/", AppNameMatchPattern)
)

Functions

func ConvertDeployResource

func ConvertDeployResource(typeInDB string) string

func RenderCreator

func RenderCreator() protocol.CompRender

Types

type Application

type Application struct {
	ID                uint64                       `json:"id"`
	AppName           string                       `json:"appName"`
	DeployResource    string                       `json:"deployResource"`
	MiddlewareType    string                       `json:"middlewareType"`
	Cluster           string                       `json:"cluster"`
	Sites             []string                     `json:"sites,omitempty"`
	ConfigSet         string                       `json:"configSets"`
	Depends           []string                     `json:"depends,omitempty"`
	Replicaset        int32                        `json:"copyNum"`
	Storage           ApplicationStorage           `json:"storage"`
	Mirror            ApplicationMirror            `json:"mirror"`
	HealthCheckConfig ApplicationHealthCheckConfig `json:"healthCheckConfig"`
	PortMap           ApplicationPortMap           `json:"portMap"`
}

type ApplicationHealthCheckConfig

type ApplicationHealthCheckConfig struct {
	HealthCheckType string `json:"healthCheckType"`
	Path            string `json:"path"`
	Port            int    `json:"port"`
	HealthCheckExec string `json:"HealthCheckExec"`
}

type ApplicationMirror

type ApplicationMirror struct {
	MirrorAddress    string `json:"mirrorAddress"`
	RegistryUser     string `json:"registryUser"`
	RegistryPassword string `json:"registryPassword"`
}

type ApplicationPortMap

type ApplicationPortMap struct {
	Data []ApplicationPortMapData `json:"data"`
}

type ApplicationPortMapData

type ApplicationPortMapData struct {
	Protocol  string `json:"protocol"`
	Container int    `json:"container"`
	Service   int32  `json:"service"`
}

type ApplicationStorage

type ApplicationStorage struct {
	CpuRequest    float64 `json:"cpuRequest"`
	CpuLimit      float64 `json:"cpuLimit"`
	MemoryRequest float64 `json:"memoryRequest"`
	MemoryLimit   float64 `json:"memoryLimit"`
}

type ChangeClusterReqForm

type ChangeClusterReqForm struct {
	ClusterName string `json:"cluster"`
}

type ChangeClusterReqProps

type ChangeClusterReqProps struct {
	Fields []*apistructs.EdgeFormModalField `json:"fields"`
}

type ComponentFormModal

type ComponentFormModal struct {
	// contains filtered or unexported fields
}

func (*ComponentFormModal) OperateChangeCluster

func (c *ComponentFormModal) OperateChangeCluster(orgID int64, identity apistructs.Identity) error

func (*ComponentFormModal) OperateRendering

func (c *ComponentFormModal) OperateRendering(orgID int64, identity apistructs.Identity) error

func (*ComponentFormModal) OperateSubmit

func (c *ComponentFormModal) OperateSubmit(orgID int64, identity apistructs.Identity) error

func (*ComponentFormModal) SetBundle

func (c *ComponentFormModal) SetBundle(ctxBundle protocol.ContextBundle) error

func (*ComponentFormModal) SetComponent

func (c *ComponentFormModal) SetComponent(component *apistructs.Component) error

Jump to

Keyboard shortcuts

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