model

package
v0.0.0-...-5af6bcd Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	C_ConfigMap          string = "configmap"
	C_Secret             string = "secret"
	C_Service            string = "service"
	C_ClusterRole        string = "clusterrole"
	C_ClusterRoleBinding string = "clusterrolebinding"
	C_Role               string = "role"
	C_RoleBinding        string = "rolebinding"
	C_ServiceAccount     string = "serviceaccount"
	C_Ingress            string = "ingress"

	C_APP       string = "app"
	C_Component string = "component"
	C_Workload  string = "workload"
	C_Hpa       string = "hpa"
)
View Source
const (
	A_Name      string = "name"
	A_Version   string = "version"
	A_Namespace string = "namespace"
	A_Labels    string = "labels"
)
View Source
const (
	A_Selector                string = "selector"
	A_Replica                 string = "replicas"
	A_MinReadySeconds         string = "minReadySeconds"
	A_RevisionHistoryLimit    string = "revisionHistoryLimit"
	A_ProgressDeadlineSeconds string = "progressDeadlineSeconds"
	A_PodManagementPolicy     string = "podManagementPolicy"
	A_UpdateStrategy          string = "updateStrategy"

	A_Parallelism             string = "parallelism"
	A_Completions             string = "completions"
	A_ActiveDeadlineSeconds   string = "activeDeadlineSeconds"
	A_BackoffLimit            string = "backoffLimit"
	A_TTLSecondsAfterFinished string = "ttlSecondsAfterFinished"
	A_CompletionMode          string = "completionMode"
	A_Suspend                 string = "suspend"

	A_Schedule                   string = "schedule"
	A_TimeZone                   string = "timeZone"
	A_StartingDeadlineSeconds    string = "startingDeadlineSeconds"
	A_ConcurrencyPolicy          string = "concurrencyPolicy"
	A_SuccessfulJobsHistoryLimit string = "successfulJobsHistoryLimit"
	A_FailedJobsHistoryLimit     string = "failedJobsHistoryLimit"
)

Variables

Functions

This section is empty.

Types

type App

type App struct {
	GenericModel `json:",inline"`
	Common       `yaml:",inline"`
	Version      string       `yaml:"version"`
	Components   []*Component `yaml:"components,omitempty"`
}

func (*App) Args

func (a *App) Args() []string

func (*App) ArgsExample

func (a *App) ArgsExample() string

func (*App) Build

func (a *App) Build() *manifest.AppManifests

func (*App) Create

func (a *App) Create(scanner *bufio.Scanner) generator.OperationHolder

列出可选类型,并选择

func (*App) General

func (a *App) General(scanner *bufio.Scanner) generator.GeneralCommand

func (*App) List

func (a *App) List(typ string) (result []generator.OperationHolder)

func (*App) Modify

func (a *App) Modify(scanner *bufio.Scanner) generator.OperationHolder

func (*App) NextOperation

func (a *App) NextOperation(scanner *bufio.Scanner) []generator.Operation

列出可选类型,并选择

func (*App) ParseArgs

func (a *App) ParseArgs(input string) error

func (*App) Remove

func (a *App) Remove(scanner *bufio.Scanner)

func (*App) String

func (a *App) String() string

func (*App) Type

func (a *App) Type() string

type Base

type Base struct {
	Name   string            `yaml:"name"`
	Labels map[string]string `yaml:"labels"`
}

type ClusterRole

type ClusterRole struct {
	GenericModel `yaml:",inline"`
}

func (*ClusterRole) String

func (r *ClusterRole) String() string

func (*ClusterRole) Type

func (r *ClusterRole) Type() string

type ClusterRoleBinding

type ClusterRoleBinding struct {
	GenericModel `yaml:",inline"`
}

func (*ClusterRoleBinding) String

func (b *ClusterRoleBinding) String() string

func (*ClusterRoleBinding) Type

func (b *ClusterRoleBinding) Type() string

type Common

