get

package
v1.35.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package get provides the get command, which displays one or more resources, as well as subcommands for each resource type.

Index

Constants

This section is empty.

Variables

View Source
var ExportFlag bool

ExportFlag when --export is set print the resources in an importable format

View Source
var HistoryFlag bool

HistoryFlag when --history is set print the resources history

Functions

func AgentVersionsCommand

func AgentVersionsCommand(builder Builder) *cobra.Command

AgentVersionsCommand returns the BindPlane get source-types cobra command

func AgentsCommand

func AgentsCommand(builder Builder) *cobra.Command

AgentsCommand returns the BindPlane get agents cobra command

func Command

func Command(builder Builder) *cobra.Command

Command returns the BindPlane get cobra command.

func ConfigurationsCommand

func ConfigurationsCommand(builder Builder) *cobra.Command

ConfigurationsCommand returns the BindPlane get configurations cobra command

func DestinationTypesCommand

func DestinationTypesCommand(builder Builder) *cobra.Command

DestinationTypesCommand returns the BindPlane get destination-types cobra command

func DestinationsCommand

func DestinationsCommand(builder Builder) *cobra.Command

DestinationsCommand returns the BindPlane get destinations cobra command

func PrintTitle

func PrintTitle(titleName string)

PrintTitle prints the titleName with a dashed underline

func ProcessorTypesCommand

func ProcessorTypesCommand(builder Builder) *cobra.Command

ProcessorTypesCommand returns the BindPlane get processor-types cobra command

func ProcessorsCommand

func ProcessorsCommand(builder Builder) *cobra.Command

ProcessorsCommand returns the BindPlane get processors cobra command

func Resources

func Resources(ctx context.Context, builder Builder, kind model.Kind, args []string) error

Resources gets resources based on the kind and args

func ResourcesCommand

func ResourcesCommand(builder Builder) *cobra.Command

ResourcesCommand returns the BindPlane resources cobra command

func RolloutsCommand

func RolloutsCommand(builder Builder) *cobra.Command

RolloutsCommand returns the BindPlane get rollouts cobra command

func SourceTypesCommand

func SourceTypesCommand(builder Builder) *cobra.Command

SourceTypesCommand returns the BindPlane get source-types cobra command

func SourcesCommand

func SourcesCommand(builder Builder) *cobra.Command

SourcesCommand returns the BindPlane get sources cobra command

Types

type Builder

type Builder interface {
	// Build returns a new Getter.
	BuildGetter(ctx context.Context) (Getter, error)
}

Builder is an interface for building a Getter.

type DefaultGetter

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

DefaultGetter is the default implementation of Getter.

func NewGetter

func NewGetter(client client.BindPlane, printer printer.Printer, outputFormat string) *DefaultGetter

NewGetter returns a new Getter.

func (*DefaultGetter) GetAllResources

func (g *DefaultGetter) GetAllResources(ctx context.Context) error

GetAllResources gets and prints every resource.

func (*DefaultGetter) GetRawResource

func (g *DefaultGetter) GetRawResource(ctx context.Context, kind model.Kind, id string) error

GetRawResource gets and prints the raw version of a resource

func (*DefaultGetter) GetResource

func (g *DefaultGetter) GetResource(ctx context.Context, kind model.Kind, id string) error

GetResource gets and prints a single resource.

func (*DefaultGetter) GetResourceHistory

func (g *DefaultGetter) GetResourceHistory(ctx context.Context, kind model.Kind, id string) error

GetResourceHistory gets and prints the history for a single resource

func (*DefaultGetter) GetResources

func (g *DefaultGetter) GetResources(ctx context.Context, kind model.Kind, ids []string) error

GetResources gets and prints a list of resources matching the supplied ids.

func (*DefaultGetter) GetResourcesOfKind

func (g *DefaultGetter) GetResourcesOfKind(ctx context.Context, kind model.Kind, queryOpts client.QueryOptions) error

GetResourcesOfKind gets and prints all resources of a given kind.

type Getter

type Getter interface {
	// GetResource gets and prints a single resource.
	GetResource(ctx context.Context, kind model.Kind, id string) error

	// GetResources gets and prints a list of resources.
	GetResources(ctx context.Context, kind model.Kind, ids []string) error

	// GetResourcesOfKind gets and prints all resources of a given kind.
	GetResourcesOfKind(ctx context.Context, kind model.Kind, queryOpts client.QueryOptions) error

	// GetAllResources gets and prints every resource kind.
	GetAllResources(ctx context.Context) error

	// GetResourceHistory gets and prints the history for a single resource
	GetResourceHistory(ctx context.Context, kind model.Kind, id string) error
}

Getter is an interface for getting and printing resources.

Jump to

Keyboard shortcuts

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