cli

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllsHandler

func GetAllsHandler(rootCtx RootContext, cmdCtx GetAllHandlerContext) ([]resource.Resource, []error)

func GetKindHandler

func GetKindHandler(kind schema.Kind, rootCtx RootContext, cmdCtx GetKindHandlerContext) ([]resource.Resource, []error)

func IsDirectory

func IsDirectory(path string) (bool, error)

IsDirectory checks if the given path is a directory.

func IsKindIdentifiedByNameAndVCluster

func IsKindIdentifiedByNameAndVCluster(res schema.Kind) bool

func IsKindInterceptor

func IsKindInterceptor(res schema.Kind) bool

func LoadResourcesFromFiles

func LoadResourcesFromFiles(filePaths []string, strict, recursiveFolder bool) ([]resource.Resource, error)

LoadResourcesFromFiles loads resources from multiple file paths.

func ResourceForPath

func ResourceForPath(path string, strict, recursiveFolder bool) ([]resource.Resource, error)

ResourceForPath loads resources from a single path (file or directory).

Types

type ApplyHandler

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

func NewApplyHandler

func NewApplyHandler(rootCtx RootContext) *ApplyHandler

func (*ApplyHandler) Handle

func (h *ApplyHandler) Handle(cmdCtx ApplyHandlerContext) ([]ApplyResult, error)

type ApplyHandlerContext

type ApplyHandlerContext struct {
	FilePaths       []string
	RecursiveFolder bool
	DryRun          bool
	PrintDiff       bool
	MaxParallel     int
	StateEnabled    bool
	StateRef        *model.State
}

type ApplyResult

type ApplyResult struct {
	Resource     resource.Resource
	UpsertResult client.Result
	Err          error
}

type DeleteByVClusterAndNameHandlerContext

type DeleteByVClusterAndNameHandlerContext struct {
	Name          string
	VCluster      string
	IgnoreMissing bool // don't fail if resource is already missing
	DryRun        bool
	StateEnabled  bool
	StateRef      *model.State
}

type DeleteFileHandlerContext

type DeleteFileHandlerContext struct {
	FilePaths       []string
	RecursiveFolder bool
	IgnoreMissing   bool // don't fail if resource is already missing
	DryRun          bool
	StateEnabled    bool
	StateRef        *model.State
}

type DeleteHandler

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

func NewDeleteHandler

func NewDeleteHandler(rootCtx RootContext) *DeleteHandler

func (*DeleteHandler) HandleByVClusterAndName

func (h *DeleteHandler) HandleByVClusterAndName(kind schema.Kind, cmdCtx DeleteByVClusterAndNameHandlerContext) error

func (*DeleteHandler) HandleFromFiles

func (h *DeleteHandler) HandleFromFiles(cmdCtx DeleteFileHandlerContext) ([]DeleteResult, error)

func (*DeleteHandler) HandleFromList

func (h *DeleteHandler) HandleFromList(resources []resource.Resource, stateRef *model.State, ignoreMissing, dryRun, debug bool) ([]DeleteResult, error)

func (*DeleteHandler) HandleInterceptor

func (h *DeleteHandler) HandleInterceptor(kind schema.Kind, cmdCtx DeleteInterceptorHandlerContext) error

func (*DeleteHandler) HandleKind

func (h *DeleteHandler) HandleKind(kind schema.Kind, cmdCtx DeleteKindHandlerContext) error

type DeleteInterceptorHandlerContext

type DeleteInterceptorHandlerContext struct {
	Name          string
	VCluster      string
	Group         string
	Username      string
	IgnoreMissing bool // don't fail if resource is already missing
	DryRun        bool
	StateEnabled  bool
	StateRef      *model.State
}

type DeleteKindHandlerContext

type DeleteKindHandlerContext struct {
	Args                 []string
	ParentFlagValue      []*string
	ParentQueryFlagValue []*string
	IgnoreMissing        bool // don't fail if resource is already missing
	DryRun               bool
	StateEnabled         bool
	StateRef             *model.State
}

type DeleteResult

type DeleteResult struct {
	Resource resource.Resource
	Err      error
}

type GetAllHandlerContext

type GetAllHandlerContext struct {
	OnlyGateway *bool
	OnlyConsole *bool
}

type GetKindHandlerContext

type GetKindHandlerContext struct {
	Args                 []string
	ParentFlagValue      []*string
	ParentQueryFlagValue []*string
	QueryParams          map[string]string
}

type RootContext

type RootContext struct {
	Catalog schema.Catalog
	Strict  bool
	Debug   *bool
	// contains filtered or unexported fields
}

func NewRootContext

func NewRootContext(
	consoleAPIClient *client.Client,
	consoleAPIClientError error,
	gatewayAPIClient *client.GatewayClient,
	gatewayAPIClientError error,
	catalog schema.Catalog,
	strict bool,
	debug *bool,
) RootContext

func (*RootContext) ConsoleAPIClient

func (c *RootContext) ConsoleAPIClient() *client.Client

func (*RootContext) GatewayAPIClient

func (c *RootContext) GatewayAPIClient() *client.GatewayClient

Jump to

Keyboard shortcuts

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