cli

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewApplyCmd

func NewApplyCmd() *cobra.Command

NewApplyCmd - mock subcommand

func NewConfigChangeCmd

func NewConfigChangeCmd() *cobra.Command

NewConfigChangeCmd - responsible for changing the values of the inspr's viper config

func NewDeleteCmd

func NewDeleteCmd() *cobra.Command

NewDeleteCmd creates delete command for Inspr CLI

func NewDescribeCmd

func NewDescribeCmd() *cobra.Command

NewDescribeCmd creates describe command for Inspr CLI

func NewGetCmd

func NewGetCmd() *cobra.Command

NewGetCmd creates get command for Inspr CLI

func NewInsprCommand

func NewInsprCommand(out, err io.Writer, version string) *cobra.Command

NewInsprCommand - returns a root command associated with inspr cli

func NewListConfig

func NewListConfig() *cobra.Command

NewListConfig - config subcommand that shows all existent variables in the config

Types

type ApplyFactory

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

ApplyFactory holds a dictionary that maps all the pairs (kind, apiVersion - encapsulated in the Component Type) to a cobra run method

func GetFactory

func GetFactory() *ApplyFactory

GetFactory returns the ApllyFactory singleton. If it doesn't exist, create one

func (*ApplyFactory) GetRunMethod

func (af *ApplyFactory) GetRunMethod(component meta.Component) (RunMethod, error)

GetRunMethod returns the runMethod registered for the given component. If the component is not found in the dictionary, it returns a ierror

func (*ApplyFactory) Subscribe

func (af *ApplyFactory) Subscribe(component meta.Component, method RunMethod) error

Subscribe adds to the apply factory dictonary the given component with the value equals to the given runMethod

type RunMethod

type RunMethod func(b []byte, out io.Writer) error

RunMethod defines the method that will run for the component

func NewApplyApp

func NewApplyApp() RunMethod

NewApplyApp receives a controller AppInterface and calls it's methods depending on the flags values

func NewApplyChannel

func NewApplyChannel() RunMethod

NewApplyChannel receives a controller ChannelInterface and calls it's methods depending on the flags values

func NewApplyChannelType

func NewApplyChannelType() RunMethod

NewApplyChannelType receives a controller ChannelTypeInterface and calls it's methods depending on the flags values

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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