Documentation ¶
Index ¶
- Constants
- Variables
- type App
- func (a *App) Args() []string
- func (a *App) ArgsExample() string
- func (a *App) Build() *manifest.AppManifests
- func (a *App) Create(scanner *bufio.Scanner) generator.OperationHolder
- func (a *App) General(scanner *bufio.Scanner) generator.GeneralCommand
- func (a *App) List(typ string) (result []generator.OperationHolder)
- func (a *App) Modify(scanner *bufio.Scanner) generator.OperationHolder
- func (a *App) NextOperation(scanner *bufio.Scanner) []generator.Operation
- func (a *App) ParseArgs(input string) error
- func (a *App) Remove(scanner *bufio.Scanner)
- func (a *App) String() string
- func (a *App) Type() string
- type Base
- type ClusterRole
- type ClusterRoleBinding
- type Common
- type CompCronJob
- type CompDaemonSet
- type CompDeployment
- type CompJob
- type CompReplicaSet
- type CompStatefulSet
- type Component
- func (c *Component) Args() []string
- func (c *Component) Create(scanner *bufio.Scanner) generator.OperationHolder
- func (c *Component) General(scanner *bufio.Scanner) generator.GeneralCommand
- func (c *Component) List(typ string) (result []generator.OperationHolder)
- func (c *Component) Modify(scanner *bufio.Scanner) generator.OperationHolder
- func (c *Component) NextOperation(scanner *bufio.Scanner) []generator.Operation
- func (c *Component) ParseArgs(input string) error
- func (c *Component) Remove(scanner *bufio.Scanner)
- func (c *Component) String() string
- func (c *Component) Type() string
- type ConfigMap
- type GenericModel
- func (g *GenericModel) Args() []string
- func (g *GenericModel) ArgsExample() string
- func (g *GenericModel) Create(scanner *bufio.Scanner) generator.OperationHolder
- func (g *GenericModel) General(scanner *bufio.Scanner) generator.GeneralCommand
- func (g *GenericModel) Modify(scanner *bufio.Scanner) generator.OperationHolder
- func (g *GenericModel) NextOperation(scanner *bufio.Scanner) []generator.Operation
- func (g *GenericModel) ParseArgs(input string) error
- func (g *GenericModel) Remove(scanner *bufio.Scanner)
- func (g *GenericModel) String() string
- func (g *GenericModel) Type() string
- type HPA
- type Ingress
- type Role
- type RoleBinding
- type Secret
- type Service
- type ServiceAccount
- type WorkloadType
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 ¶
View Source
var ( WorkloadTypes = []WorkloadType{ WT_Deployment, WT_DaemonSet, WT_StatefulSet, WT_ReplicaSet, WT_Job, WT_CronJob, } )
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) ArgsExample ¶
func (*App) Build ¶
func (a *App) Build() *manifest.AppManifests
func (*App) Create ¶
func (a *App) Create(scanner *bufio.Scanner) generator.OperationHolder
列出可选类型,并选择
func (*App) NextOperation ¶
列出可选类型,并选择
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) ArgsExample ¶
func (*CompJob) AvailableOperations ¶
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) Create ¶
func (c *Component) Create(scanner *bufio.Scanner) generator.OperationHolder
列出可选类型,并选择
func (*Component) General ¶
func (c *Component) General(scanner *bufio.Scanner) generator.GeneralCommand
func (*Component) Modify ¶
func (c *Component) Modify(scanner *bufio.Scanner) generator.OperationHolder
func (*Component) NextOperation ¶
type ConfigMap ¶
type ConfigMap struct {
GenericModel `yaml:",inline"`
}
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"`
}
type Ingress ¶
type Ingress struct {
GenericModel `yaml:",inline"`
}
type Role ¶
type Role struct {
GenericModel `yaml:",inline"`
}
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"`
}
type Service ¶
type Service struct {
GenericModel `yaml:",inline"`
}
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" )
Click to show internal directories.
Click to hide internal directories.