conf

package
v0.0.0-...-aa54cbc Latest Latest
Warning

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

Go to latest
Published: May 26, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StringCheck

func StringCheck(short, long, ref string) string

StringCheck function will verify which of either short or long form is defined, and return it. If none are set, an empty string is returned

Types

type GoAuth

type GoAuth struct {
	Conf           *GoAuthConf
	ClientID       *oauth.ClientID
	ServiceAccount *oauth.ServiceAccount
}

GoAuth struct represents an instance (execution) of GoAuth

func NewGoAuth

func NewGoAuth() *GoAuth

NewGoAuth function will create and return a new GoAuth object based on the input configuration

func (*GoAuth) ExecClientID

func (g *GoAuth) ExecClientID()

ExecClientID method will process the actions required for a Client ID account type

func (*GoAuth) ExecServiceAccount

func (g *GoAuth) ExecServiceAccount()

ExecServiceAccount method will process the actions required for a Service Account account type

func (*GoAuth) OnFinish

func (g *GoAuth) OnFinish()

OnFinish method will list the actions to take upon completing execution

func (*GoAuth) OnStart

func (g *GoAuth) OnStart()

OnStart method will list the actions to take upon setting up a new GoAuth instance

type GoAuthConf

type GoAuthConf struct {
	IsClientID       bool
	IsServiceAccount bool
	IsWebUI          bool
	IsNinjaMode      bool
	AccountName      string
	Secret           string
	Scopes           string
	Subscriber       string
	RefreshToken     string
}

GoAuthConf struct will represent the configuration for this instance of GoAuth

func GetOpts

func GetOpts() *GoAuthConf

GetOpts function will collect the user's input from the set flags on runtime, and create a GoAuthConf object based on it

func (*GoAuthConf) NewClientID

func (c *GoAuthConf) NewClientID(clientid, secret, scopes, refreshToken string, ninjaMode bool) *GoAuthConf

NewClientID method will create a new Client ID object based on its available input parameters

func (*GoAuthConf) NewServiceAccount

func (c *GoAuthConf) NewServiceAccount(keyfile, scopes, subscriber string, ninjaMode bool) *GoAuthConf

NewServiceAccount method will create a new Service Account object based on its available input parameters

Jump to

Keyboard shortcuts

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