type Common struct {
	ConfigMaps []*ConfigMap `yaml:"configmaps,omitempty"`
	Secrets    []*Secret    `yaml:"secrets,omitempty"`
	Services   []*Service   `yaml:"services,omitempty"`

	ServiceAccount     *ServiceAccount     `yaml:"serviceaccount,omitempty"`
	ClusterRole        *ClusterRole        `yaml:"clusterrole,omitempty"`
	ClusterRoleBinding *ClusterRoleBinding `yaml:"clusterrolebinding,omitempty"`
	Role               *Role               `yaml:"role,omitempty"`
	RoleBinding        *RoleBinding        `yaml:"rolebinding,omitempty"`
	Ingress            *Ingress            `yaml:"ingress,omitempty"`
}

type CompCronJob

type CompCronJob struct {
	GenericModel `yaml:",inline"`
	JobTemplate  *CompJob

	Schedule                   string  `json:"schedule"`
	TimeZone                   *string `json:"timeZone,omitempty"`
	StartingDeadlineSeconds    *int64  `json:"startingDeadlineSeconds,omitempty"`
	ConcurrencyPolicy          string  `json:"concurrencyPolicy,omitempty"`
	SuccessfulJobsHistoryLimit *int32  `json:"successfulJobsHistoryLimit,omitempty"`
	FailedJobsHistoryLimit     *int32  `json:"failedJobsHistoryLimit,omitempty"`
}

func (*CompCronJob) Args

func (a *CompCronJob) Args() []string

func (*CompCronJob) ArgsExample

func (a *CompCronJob) ArgsExample() string

func (*CompCronJob) AvailableOperations

func (a *CompCronJob) AvailableOperations() map[generator.Operation][]string

func (*CompCronJob) ParseArgs

func (a *CompCronJob) ParseArgs(input string) (err error)

func (*CompCronJob) Type

func (g *CompCronJob) Type() string

type CompDaemonSet

type CompDaemonSet struct {
	GenericModel         `yaml:",inline"`
	LabelSelector        map[string]string `yaml:"selector,omitempty"`
	UpdateStrategy       string            `yaml:"updateStrategy,omitempty"`
	MinReadySeconds      int32             `yaml:"minReadySeconds,omitempty"`
	RevisionHistoryLimit *int32            `yaml:"revisionHistoryLimit,omitempty"`
}

func (*CompDaemonSet) Args

func (a *CompDaemonSet) Args() []string

func (*CompDaemonSet) ArgsExample

func (a *CompDaemonSet) ArgsExample() string

func (*CompDaemonSet) AvailableOperations

func (a *CompDaemonSet) AvailableOperations() map[generator.Operation][]string

func (*CompDaemonSet) ParseArgs

func (a *CompDaemonSet) ParseArgs(input string) (err error)

func (*CompDaemonSet) Type

func (g *CompDaemonSet) Type() string

type CompDeployment

type CompDeployment struct {
	GenericModel            `yaml:",inline"`
	Selector                map[string]string `yaml:"selector,omitempty"`
	Replicas                int               `yaml:"replicas,omitempty"`
	MinReadySeconds         int32             `yaml:"minReadySeconds,omitempty"`
	RevisionHistoryLimit    *int32            `yaml:"revisionHistoryLimit,omitempty"`
	ProgressDeadlineSeconds *int32            `yaml:"progressDeadlineSeconds,omitempty"`
}

func (*CompDeployment) Args

func (a *CompDeployment) Args() []string

func (*CompDeployment) ArgsExample

func (a *CompDeployment) ArgsExample() string

func (*CompDeployment) AvailableOperations

func (a *CompDeployment) AvailableOperations() map[generator.Operation][]string

func (*CompDeployment) ParseArgs

func (a *CompDeployment) ParseArgs(input string) (err error)

func (*CompDeployment) Type

func (a *CompDeployment) Type() string

type CompJob

