Documentation ¶
Index ¶
- Variables
- func BuildTemplatePath(namespace, name string) string
- func DisableAuthCheck(cmd *cobra.Command) *cobra.Command
- func DisableEncryptionCheck(cmd *cobra.Command) *cobra.Command
- func ExecuteFileIterator(w io.Writer, log *logger.Logger, files []string, ...) error
- func IsAuthCheckEnabled(cmd *cobra.Command) bool
- func IsConfigEncryptionCheckEnabled(cmd *cobra.Command) bool
- func NewRequestInputIterators(cmd *cobra.Command, cfg *config.Config) (*flags.RequestInputIterators, error)
- func PrintResponseSize(l *logger.Logger, resp *http.Response, output []byte)
- func WithTemplateValue(factory *Factory) flags.GetOption
- func WithViewCompletion(flagName string, dataviewFunc func() (*dataview.DataView, error)) completion.Option
- type Browser
- type Factory
- func (f *Factory) CheckPostCommandError(err error) error
- func (f *Factory) CreateModeEnabled() error
- func (f *Factory) DeleteModeEnabled() error
- func (f *Factory) ExecuteOutputTemplate(output []byte, params OutputContext, ...) ([]byte, error)
- func (f *Factory) GetRequestHandler() (*request.RequestHandler, error)
- func (f *Factory) GetTenant() string
- func (f *Factory) GetViewProperties(cfg *config.Config, cmd *cobra.Command, output []byte) ([]string, error)
- func (f *Factory) GuessDataProperty(output gjson.Result) string
- func (f *Factory) ResolveTemplates(pattern string, withFullPath bool) ([]string, error)
- func (f *Factory) RunSequentiallyWithGenericWorkers(cmd *cobra.Command, iter iterator.Iterator, runFunc worker.Runner, ...) error
- func (f *Factory) RunWithGenericWorkers(cmd *cobra.Command, inputIterators *flags.RequestInputIterators, ...) error
- func (f *Factory) RunWithWorkers(client *c8y.Client, cmd *cobra.Command, req *c8y.RequestOptions, ...) error
- func (f *Factory) SetCommand(cmd *cobra.Command) *Factory
- func (f *Factory) UpdateModeEnabled() error
- func (f *Factory) WithTemplateCompletion(flagName string) completion.Option
- func (f *Factory) WithTemplateFlag(cmd *cobra.Command) flags.Option
- func (f *Factory) WriteOutput(output []byte, params OutputContext, ...) error
- func (f *Factory) WriteOutputWithRows(output []byte, params OutputContext, ...) (int, error)
- func (f *Factory) WriteOutputWithoutPropertyGuess(output []byte, params OutputContext) error
- type FileIteratorOptions
- type OutputContext
- type RandomRange
- type TemplatePathResolver
- type TestBrowser
Constants ¶
This section is empty.
Variables ¶
View Source
var NamespaceSeparator = "::"
Functions ¶
func BuildTemplatePath ¶ added in v2.30.0
func DisableEncryptionCheck ¶
DisableEncryptionCheck disable encryption check when reading the configuration
func ExecuteFileIterator ¶ added in v2.33.0
func IsAuthCheckEnabled ¶
func IsConfigEncryptionCheckEnabled ¶
IsConfigEncryptionCheckEnabled check if the encryption in the configuration should be validated or not
func NewRequestInputIterators ¶
func NewRequestInputIterators(cmd *cobra.Command, cfg *config.Config) (*flags.RequestInputIterators, error)
NewRequestInputIterators create a request iterator based on pipe line configuration
func PrintResponseSize ¶ added in v2.41.0
func WithTemplateValue ¶
WithTemplateValue get the template value using the path resolver controlled by the configuration
func WithViewCompletion ¶
func WithViewCompletion(flagName string, dataviewFunc func() (*dataview.DataView, error)) completion.Option
WithViewCompletion view completion
Types ¶
type Factory ¶
type Factory struct { IOStreams *iostreams.IOStreams Browser Browser Client func() (*c8y.Client, error) Config func() (*config.Config, error) Logger func() (*logger.Logger, error) ActivityLogger func() (*activitylogger.ActivityLogger, error) Console func() (*console.Console, error) DataView func() (*dataview.DataView, error) BuildVersion string BuildBranch string // Extension ExtensionManager func() extensions.ExtensionManager // Executable is the path to the currently invoked binary Executable string // Command Command *cobra.Command }
func (*Factory) CheckPostCommandError ¶
func (*Factory) CreateModeEnabled ¶
CreateModeEnabled create mode is enabled
func (*Factory) DeleteModeEnabled ¶
ValidateDeleteMode delete mode is enabled
func (*Factory) ExecuteOutputTemplate ¶ added in v2.41.0
func (f *Factory) ExecuteOutputTemplate(output []byte, params OutputContext, commonOptions *config.CommonCommandOptions) ([]byte, error)
func (*Factory) GetRequestHandler ¶
func (f *Factory) GetRequestHandler() (*request.RequestHandler, error)
func (*Factory) GetViewProperties ¶
func (f *Factory) GetViewProperties(cfg *config.Config, cmd *cobra.Command, output []byte) ([]string, error)
GetViewProperties Look up the view properties to display
func (*Factory) GuessDataProperty ¶ added in v2.41.0
func (*Factory) ResolveTemplates ¶ added in v2.30.0
func (*Factory) RunSequentiallyWithGenericWorkers ¶ added in v2.41.0
func (*Factory) RunWithGenericWorkers ¶ added in v2.41.0
func (*Factory) RunWithWorkers ¶
func (f *Factory) RunWithWorkers(client *c8y.Client, cmd *cobra.Command, req *c8y.RequestOptions, inputIterators *flags.RequestInputIterators) error
func (*Factory) SetCommand ¶ added in v2.41.0
Set reference to the cobra command
func (*Factory) UpdateModeEnabled ¶
ValidateUpdateMode update mode is enabled
func (*Factory) WithTemplateCompletion ¶ added in v2.32.0
func (f *Factory) WithTemplateCompletion(flagName string) completion.Option
func (*Factory) WithTemplateFlag ¶
WithTemplateFlag add template flag with completion
func (*Factory) WriteOutput ¶ added in v2.41.0
func (f *Factory) WriteOutput(output []byte, params OutputContext, commonOptions *config.CommonCommandOptions) error
func (*Factory) WriteOutputWithRows ¶ added in v2.41.0
func (f *Factory) WriteOutputWithRows(output []byte, params OutputContext, commonOptions *config.CommonCommandOptions) (int, error)
func (*Factory) WriteOutputWithoutPropertyGuess ¶ added in v2.41.0
func (f *Factory) WriteOutputWithoutPropertyGuess(output []byte, params OutputContext) error
type FileIteratorOptions ¶ added in v2.33.0
type OutputContext ¶ added in v2.41.0
type RandomRange ¶ added in v2.38.0
type TemplatePathResolver ¶
type TemplatePathResolver struct {
Paths []string
}
func NewTemplateResolver ¶ added in v2.14.0
func NewTemplateResolver(factory *Factory) *TemplatePathResolver
type TestBrowser ¶
type TestBrowser struct {
// contains filtered or unexported fields
}
func (*TestBrowser) Browse ¶
func (b *TestBrowser) Browse(url string) error
func (*TestBrowser) BrowsedURL ¶
func (b *TestBrowser) BrowsedURL() string
func (*TestBrowser) Verify ¶
func (b *TestBrowser) Verify(t _testing, url string)
Click to show internal directories.
Click to hide internal directories.