cli

package
v0.0.0-...-8684de4 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPipelineEndpoint

func CheckPipelineEndpoint(endpoint string) (string, error, error)

CheckPipelineEndpoint checks if the endpoint is a valid Pipeline endpoint. It returns the server cert's sha256 fingerprint if the endpoint is valid. If the endpoint is valid, but the TLS validation failed, it returns the fingerprint of the server certificate, the original x509 error, and a nil-error. Returns empty hash and TLS error if endpoint is not TLS.

func LogAPIError

func LogAPIError(action string, err error, request interface{})

LogAPIError logs API request errors.

Types

type Cli

type Cli interface {
	Out() io.Writer
	Color() bool
	Interactive() bool
	Client() *pipeline.APIClient
	RoundTripper() http.RoundTripper
	CloudinfoClient() *cloudinfo.APIClient
	TelescopesClient() *telescopes.APIClient
	Context() Context
	OutputFormat() string
	Home() string // Home is the path to the .banzai directory of the user
	Version() string
}

func NewCli

func NewCli(out io.Writer, version string) Cli

type Context

type Context interface {
	OrganizationID() int32
	SetOrganizationID(id int32)
	SetToken(token string)
	SetFingerprint(fingerprint string)
}

Jump to

Keyboard shortcuts

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