type CompJob struct {
	GenericModel            `yaml:",inline"`
	Selector                map[string]string `yaml:"selector,omitempty"`
	Parallelism             *int32            `yaml:"parallelism,omitempty"`
	Completions             *int32            `yaml:"completions,omitempty"`
	ActiveDeadlineSeconds   *int64            `yaml:"activeDeadlineSeconds,omitempty"`
	BackoffLimit            *int32            `yaml:"backoffLimit,omitempty"`
	TTLSecondsAfterFinished *int32            `yaml:"ttlSecondsAfterFinished,omitempty"`
	CompletionMode          string            `yaml:"completionMode,omitempty"`
	Suspend                 *bool             `yaml:"suspend,omitempty"`
}

func (*CompJob) Args

func (a *CompJob) Args() []string

func (*CompJob) ArgsExample

func (a *CompJob) ArgsExample() string

func (*CompJob) AvailableOperations

func (a *CompJob) AvailableOperations() map[generator.Operation][]string

func (*CompJob) ParseArgs

func (a *CompJob) ParseArgs(input string) (err error)

func (*CompJob) Type

func (g *CompJob) Type() string

type CompReplicaSet

type CompReplicaSet struct {
	GenericModel    `yaml:",inline"`
	Selector        map[string]string `yaml:"selector,omitempty"`
	Replicas        int               `yaml:"replicas,omitempty"`
	MinReadySeconds int32             `yaml:"minReadySeconds,omitempty"`
}

func (*CompReplicaSet) Args

func (a *CompReplicaSet) Args() []string

func (*CompReplicaSet) ArgsExample

func (a *CompReplicaSet) ArgsExample() string

func (*CompReplicaSet) AvailableOperations

func (a *CompReplicaSet) AvailableOperations() map[generator.Operation][]string

func (*CompReplicaSet) ParseArgs

func (a *CompReplicaSet) ParseArgs(input string) (err error)

func (*CompReplicaSet) Type

func (g *CompReplicaSet) Type() string

type CompStatefulSet

type CompStatefulSet struct {
	GenericModel         `yaml:",inline"`
	Selector             map[string]string `yaml:"selector,omitempty"`
	Replicas             int               `yaml:"replicas,omitempty"`
	UpdateStrategy       string            `yaml:"updateStrategy,omitempty"`
	PodManagementPolicy  string            `yaml:"podManagementPolicy,omitempty"`
	MinReadySeconds      int32             `yaml:"minReadySeconds,omitempty"`
	RevisionHistoryLimit *int32            `yaml:"revisionHistoryLimit,omitempty"`
}

func (*CompStatefulSet) Args

func (a *CompStatefulSet) Args() []string

func (*CompStatefulSet) ArgsExample

func (a *CompStatefulSet) ArgsExample() string

func (*CompStatefulSet) AvailableOperations

func (a *CompStatefulSet) AvailableOperations() map[generator.Operation][]string

func (*CompStatefulSet) ParseArgs

func (a *CompStatefulSet) ParseArgs(input string) (err error)

func (*CompStatefulSet) Type

func (g *CompStatefulSet) Type() string

type Component

type Component struct {
	GenericModel `json:",inline"`
	Common       `yaml:",inline"`
	WorkloadType WorkloadType `yaml:"type"`

	Deployment  *CompDeployment  `yaml:"deployment,omitempty"`
	DaemonSet   *CompDaemonSet   `yaml:"daemonSet,omitempty"`
	StatefulSet *CompStatefulSet `yaml:"statefulSet,omitempty"`
	ReplicaSet  *CompReplicaSet  `yaml:"replicaSet,omitempty"`
	Job         *CompJob         `yaml:"job,omitempty"`
	CronJob     *CompCronJob     `yaml:"cronJob,omitempty"`

	HPA *HPA `yaml:"hpa,omitempty"`
}

func (*Component) Args

func (c *Component) Args() []string

func (*Component) Create

func (c *Component) Create(scanner *bufio.Scanner) generator.OperationHolder

列出可选类型,并选择

func (*Component) General

