cli

package
v0.18.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commands

type Commands struct {
	*clientcmd.ServiceCommand

	Info   Info   `command:"info" description:"Show current authentication information"`
	Login  Login  `command:"login" description:"Authenticate for a new token"`
	Logout Logout `command:"logout" description:"Revoke an authentication token"`
}

func CreateCommands

func CreateCommands(runtime client.Runtime, s *svc.Service) *Commands

type GetClient

type GetClient func() (envsvchttpclient.Client, error)

type Info

type Info struct {
	*clientcmd.ServiceCommand `no-flag:"true"`

	GetClient GetClient

	Authenticated bool `long:"authenticated" description:"Show only whether the user is authenticated"`
	ID            bool `long:"id" description:"Show only the ID of the authenticated user"`
	Groups        bool `long:"groups" description:"Show only the groups of the authenticated user"`
}

func (Info) Execute

func (c Info) Execute(_ []string) error

type Login

type Login struct {
	*clientcmd.ServiceCommand `no-flag:"true"`

	SkipVerify  bool          `long:"skip-verify" description:"Skip verification of authentication, once complete"`
	WaitTimeout time.Duration `long:"wait-timeout" description:"Timeout to wait for authentication before erroring" default:"15m"`

	ServiceManager service.Manager
	GetClient      GetClient
}

func (Login) Execute

func (c Login) Execute(_ []string) error

type Logout

type Logout struct {
	*clientcmd.ServiceCommand `no-flag:"true"`

	ServiceManager service.Manager
}

func (Logout) Execute

func (c Logout) Execute(_ []string) error

Jump to

Keyboard shortcuts

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