internal

package
v0.0.0-...-bcb8294 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const AuthTokenRequiredMsg = `Required flag "auth-token" not set`

AuthTokenRequiredMsg is the message returned by the CLI when the auth-token flag is not set.

Variables

This section is empty.

Functions

func NewCLIContext

func NewCLIContext(flagSet *flag.FlagSet) *cli.Context

NewCLIContext returns a simple CLI context to run tests against it.

func NewCommonMockClientError

func NewCommonMockClientError(path, errText string) *api.Client

NewCommonMockClientError returns a mock client that handles a single request that fails.

func NewCommonMockClientSuccess

func NewCommonMockClientSuccess(path, responseBody string) *api.Client

NewCommonMockClientSuccess returns a mock client that handles a single request that succeeds.

func NewFlagSet

func NewFlagSet() *flag.FlagSet

NewFlagSet returns the base flag set to be added to the CLI contexts for tests running.

Types

type App

type App struct {
	api.HTTPClient
}

App stitches together all the parts to make a fully formed application.

func Get

func Get() *App

Get obtains the initialized instance of the application.

func Instance

func Instance(httpClient api.HTTPClient) *App

Instance instantiates a new Application from a config, if it's already been instantiated, an error is returned.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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