func (c *Component) General(scanner *bufio.Scanner) generator.GeneralCommand

func (*Component) List

func (c *Component) List(typ string) (result []generator.OperationHolder)

func (*Component) Modify

func (c *Component) Modify(scanner *bufio.Scanner) generator.OperationHolder

func (*Component) NextOperation

func (c *Component) NextOperation(scanner *bufio.Scanner) []generator.Operation

func (*Component) ParseArgs

func (c *Component) ParseArgs(input string) error

func (*Component) Remove

func (c *Component) Remove(scanner *bufio.Scanner)

func (*Component) String

func (c *Component) String() string

func (*Component) Type

func (c *Component) Type() string

type ConfigMap

type ConfigMap struct {
	GenericModel `yaml:",inline"`
}

func (*ConfigMap) String

func (c *ConfigMap) String() string

func (*ConfigMap) Type

func (c *ConfigMap) Type() string

type GenericModel

type GenericModel struct {
	Base             `yaml:",inline"`
	DefaultNamespace string `yaml:"namespace,omitempty"`
}

func (*GenericModel) Args

func (g *GenericModel) Args() []string

func (*GenericModel) ArgsExample

func (g *GenericModel) ArgsExample() string

func (*GenericModel) Create

func (g *GenericModel) Create(scanner *bufio.Scanner) generator.OperationHolder

列出可选类型,并选择

func (*GenericModel) General

func (g *GenericModel) General(scanner *bufio.Scanner) generator.GeneralCommand

func (*GenericModel) Modify

func (g *GenericModel) Modify(scanner *bufio.Scanner) generator.OperationHolder

func (*GenericModel) NextOperation

func (g *GenericModel) NextOperation(scanner *bufio.Scanner) []generator.Operation

func (*GenericModel) ParseArgs

func (g *GenericModel) ParseArgs(input string) error

func (*GenericModel) Remove

func (g *GenericModel) Remove(scanner *bufio.Scanner)

func (*GenericModel) String

func (g *GenericModel) String() string

func (*GenericModel) Type

func (g *GenericModel) Type() string

type HPA

type HPA struct {
	GenericModel `yaml:",inline"`
}

func (*HPA) Args

func (h *HPA) Args() []string

func (*HPA) Type

func (h *HPA) Type() string

type Ingress

type Ingress struct {
	GenericModel `yaml:",inline"`
}

func (*Ingress) String

func (i *Ingress) String() string

func (*Ingress) Type

func (i *Ingress) Type() string

type Role

type Role struct {
	GenericModel `yaml:",inline"`
}

func (*Role) String

func (r *Role) String() string

func (*Role) Type

func (r *Role) Type() string

type RoleBinding

type RoleBinding struct {
	GenericModel `yaml:",inline"`
}

func (*RoleBinding) String

func (b *RoleBinding) String() string

func (*RoleBinding) Type

func (b *RoleBinding) Type() string

type Secret

type Secret struct {
	GenericModel `yaml:",inline"`
}

func (*Secret) String

func (s *Secret) String() string

func (*Secret) Type

func (s *Secret) Type() string

type Service

type Service struct {
	GenericModel `yaml:",inline"`
}

func (*Service) String

func (s *Service) String() string

func (*Service) Type

func (s *Service) Type() string

type ServiceAccount

type ServiceAccount struct {
	GenericModel `yaml:",inline"`
}

func (*ServiceAccount) String

func (a *ServiceAccount) String() string

func (*ServiceAccount) Type

func (a *ServiceAccount) Type() string

type WorkloadType

type WorkloadType string
const (
	WT_Deployment  WorkloadType = "deployment"
	WT_DaemonSet   WorkloadType = "daemonset"
	WT_StatefulSet WorkloadType = "statefulset"
	WT_ReplicaSet  WorkloadType = "replicaset"
	WT_Job         WorkloadType = "job"
	WT_CronJob     WorkloadType = "cronjob"
)

Jump to

Keyboard shortcuts

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