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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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