Documentation ¶
Overview ¶
Package cli provides the BindPlane command line client.
Index ¶
- func AddPrerunsToExistingCmd(cmd *cobra.Command, loader Loader, prerunAdders ...PreRunAdder) *cobra.Command
- type Factory
- func (f *Factory) BuildApplier(ctx context.Context) (apply.Applier, error)
- func (f *Factory) BuildClient(ctx context.Context) (client.BindPlane, error)
- func (f *Factory) BuildCopier(ctx context.Context) (copy.Copier, error)
- func (f *Factory) BuildDeleter(ctx context.Context) (delete.Deleter, error)
- func (f *Factory) BuildGetter(ctx context.Context) (get.Getter, error)
- func (f *Factory) BuildInitializer(ctx context.Context) (initialize.Initializer, error)
- func (f *Factory) BuildInstaller(ctx context.Context) (install.Installer, error)
- func (f *Factory) BuildLabeler(ctx context.Context) (label.Labeler, error)
- func (f *Factory) BuildLogger(_ context.Context) (*zap.Logger, error)
- func (f *Factory) BuildMetricsProvider(_ context.Context) (metrics.Provider, error)
- func (f *Factory) BuildPrinter(ctx context.Context) (printer.Printer, error)
- func (f *Factory) BuildProfiler(_ context.Context) (profile.Profiler, error)
- func (f *Factory) BuildRollouter(ctx context.Context) (rollout.Rollouter, error)
- func (f *Factory) BuildServer(ctx context.Context) (serve.Server, error)
- func (f *Factory) BuildStore(ctx context.Context) (store.Store, error)
- func (f *Factory) BuildSyncer(ctx context.Context) (sync.Syncer, error)
- func (f *Factory) BuildTracer(_ context.Context) (tracer.Tracer, error)
- func (f *Factory) BuildUpdater(ctx context.Context) (update.Updater, error)
- func (f *Factory) BuildVersioner(ctx context.Context) (version.Versioner, error)
- func (f *Factory) LoadConfig(_ context.Context, path string) error
- func (f *Factory) LoadCurrentProfile(ctx context.Context) error
- func (f *Factory) LoadEmptyConfig(_ context.Context) error
- func (f *Factory) LoadProfile(ctx context.Context, name string) error
- func (f *Factory) SupportsServer() bool
- func (f *Factory) ValidateConfig(_ context.Context) error
- type Loader
- type PreRun
- type PreRunAdder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPrerunsToExistingCmd ¶ added in v1.17.0
func AddPrerunsToExistingCmd(cmd *cobra.Command, loader Loader, prerunAdders ...PreRunAdder) *cobra.Command
AddPrerunsToExistingCmd adds preruns to an existing command in the order they are given
Types ¶
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory is used to build and load resources for the CLI.
func NewFactory ¶
func NewFactory(routeBuilder server.RouteBuilder) *Factory
NewFactory creates a new factory.
func (*Factory) BuildApplier ¶
BuildApplier builds an applier.
func (*Factory) BuildClient ¶
BuildClient builds a client.
func (*Factory) BuildCopier ¶
BuildCopier builds a copier.
func (*Factory) BuildDeleter ¶
BuildDeleter builds a deleter.
func (*Factory) BuildGetter ¶
BuildGetter builds a getter.
func (*Factory) BuildInitializer ¶
func (f *Factory) BuildInitializer(ctx context.Context) (initialize.Initializer, error)
BuildInitializer builds an initializer.
func (*Factory) BuildInstaller ¶
BuildInstaller builds an installer.
func (*Factory) BuildLabeler ¶
BuildLabeler builds a labeler.
func (*Factory) BuildLogger ¶
BuildLogger builds a logger, if it doesn't already exist.
func (*Factory) BuildMetricsProvider ¶ added in v1.25.0
BuildMetricsProvider builds the meter provider for the server
func (*Factory) BuildPrinter ¶
BuildPrinter builds a printer.
func (*Factory) BuildProfiler ¶
BuildProfiler builds a profiler.
func (*Factory) BuildRollouter ¶
BuildRollouter builds a rollouter.
func (*Factory) BuildServer ¶
BuildServer builds a server.
func (*Factory) BuildStore ¶
BuildStore builds the store for the server
func (*Factory) BuildSyncer ¶
BuildSyncer builds a syncer.
func (*Factory) BuildTracer ¶
BuildTracer builds the tracer for the server
func (*Factory) BuildUpdater ¶
BuildUpdater builds an updater.
func (*Factory) BuildVersioner ¶
BuildVersioner builds a versioner.
func (*Factory) LoadConfig ¶
LoadConfig loads the configuration from the given path.
func (*Factory) LoadCurrentProfile ¶
LoadCurrentProfile loads the current profile.
func (*Factory) LoadEmptyConfig ¶
LoadEmptyConfig loads an empty configuration set to the default profile
func (*Factory) LoadProfile ¶
LoadProfile loads the BindPlane profile from the given path.
func (*Factory) SupportsServer ¶ added in v1.21.0
SupportsServer returns true if the OS is not windows.
type Loader ¶
type Loader interface { // LoadConfig loads the configuration from the given path LoadConfig(ctx context.Context, path string) error // LoadProfile loads the profile with the given name LoadProfile(ctx context.Context, name string) error // ValidateConfig validates the configuration. ValidateConfig(ctx context.Context) error }
Loader is an interface for loading the BindPlane configuration
type PreRun ¶ added in v1.17.0
PreRun is a function that runs before the command
func AddLoadConfigPrerun ¶
AddLoadConfigPrerun adds the load config pre run to the command
func AddValidationPrerun ¶
AddValidationPrerun adds the validation pre run to the command
func CombinePreruns ¶ added in v1.17.0
CombinePreruns combines preruns into a single prerun
Directories ¶
Path | Synopsis |
---|---|
commands
|
|
apply
Package apply provides the apply command, which upserts resources from a file to the store.
|
Package apply provides the apply command, which upserts resources from a file to the store. |
copy
Package copy provides the copy command.
|
Package copy provides the copy command. |
delete
Package delete provides the delete command, as well as subcommands for deleting specific resources and resource types.
|
Package delete provides the delete command, as well as subcommands for deleting specific resources and resource types. |
get
Package get provides the get command, which displays one or more resources, as well as subcommands for each resource type.
|
Package get provides the get command, which displays one or more resources, as well as subcommands for each resource type. |
initialize
Package initialize provides the initialize command, which initializes an installation.
|
Package initialize provides the initialize command, which initializes an installation. |
initialize/question
Package question is used to create questions for the initialize command.
|
Package question is used to create questions for the initialize command. |
install
Package install provides the install command, which installs a new agent.
|
Package install provides the install command, which installs a new agent. |
label
Package label contains the label command.
|
Package label contains the label command. |
profile
Package profile provides commands for managing BindPlane profile configurations.
|
Package profile provides commands for managing BindPlane profile configurations. |
rollout
Package rollout contains the rollout commands for the BindPlane CLI.
|
Package rollout contains the rollout commands for the BindPlane CLI. |
root
Package root provides the root command
|
Package root provides the root command |
serve
Package serve provides the `serve` command for the CLI.
|
Package serve provides the `serve` command for the CLI. |
sync
Package sync provides the sync command, which synchronizes an agent-version from github with the store.
|
Package sync provides the sync command, which synchronizes an agent-version from github with the store. |
update
Package update contains the update command, which upgrades a specific agent
|
Package update contains the update command, which upgrades a specific agent |
version
Package version provides the version command, which prints the BindPlane version.
|
Package version provides the version command, which prints the BindPlane version. |
Package helpers contains helper functions for the CLI
|
Package helpers contains helper functions for the CLI |
Package printer provides an interface for printing resources, and several implementations.
|
Package printer provides an interface for printing resources, and several implementations. |