utils

package
v0.0.0-...-5299919 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalWithFormat

func MarshalWithFormat(content any, format OutputFormat) ([]byte, error)

func MustPolicyManagerForTest

func MustPolicyManagerForTest(t *testing.T, fakeClients *common.K8sClients) *policymanager.PolicyManager

Types

type Factory

type Factory interface {
	K8sClients() (*common.K8sClients, error)
	PolicyManager() (*policymanager.PolicyManager, error)
}

Factory encapsulates the common clients and structures which are needed for the execution of some command.

func NewFactory

func NewFactory(kubeConfigPath *string) Factory

type OutputFormat

type OutputFormat string
const (
	OutputFormatWide  OutputFormat = "wide"
	OutputFormatJSON  OutputFormat = "json"
	OutputFormatYAML  OutputFormat = "yaml"
	OutputFormatTable OutputFormat = ""
)

func ValidateAndReturnOutputFormat

func ValidateAndReturnOutputFormat(format string) (OutputFormat, error)

Jump to

Keyboard shortcuts

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