cmd

package
v0.0.0-...-f65afb4 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2019 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "caasp-cli",
	Short: "SUSE CaaS Platform CLI",
	Long:  "",
}

RootCmd represents the base command when called without any subcommands

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type AuthRequest

type AuthRequest struct {
	ClientID     string
	ClientSecret string
	IssuerURL    string
	Username     string
	Password     string
	RootCA       []byte
	// contains filtered or unexported fields
}

AuthRequest represents an OAuth2 auth request flow

type AuthResponse

type AuthResponse struct {
	IDToken      string
	AccessToken  string
	TokenType    string
	Expiry       time.Time
	RefreshToken string
	Scopes       []string
}

AuthResponse is the final auth response

func Auth

func Auth(authRequest AuthRequest) (AuthResponse, error)

Auth will perform an OIDC / OAuth2 handshake without requiring a web browser

Jump to

Keyboard shortcuts

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