credentials

package
v0.24.4-alpha4 Latest Latest
Warning

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

Go to latest
Published: May 24, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChooseFileLocation

func ChooseFileLocation(outputFormat string, filePath string, overwrite bool) (string, bool, error)

ChooseFileLocation starts an interactive prompt to get the path to the credentials file a while loop will be entered as it can take multiple attempts to find a suitable location if the file already exists

func GetDefaultPath

func GetDefaultPath(outputFormat string) (filePath string)

GetDefaultPath returns the default absolute path for the credentials file

func Write

func Write(output string, filepath string, credentials *Credentials) error

Write saves the credentials to a file in the specified output format

Types

type Credentials

type Credentials struct {
	ClientID     string `json:"client_id,omitempty"`
	ClientSecret string `json:"client_secret,omitempty"`
}

Credentials is a type which represents the credentials for a service account

Jump to

Keyboard shortcuts

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