login

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 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 `short:"t" env:"UP_TOKEN" xor:"identifier" help:"Token used to execute command. '-' to read from stdin."`

	// 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.

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 LoginWebCmd

type LoginWebCmd struct {

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

func (*LoginWebCmd) AfterApply

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

func (*LoginWebCmd) BeforeApply

func (c *LoginWebCmd) BeforeApply() error

BeforeApply sets default values in login before assignment and validation.

func (*LoginWebCmd) Run

Run executes the list 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