authenticated

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EnvSpaceliftAPIClientTLSCert represents the path to a client certificate for
	// communicating with the Spacelift API endpoint.
	EnvSpaceliftAPIClientTLSCert = "SPACELIFT_API_TLS_CERT"

	// EnvSpaceliftAPIClientTLSKey represents the path to a client key for
	// communicating with the Spacelift API endpoint.
	EnvSpaceliftAPIClientTLSKey = "SPACELIFT_API_TLS_KEY"

	// EnvSpaceliftAPIClientCA represents the path to a CA bundle for
	// verifying Spacelift API endpoint.
	EnvSpaceliftAPIClientCA = "SPACELIFT_API_TLS_CA"
)

Variables

Client is the authenticated client that can be used by all CLI commands.

View Source
var ErrViewerUnknown = errors.New("failed to query user information: unauthorized")

Functions

func Ensure

func Ensure(ctx context.Context, _ *cli.Command) (context.Context, error)

Ensure is a way of ensuring that the Client exists, and it meant to be used as a Before action for commands that need it.

Types

type Viewer added in v1.14.1

type Viewer struct {
	ID   string `graphql:"id" json:"id"`
	Name string `graphql:"name" json:"name"`
}

func CurrentViewer added in v1.14.1

func CurrentViewer(ctx context.Context) (*Viewer, error)

Jump to

Keyboard shortcuts

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