zgctl

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlerConfig

type HandlerConfig struct {
	ZadigHost  string
	ZadigToken string
	HomeDir    string
	DB         *badger.DB
}

type KubeConfigData

type KubeConfigData struct {
	Path string `json:"path"`
}

type KubeconfigInfo

type KubeconfigInfo struct {
	KubeConfig KubeConfigData `json:"kubeconfig"`
}

type Router

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

func NewRouter

func NewRouter(cfg *RouterConfig) *Router

func (*Router) Inject

func (r *Router) Inject(router *gin.RouterGroup)

type RouterConfig

type RouterConfig struct {
	ZadigHost  string
	ZadigToken string
	HomeDir    string
	DB         *badger.DB
}

type SyncthingConfig

type SyncthingConfig struct {
	SyncDirPath    string
	SyncType       string
	LocalDeviceID  string
	RemoteDeviceID string
	RemoteAddr     string
	ListenAddr     string
}

type SyncthingScript

type SyncthingScript struct {
	SyncthingBin string
	ConfigDir    string
	DataDir      string
}

type ZgCtlConfig

type ZgCtlConfig struct {
	ZadigHost  string
	ZadigToken string
	HomeDir    string
	DB         *badger.DB
}

type ZgCtlHandler

type ZgCtlHandler interface {
	// StartDevMode is a gin handler that starts dev mode.
	StartDevMode(*gin.Context)

	// StopDevMode is a gin handler that stops dev mode.
	StopDevMode(*gin.Context)

	// DevImages is a gin handler that provides image list for dev mode.
	DevImages(*gin.Context)

	// ConfigKubeconfig is a gin handler that stores relations between env and kubeconfig.
	ConfigKubeconfig(*gin.Context)
}

func NewHandlers

func NewHandlers(cfg *HandlerConfig) ZgCtlHandler

type ZgCtler

type ZgCtler interface {
	// StartDevMode starts dev mode.
	StartDevMode(ctx context.Context, projectName, envName, serviceName, dataDir, devImage string) error

	// StopDevMode stops dev mode.
	StopDevMode(ctx context.Context, projectName, envName, serviceName string) error

	// DevImages provides image list for dev mode.
	DevImages() []string

	// ConfigKubeconfig stores relations between env and kubeconfig.
	ConfigKubeconfig(projectName, envName, kubeconfigPath string) error
}

func NewZgCtl

func NewZgCtl(cfg *ZgCtlConfig) ZgCtler

Jump to

Keyboard shortcuts

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