Help us shape the future of Go! Take the 2026 Go Developer Survey

login

package
v0.34.2 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoginCmd

type LoginCmd struct {
	Username string `short:"u" env:"UP_USER" xor:"identifier" help:"Username used to execute command."`
	Password string `short:"p" env:"UP_PASSWORD" help:"Password for specified user. '-' to read from stdin."`
	Token    string `` /* 139-byte string literal not displayed */

	// Common Upbound API configuration
	Flags upbound.Flags `embed:""`
	// contains filtered or unexported fields
}

LoginCmd adds a user or token profile with session token to the up config file if a username is passed, but defaults to launching a web browser to authenticate with Upbound.

func (*LoginCmd) AfterApply

func (c *LoginCmd) AfterApply(kongCtx *kong.Context) error

func (*LoginCmd) BeforeApply

func (c *LoginCmd) BeforeApply() error

BeforeApply sets default values in login before assignment and validation.

func (*LoginCmd) Run

func (c *LoginCmd) Run(ctx context.Context, p pterm.TextPrinter, upCtx *upbound.Context) error

Run executes the login command.

type LogoutCmd

type LogoutCmd struct {

	// Common Upbound API configuration
	Flags upbound.Flags `embed:""`
	// contains filtered or unexported fields
}

LogoutCmd invalidates a stored session token for a given profile.

func (*LogoutCmd) AfterApply

func (c *LogoutCmd) AfterApply(kongCtx *kong.Context) error

AfterApply sets default values in login after assignment and validation.

func (*LogoutCmd) Run

func (c *LogoutCmd) Run(ctx context.Context, p pterm.TextPrinter, upCtx *upbound.Context) error

Run executes the logout command.

Jump to

Keyboard shortcuts

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