cli

package
v2.1.0-alpha11 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

README

CMD Package Documentation

In this package, the root command and its subcommands are defined for the CLI. This package, which is called from the main package, utilizes the pkg services to execute commands.

Documentation

Overview

Package cli provides functionality for the command-line interface of the application.

Index

Constants

This section is empty.

Variables

View Source
var Registered map[string]HookFunc

Registered holds the registered command hooks

Functions

func Config

func Config(ctx context.Context, logger *zap.Logger, cfg *config.Config, servicefactory ServiceFactory, cmdConfigurator CmdConfigurator) *cobra.Command

func Mock

func Mock(ctx context.Context, logger *zap.Logger, _ *config.Config, serviceFactory ServiceFactory, cmdConfigurator CmdConfigurator) *cobra.Command

func Record

func Record(ctx context.Context, logger *zap.Logger, _ *config.Config, serviceFactory ServiceFactory, cmdConfigurator CmdConfigurator) *cobra.Command

func Register

func Register(name string, f HookFunc)

func Root

func Root(ctx context.Context, logger *zap.Logger, svcFactory ServiceFactory, cmdConfigurator CmdConfigurator) *cobra.Command

func Test

func Test(ctx context.Context, logger *zap.Logger, cfg *config.Config, serviceFactory ServiceFactory, cmdConfigurator CmdConfigurator) *cobra.Command

func Update

func Update(ctx context.Context, logger *zap.Logger, _ *config.Config, serviceFactory ServiceFactory, cmdConfigurator CmdConfigurator) *cobra.Command

Update retrieves the command to tools Keploy

Types

type CmdConfigurator

type CmdConfigurator interface {
	AddFlags(cmd *cobra.Command) error
	ValidateFlags(ctx context.Context, cmd *cobra.Command) error
	Validate(ctx context.Context, cmd *cobra.Command) error
}

type ServiceFactory

type ServiceFactory interface {
	GetService(ctx context.Context, cmd string) (interface{}, error)
}

Directories

Path Synopsis
Package provider provides functionality for the keploy provider.\
Package provider provides functionality for the keploy provider.\

Jump to

Keyboard shortcuts

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