auth

package
v0.19.4 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const ResetLine = "\r\033[K"

ResetLine returns the cursor to start of line and clean it

Variables

This section is empty.

Functions

func NewCmdLogin

func NewCmdLogin() *cobra.Command

NewCmdLogin creates the `auth login` command

func NewCmdLogout

func NewCmdLogout() *cobra.Command

NewCmdLogout creates the `auth logout` command

func NewCmdStatus

func NewCmdStatus() *cobra.Command

NewCmdStatus creates the `auth status` command

Types

type AuthProvider

type AuthProvider int
const (
	AuthWithGithub AuthProvider = iota
	AuthWithGitlab
)

func (AuthProvider) AuthorizeURL

func (p AuthProvider) AuthorizeURL() string

AuthorizeURL returns the URL of the OAuth authorization endpoint

func (AuthProvider) ClientID

func (p AuthProvider) ClientID() string

func (AuthProvider) Scopes

func (p AuthProvider) Scopes() string

func (AuthProvider) String

func (p AuthProvider) String() string

type LoginOptions

type LoginOptions struct {
	IO *iostreams.IOStreams

	Interactive bool

	Hostname string
	Token    string
}

type LogoutOptions

type LogoutOptions struct {
	IO *iostreams.IOStreams

	Interactive bool

	Hostname  string
	NoConfirm bool
}

type StatusOptions

type StatusOptions struct {
	IO *iostreams.IOStreams

	Hostname  string
	ShowToken bool
}

Jump to

Keyboard shortcuts

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