cli

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Version string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(consumerToken, apiURL, Version string) *Client

func (*Client) API

func (c *Client) API(cmd *cobra.Command) *packngo.Client

func (*Client) Config

func (c *Client) Config(cmd *cobra.Command) *viper.Viper

func (*Client) DefaultConfig

func (c *Client) DefaultConfig(withExtension bool) string

func (*Client) Excludes added in v0.16.0

func (c *Client) Excludes(defaultExcludes []string) (excl []string)

func (*Client) Filters added in v0.16.0

func (c *Client) Filters() map[string]string

func (*Client) Format

func (c *Client) Format() outputPkg.Format

func (*Client) Includes added in v0.16.0

func (c *Client) Includes(defaultIncludes []string) (incl []string)

func (*Client) Init

func (c *Client) Init(cmd *cobra.Command)

initConfig reads in config file and ENV variables if set.

func (*Client) ListOptions

func (c *Client) ListOptions(defaultIncludes, defaultExcludes []string) *packngo.ListOptions

ListOptions creates a packngo.ListOptions using the includes and excludes persistent flags. When not defined, the defaults given will be supplied.

func (*Client) MetalAPI added in v0.15.0

func (c *Client) MetalAPI(cmd *cobra.Command) *metal.APIClient

func (*Client) NewCommand

func (c *Client) NewCommand() *cobra.Command

func (*Client) Search added in v0.16.0

func (c *Client) Search() (sea string)

func (*Client) SetToken

func (c *Client) SetToken(token string)

func (*Client) SortBy added in v0.16.0

func (c *Client) SortBy() (sBy string)

func (*Client) SortDirection added in v0.16.0

func (c *Client) SortDirection() (sDir string)

func (*Client) Token

func (c *Client) Token() string

Jump to

Keyboard shortcuts

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