authhelpers

package
v0.0.214 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIOFileHandles

func GetIOFileHandles(h *util.IOFileHandles) util.IOFileHandles

GetIOFileHandles lazily creates a file handles object if the input is nil

func LocalGitAuthService

func LocalGitAuthService() (auth.ConfigService, error)

Types

type AuthFacade

type AuthFacade struct {
	Service        auth.ConfigService
	Gitter         gits.Gitter
	IOFileHandles  *util.IOFileHandles
	BatchMode      bool
	UseGitHubOAuth bool
}

AuthFacade a helper object for getting auth tokens

func NewAuthFacade

func NewAuthFacade() (*AuthFacade, error)

NewAuthFacade creates a new auth facade

func NewAuthFacadeWithArgs

func NewAuthFacadeWithArgs(svc auth.ConfigService, gitter gits.Gitter, ioFileHandles *util.IOFileHandles, batchMode bool, useGitHubOAuth bool) (*AuthFacade, error)

NewAuthFacadeWithArgs creates a new auth facade with a set of arguments

func (*AuthFacade) FindGitTokenForServer

func (f *AuthFacade) FindGitTokenForServer(serverURL string, owner string) (string, string, error)

FindGitTokenForServer finds the git token and kind for the given server URL

func (*AuthFacade) FindGitUserTokenForServer

func (f *AuthFacade) FindGitUserTokenForServer(serverURL string, owner string) (string, string, string, error)

FindGitUserTokenForServer finds the git token and kind for the given server URL

func (*AuthFacade) GetService

func (f *AuthFacade) GetService() (auth.ConfigService, error)

GetService lazily creates the auth service if required

func (*AuthFacade) Git

func (f *AuthFacade) Git() gits.Gitter

Git lazily create a gitter if its not specified

func (*AuthFacade) ScmClient

func (f *AuthFacade) ScmClient(serverURL string, owner string, kind string) (*scm.Client, string, string, error)

ScmClient creates a new Scm client for the given git server, owner and kind

Jump to

Keyboard shortcuts

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