login

package
v0.6.36 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package login is for the get command

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAndInstallGateway added in v0.4.0

func CheckAndInstallGateway(t *terminal.Terminal, store LoginStore) (err error)

func CreateDownloadPathAndInstallScript added in v0.4.0

func CreateDownloadPathAndInstallScript(localOS string, homeDirectory string) (jetBrainsDirectory string, installScript string, err error)

func CreateNewUser added in v0.4.0

func CreateNewUser(loginStore LoginStore, idToken string, t *terminal.Terminal) error

func InstallGateway added in v0.4.0

func InstallGateway(installScript string, t *terminal.Terminal)

func IsGatewayInstalled added in v0.4.0

func IsGatewayInstalled(jetBrainsBaseDirectory string) bool

func IsToolboxInstalled added in v0.4.0

func IsToolboxInstalled(jetBrainsBaseDirectory string) (toolboxInstalled bool, gatewayInToolboxInstalled bool)

func NewCmdLogin

func NewCmdLogin(t *terminal.Terminal, loginStore LoginStore, auth Auth) *cobra.Command

loginStore must be a no prompt store

Types

type Auth added in v0.4.0

type Auth interface {
	Login() (*auth.LoginTokens, error)
}

type LoginOptions

type LoginOptions struct {
	Auth       Auth
	LoginStore LoginStore
}

func (*LoginOptions) Complete

func (o *LoginOptions) Complete(_ *terminal.Terminal, _ *cobra.Command, _ []string) error

func (LoginOptions) RunLogin

func (o LoginOptions) RunLogin(t *terminal.Terminal) error

type LoginStore added in v0.3.0

type LoginStore interface {
	vpn.ServiceMeshStore
	GetCurrentUser() (*entity.User, error)
	CreateUser(idToken string) (*entity.User, error)
	GetOrganizations(options *store.GetOrganizationsOptions) ([]entity.Organization, error)
	CreateOrganization(req store.CreateOrganizationRequest) (*entity.Organization, error)
	GetServerSockFile() string
}

Jump to

Keyboard shortcuts

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