Documentation
¶
Index ¶
- Constants
- func AddContainer(cmd *cobra.Command, args []string) error
- func BuildContainer(cmd *cobra.Command, args []string) error
- func BuildPromise(cmd *cobra.Command, args []string) error
- func Command(name string, arg ...string) *exec.Cmd
- func Execute(version string)
- func HandlePluginCommand(pluginHandler PluginHandler, cmdArgs []string, minArgs int) error
- func InitCrossplanePromise(cmd *cobra.Command, args []string) error
- func InitFromTerraformModule(cmd *cobra.Command, args []string) error
- func InitHelmPromise(cmd *cobra.Command, args []string) error
- func InitPromise(cmd *cobra.Command, args []string) error
- func InitPromiseFromOperator(cmd *cobra.Command, args []string) error
- func RenderTree(promiseName string, fetcher ...Fetcher) error
- func UpdateAPI(cmd *cobra.Command, args []string) error
- func UpdateSelector(cmd *cobra.Command, args []string) error
- type CommandOverrideVerifier
- type DefaultPluginHandler
- type Fetcher
- type K8sQuerier
- func (q K8sQuerier) GVRForPromise(ctx context.Context, promiseName string) (*schema.GroupVersionResource, error)
- func (q K8sQuerier) GetKratixGVRs(ctx context.Context) ([]schema.GroupVersionResource, error)
- func (q K8sQuerier) GetRequests(ctx context.Context, gvr *schema.GroupVersionResource, promiseName string, ...) (*unstructured.UnstructuredList, error)
- type PathVerifier
- type PluginHandler
- type PluginListOptions
Constants ¶
const ( XRD_GROUP_ENV_VAR = "XRD_GROUP" XRD_VERSION_ENV_VAR = "XRD_VERSION" XRD_KIND_ENV_VAR = "XRD_KIND" )
const PluginPrefix = "kratix"
Variables ¶
This section is empty.
Functions ¶
func Command ¶ added in v0.9.1
Command returns an exec.Cmd configured with the provided executable path and arguments. It mirrors the helper used by kubectl to retain behaviour on Windows where LookPath may resolve executable extensions.
func HandlePluginCommand ¶ added in v0.9.1
func HandlePluginCommand(pluginHandler PluginHandler, cmdArgs []string, minArgs int) error
HandlePluginCommand receives a pluginHandler and command-line arguments and attempts to find a plugin executable on the PATH that satisfies the given arguments. If a matching plugin is found it is executed and this function does not return unless an error occurs.
func InitCrossplanePromise ¶ added in v0.5.0
func InitFromTerraformModule ¶ added in v0.5.0
func InitPromiseFromOperator ¶
func RenderTree ¶ added in v0.9.0
Types ¶
type CommandOverrideVerifier ¶ added in v0.9.1
type CommandOverrideVerifier struct {
// contains filtered or unexported fields
}
func (*CommandOverrideVerifier) Verify ¶ added in v0.9.1
func (v *CommandOverrideVerifier) Verify(path string) []error
type DefaultPluginHandler ¶ added in v0.9.1
type DefaultPluginHandler struct {
ValidPrefixes []string
}
DefaultPluginHandler implements PluginHandler
func NewDefaultPluginHandler ¶ added in v0.9.1
func NewDefaultPluginHandler(validPrefixes []string) *DefaultPluginHandler
NewDefaultPluginHandler instantiates the DefaultPluginHandler with a list of given filename prefixes used to identify valid plugin filenames.
type Fetcher ¶ added in v0.9.0
type Fetcher interface {
GVRForPromise(ctx context.Context, promiseName string) (gvr *schema.GroupVersionResource, err error)
GetRequests(ctx context.Context, gvr *schema.GroupVersionResource, promiseName string, selector string) (request *unstructured.UnstructuredList, err error)
GetKratixGVRs(ctx context.Context) ([]schema.GroupVersionResource, error)
}
type K8sQuerier ¶ added in v0.9.0
type K8sQuerier struct {
// contains filtered or unexported fields
}
func (K8sQuerier) GVRForPromise ¶ added in v0.9.0
func (q K8sQuerier) GVRForPromise(ctx context.Context, promiseName string) (*schema.GroupVersionResource, error)
func (K8sQuerier) GetKratixGVRs ¶ added in v0.9.0
func (q K8sQuerier) GetKratixGVRs(ctx context.Context) ([]schema.GroupVersionResource, error)
func (K8sQuerier) GetRequests ¶ added in v0.9.0
func (q K8sQuerier) GetRequests(ctx context.Context, gvr *schema.GroupVersionResource, promiseName string, selector string) (*unstructured.UnstructuredList, error)
type PathVerifier ¶ added in v0.9.1
type PluginHandler ¶ added in v0.9.1
type PluginHandler interface {
Lookup(filename string) (string, bool)
Execute(executablePath string, cmdArgs, environment []string) error
}
PluginHandler is capable of parsing command line arguments and performing executable filename lookups to search for valid plugin files, and execute found plugins.
type PluginListOptions ¶ added in v0.9.1
type PluginListOptions struct {
Verifier PathVerifier
PluginPaths []string
Out io.Writer
ErrOut io.Writer
}
func (*PluginListOptions) Complete ¶ added in v0.9.1
func (o *PluginListOptions) Complete(cmd *cobra.Command) error
func (*PluginListOptions) ListPlugins ¶ added in v0.9.1
func (o *PluginListOptions) ListPlugins() ([]string, []error)
func (*PluginListOptions) Run ¶ added in v0.9.1
func (o *PluginListOptions) Run() error
Source Files
¶
- add.go
- add_container.go
- build.go
- build_container.go
- build_promise.go
- crossplane.go
- init.go
- init_crossplane_promise.go
- init_helm_promise.go
- init_operator_promise.go
- init_promise.go
- init_tf_module_promise.go
- platform.go
- platform_get.go
- platform_get_resources.go
- plugin.go
- plugin_handler.go
- root.go
- update.go
- update_api.go
- update_dependencies.go
- update_destination_selector.go