Documentation ¶
Index ¶
- Constants
- Variables
- func InitConfig(cmd *cobra.Command) error
- type ChoreoConfig
- func (r *ChoreoConfig) AddFlags(flags *pflag.FlagSet)
- func (r *ChoreoConfig) ToBranch() string
- func (r *ChoreoConfig) ToBranchClient() (branchclient.Client, error)
- func (r *ChoreoConfig) ToChoreoClient() (choreoclient.Client, error)
- func (r *ChoreoConfig) ToConfig() *config.Config
- func (r *ChoreoConfig) ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)
- func (r *ChoreoConfig) ToProxy() types.NamespacedName
- func (r *ChoreoConfig) ToResourceClient() (resourceclient.Client, error)
- func (r *ChoreoConfig) ToResourceMapper() (resourcemapper.Mapper, error)
- func (r *ChoreoConfig) ToRunnerClient() (runnerclient.Client, error)
- func (r *ChoreoConfig) ToSnapshotClient() (snapshotclient.Client, error)
- type ChoreoFlags
- type ClientFlags
- type ClientGetter
- type ConfigFn
- type FileNameFlags
- type IOStreams
- type NoopClientGetter
- func (NoopClientGetter) ToBranch() string
- func (NoopClientGetter) ToBranchClient() (branchclient.Client, error)
- func (NoopClientGetter) ToChoreoClient() (choreoclient.Client, error)
- func (NoopClientGetter) ToConfig() *config.Config
- func (NoopClientGetter) ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)
- func (NoopClientGetter) ToProxy() types.NamespacedName
- func (NoopClientGetter) ToResourceClient() (resourceclient.Client, error)
- func (NoopClientGetter) ToResourceMapper() (resourcemapper.Mapper, error)
- func (NoopClientGetter) ToRunnerClient() (runnerclient.Client, error)
- func (NoopClientGetter) ToSnapshotClient() (snapshotclient.Client, error)
- type ResourceClientFn
- type ResourceFlags
- type ResourceMapperFn
- type ResourceOutputFlags
- type RunOutputFlags
- type RunResultFlags
- type ServerFlags
Constants ¶
const ( FlagOutputFormat = "output" FlagShowManagedFields = "show-managed-fields" )
const ( FlagShowChoreoAPIs = "show-choreo-apis" FlagShowDiffDetails = "show-diff-details" )
const (
FlagNamespace = "namespace"
)
const (
FlagResultOutputFormat = "result-output-format"
)
const (
FlagServerName = "servername"
)
Variables ¶
var (
SupportedResultOutputFormats = sets.New[string]().Insert([]string{"reconciler", "resource", "raw"}...)
)
Functions ¶
func InitConfig ¶
InitConfig reads in config file and ENV variables if set.
Types ¶
type ChoreoConfig ¶ added in v0.0.15
type ChoreoConfig struct { ChoreoFlags *ChoreoFlags ClientFlags *ClientFlags ServerFlags *ServerFlags }
func NewChoreoConfig ¶ added in v0.0.15
func NewChoreoConfig() *ChoreoConfig
func (*ChoreoConfig) AddFlags ¶ added in v0.0.15
func (r *ChoreoConfig) AddFlags(flags *pflag.FlagSet)
func (*ChoreoConfig) ToBranch ¶ added in v0.0.15
func (r *ChoreoConfig) ToBranch() string
func (*ChoreoConfig) ToBranchClient ¶ added in v0.0.15
func (r *ChoreoConfig) ToBranchClient() (branchclient.Client, error)
func (*ChoreoConfig) ToChoreoClient ¶ added in v0.0.15
func (r *ChoreoConfig) ToChoreoClient() (choreoclient.Client, error)
func (*ChoreoConfig) ToConfig ¶ added in v0.0.15
func (r *ChoreoConfig) ToConfig() *config.Config
func (*ChoreoConfig) ToDiscoveryClient ¶ added in v0.0.15
func (r *ChoreoConfig) ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)
func (*ChoreoConfig) ToProxy ¶ added in v0.0.15
func (r *ChoreoConfig) ToProxy() types.NamespacedName
func (*ChoreoConfig) ToResourceClient ¶ added in v0.0.15
func (r *ChoreoConfig) ToResourceClient() (resourceclient.Client, error)
func (*ChoreoConfig) ToResourceMapper ¶ added in v0.0.15
func (r *ChoreoConfig) ToResourceMapper() (resourcemapper.Mapper, error)
func (*ChoreoConfig) ToRunnerClient ¶ added in v0.0.15
func (r *ChoreoConfig) ToRunnerClient() (runnerclient.Client, error)
func (*ChoreoConfig) ToSnapshotClient ¶ added in v0.0.15
func (r *ChoreoConfig) ToSnapshotClient() (snapshotclient.Client, error)
type ChoreoFlags ¶ added in v0.0.15
func NewChoreoFlags ¶ added in v0.0.15
func NewChoreoFlags() *ChoreoFlags
NewConfigFlags returns ConfigFlags with default values set
func (*ChoreoFlags) AddFlags ¶ added in v0.0.15
func (r *ChoreoFlags) AddFlags(flags *pflag.FlagSet)
AddFlags binds file name flags to a given flagset
type ClientFlags ¶ added in v0.0.15
type ClientFlags struct { Branch *string Proxy *string MaxRcvMsg *int Timeout *int CacheDir *string }
ResourceFlags are flags for generic resources.
func NewClientFlags ¶ added in v0.0.15
func NewClientFlags() *ClientFlags
func (*ClientFlags) AddFlags ¶ added in v0.0.15
func (r *ClientFlags) AddFlags(flags *pflag.FlagSet)
AddFlags binds file name flags to a given flagset
type ClientGetter ¶
type ClientGetter interface { // ToConfig returns config ToConfig() *config.Config // ToDiscoveryClient returns discovery client ToChoreoClient() (choreoclient.Client, error) // ToDiscoveryClient returns discovery client ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error) // ToResourceMapper returns a restmapper ToResourceMapper() (resourcemapper.Mapper, error) // ToResourceClient returns resource client ToResourceClient() (resourceclient.Client, error) // ToBranchClient returns branch client ToBranchClient() (branchclient.Client, error) // ToRunnerClient returns runner client ToRunnerClient() (runnerclient.Client, error) // TosnapshotClient returns snapshot client ToSnapshotClient() (snapshotclient.Client, error) // Branch() ToBranch() string // Proxy() ToProxy() types.NamespacedName }
type FileNameFlags ¶ added in v0.0.15
FileNameFlags are flags for processing files. Usage of this struct by itself is discouraged. These flags are composed by ResourceBuilderFlags which should be used instead.
func NewFileNameFlags ¶ added in v0.0.15
func NewFileNameFlags(usage string) *FileNameFlags
func (*FileNameFlags) AddFlags ¶ added in v0.0.15
func (o *FileNameFlags) AddFlags(flags *pflag.FlagSet)
AddFlags binds file name flags to a given flagset
type NoopClientGetter ¶ added in v0.0.15
type NoopClientGetter struct{}
func (NoopClientGetter) ToBranch ¶ added in v0.0.15
func (NoopClientGetter) ToBranch() string
Branch()
func (NoopClientGetter) ToBranchClient ¶ added in v0.0.15
func (NoopClientGetter) ToBranchClient() (branchclient.Client, error)
ToBranchClient returns branch client
func (NoopClientGetter) ToChoreoClient ¶ added in v0.0.15
func (NoopClientGetter) ToChoreoClient() (choreoclient.Client, error)
ToDiscoveryClient returns discovery client
func (NoopClientGetter) ToConfig ¶ added in v0.0.15
func (NoopClientGetter) ToConfig() *config.Config
func (NoopClientGetter) ToDiscoveryClient ¶ added in v0.0.15
func (NoopClientGetter) ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)
ToDiscoveryClient returns discovery client
func (NoopClientGetter) ToProxy ¶ added in v0.0.15
func (NoopClientGetter) ToProxy() types.NamespacedName
Proxy()
func (NoopClientGetter) ToResourceClient ¶ added in v0.0.15
func (NoopClientGetter) ToResourceClient() (resourceclient.Client, error)
ToResourceClient returns resource client
func (NoopClientGetter) ToResourceMapper ¶ added in v0.0.15
func (NoopClientGetter) ToResourceMapper() (resourcemapper.Mapper, error)
ToResourceMapper returns a restmapper
func (NoopClientGetter) ToRunnerClient ¶ added in v0.0.15
func (NoopClientGetter) ToRunnerClient() (runnerclient.Client, error)
ToRunnerClient returns runner client
func (NoopClientGetter) ToSnapshotClient ¶ added in v0.0.15
func (NoopClientGetter) ToSnapshotClient() (snapshotclient.Client, error)
TosnapshotClient returns snapshot client
type ResourceClientFn ¶ added in v0.0.15
type ResourceClientFn func() (resourceclient.Client, error)
type ResourceFlags ¶ added in v0.0.15
type ResourceFlags struct {
Namespace *string
}
ResourceFlags are flags for generic resources.
func NewResourceFlags ¶ added in v0.0.15
func NewResourceFlags() *ResourceFlags
func (*ResourceFlags) AddFlags ¶ added in v0.0.15
func (r *ResourceFlags) AddFlags(flags *pflag.FlagSet)
AddFlags binds file name flags to a given flagset
type ResourceMapperFn ¶ added in v0.0.15
type ResourceMapperFn func() (resourcemapper.Mapper, error)
type ResourceOutputFlags ¶ added in v0.0.15
ResourceFlags are flags for generic resources.
func NewResourceOutputFlags ¶ added in v0.0.15
func NewResourceOutputFlags() *ResourceOutputFlags
func (*ResourceOutputFlags) AddFlags ¶ added in v0.0.15
func (r *ResourceOutputFlags) AddFlags(flags *pflag.FlagSet)
AddFlags binds file name flags to a given flagset
type RunOutputFlags ¶ added in v0.0.15
ResourceFlags are flags for generic resources.
func NewRunOutputFlags ¶ added in v0.0.15
func NewRunOutputFlags() *RunOutputFlags
func (*RunOutputFlags) AddFlags ¶ added in v0.0.15
func (r *RunOutputFlags) AddFlags(flags *pflag.FlagSet)
AddFlags binds file name flags to a given flagset
type RunResultFlags ¶ added in v0.0.15
type RunResultFlags struct {
ResultOutputFormat *string
}
ResourceFlags are flags for generic resources.
func NewRunResultFlags ¶ added in v0.0.15
func NewRunResultFlags() *RunResultFlags
func (*RunResultFlags) AddFlags ¶ added in v0.0.15
func (r *RunResultFlags) AddFlags(flags *pflag.FlagSet)
AddFlags binds file name flags to a given flagset
type ServerFlags ¶ added in v0.0.15
type ServerFlags struct { ServerName *string CRDPath *string DBPath *string ReconcilerPath *string LibraryPath *string PostProcessingPath *string OutputPath *string InputPath *string RefsPath *string SchemaPath *string RunningConfigsPath *string InternalReconcilers *bool SDC *bool }
ResourceFlags are flags for generic resources.
func NewServerFlags ¶ added in v0.0.15
func NewServerFlags() *ServerFlags
func (*ServerFlags) AddFlags ¶ added in v0.0.15
func (r *ServerFlags) AddFlags(flags *pflag.FlagSet)
AddFlags binds file name flags to a given flagset