command

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthCheckCommand

type AuthCheckCommand struct {
	CommandType DaemonCommandType
	ClientStack string

	KubeConfigContent string   `json:"kubeConfig" yaml:"kubeConfig"`
	NameSpace         string   `json:"namespace" yaml:"namespace"`
	NeedChecks        []string `json:"needChecks" yaml:"needChecks"`
}

type BaseCommand

type BaseCommand struct {
	CommandType DaemonCommandType
	ClientStack string
	ClientPath  string
}

type BaseResponse

type BaseResponse struct {
	// zero for success
	Status int    `json:"status"`
	Msg    string `json:"msg"`
	Data   []byte `json:"data"`
}

type CheckClusterStatusCommand

type CheckClusterStatusCommand struct {
	CommandType DaemonCommandType
	ClientStack string

	KubeConfigContent string `json:"kubeConfig"`
}

type DaemonCommandType

type DaemonCommandType string
const (
	StartPortForward      DaemonCommandType = "StartPortForward"
	StopPortForward       DaemonCommandType = "StopPortForward"
	StopDaemonServer      DaemonCommandType = "StopDaemonServer"
	RestartDaemonServer   DaemonCommandType = "RestartDaemonServer"
	GetDaemonServerInfo   DaemonCommandType = "GetDaemonServerInfo"
	GetDaemonServerStatus DaemonCommandType = "GetDaemonServerStatus"
	GetApplicationMeta    DaemonCommandType = "GetApplicationMeta"
	GetApplicationMetas   DaemonCommandType = "GetApplicationMetas"
	GetResourceInfo       DaemonCommandType = "GetResourceInfo"
	UpdateApplicationMeta DaemonCommandType = "UpdateApplicationMeta"
	KubeconfigOperation   DaemonCommandType = "KubeconfigOperationCommand"
	CheckClusterStatus    DaemonCommandType = "CheckClusterStatus"
	FlushDirMappingCache  DaemonCommandType = "FlushDirMappingCache"
	VPNOperate            DaemonCommandType = "VPNOperate"
	SudoVPNOperate        DaemonCommandType = "SudoVPNOperate"
	VPNStatus             DaemonCommandType = "VPNStatus"
	SudoVPNStatus         DaemonCommandType = "SudoVPNStatus"
	AuthCheck             DaemonCommandType = "AuthCheck"

	PREVIEW_VERSION = 0
	SUCCESS         = 200
	FAIL            = 400
	INTERNAL_FAIL   = 500
)

func ParseBaseCommand

func ParseBaseCommand(bys []byte) (DaemonCommandType, string, error)

type GetApplicationMetaCommand

type GetApplicationMetaCommand struct {
	CommandType DaemonCommandType
	ClientStack string

	NameSpace         string `json:"nameSpace"`
	AppName           string `json:"appName"`
	KubeConfigContent string `json:"kubeConfig"`
}

type GetApplicationMetasCommand

type GetApplicationMetasCommand struct {
	CommandType DaemonCommandType
	ClientStack string

	NameSpace         string `json:"nameSpace"`
	KubeConfigContent string `json:"kubeConfig"`
}

type GetResourceInfoCommand

type GetResourceInfoCommand struct {
	CommandType DaemonCommandType
	ClientStack string

	KubeConfig   string            `json:"kubeConfig" yaml:"kubeConfig"`
	Namespace    string            `json:"namespace" yaml:"namespace"`
	AppName      string            `json:"appName" yaml:"appName"`
	Resource     string            `json:"resource" yaml:"resource"`
	ResourceName string            `json:"resourceName" yaml:"resourceName"`
	Label        map[string]string `json:"label" yaml:"label"`
	ShowHidden   bool              `json:"showHidden" yaml:"showHidden"`
}

type InvalidCacheCommand

type InvalidCacheCommand struct {
	CommandType DaemonCommandType
	ClientStack string

	Namespace string `json:"namespace"`
	Nid       string `json:"nid"`
	AppName   string `json:"appName"`
}

type KubeconfigOperationCommand

type KubeconfigOperationCommand struct {
	CommandType DaemonCommandType
	ClientStack string

	KubeConfigBytes []byte    `json:"kubeConfigBytes" yaml:"kubeConfigBytes"`
	Namespace       string    `json:"namespace" yaml:"namespace"`
	Operation       Operation `json:"operation" yaml:"operation"`
}

type Operation

type Operation string
const (
	OperationAdd    Operation = "add"
	OperationRemove Operation = "remove"
)

type PortForwardCommand

type PortForwardCommand struct {
	CommandType DaemonCommandType
	ClientStack string

	NameSpace       string            `json:"nameSpace"`
	AppName         string            `json:"appName"`
	Service         string            `json:"service"`
	ServiceType     string            `json:"serviceType"`
	PodName         string            `json:"podName"`
	LocalPort       int               `json:"localPort"`
	RemotePort      int               `json:"remotePort"`
	Role            string            `json:"role"`
	Nid             string            `json:"nid"`
	Labels          map[string]string `json:"labels"`
	OwnerKind       string            `json:"ownerKind"`
	OwnerApiVersion string            `json:"ownerApiVersion"`
	OwnerName       string            `json:"ownerName"`
}

type UpdateApplicationMetaCommand

type UpdateApplicationMetaCommand struct {
	CommandType DaemonCommandType
	ClientStack string

	KubeConfig string     `json:"kubeConfig" yaml:"kubeConfig"`
	Namespace  string     `json:"namespace" yaml:"namespace"`
	SecretName string     `json:"secretName" yaml:"secretName"`
	Secret     *v1.Secret `json:"secret" yaml:"secret"`
}

type VPNOperateCommand

type VPNOperateCommand struct {
	CommandType DaemonCommandType
	ClientStack string

	KubeConfig string       `json:"kubeConfig" yaml:"kubeConfig"`
	Namespace  string       `json:"namespace" yaml:"namespace"`
	Resource   string       `json:"resource" yaml:"resource"`
	Action     VPNOperation `json:"operation" yaml:"operation"`
}

type VPNOperation

type VPNOperation string
const (
	Connect    VPNOperation = "connect"
	DisConnect VPNOperation = "disConnect"
	Reconnect  VPNOperation = "reconnect"
	Status     VPNOperation = "status"
)

Jump to

Keyboard shortcuts

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