get

package
Version: v0.0.0-...-3743d31 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Get is a reusable implementation of the Get command for the tink cli. The Get command lists and filters resources. It supports different kind of visualisation and it is designed to be extendible and usable across resources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGetCommand

func NewGetCommand(opt Options) *cobra.Command

Types

type Options

type Options struct {
	// Headers is the list of headers you want to print as part of the list
	Headers []string
	// RetrieveData reaches out to Tinkerbell and it gets the required data
	RetrieveData func(context.Context, *client.FullClient) ([]interface{}, error)
	// RetrieveByID is used when a get command has a list of arguments
	RetrieveByID func(context.Context, *client.FullClient, string) (interface{}, error)
	// PopulateTable populates a table with the data retrieved with the RetrieveData function.
	PopulateTable func([]interface{}, table.Writer) error

	// Format specifies the format you want the list of resources printed
	// out. By default it is table but it can be JSON ar CSV.
	Format string
	// NoHeaders does not print the header line
	NoHeaders bool
	// contains filtered or unexported fields
}

func (*Options) SetClientConnOpt

func (o *Options) SetClientConnOpt(co *client.ConnOptions)

func (*Options) SetFullClient

func (o *Options) SetFullClient(cl *client.FullClient)

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL