internal

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGoogleAccessToken

func GetGoogleAccessToken(ctx context.Context) (string, error)

GetGoogleAccessToken return a default Google access token

Types

type TerraformToken

type TerraformToken struct {
	Token string `json:"token"`
}

TerraformToken JSON token object

func (*TerraformToken) JSON

func (t *TerraformToken) JSON() string

JSON return current token instance as JSON bytes

type TokenSource

type TokenSource struct {
	Source string `json:"source"`
	Token  string `json:"token"`
}

TokenSource object to save in file

type TokenSources

type TokenSources []TokenSource

TokenSources multiple TokenSource

func ReadTokenFile

func ReadTokenFile(tokenFilePath string) (TokenSources, error)

ReadTokenFile read the current token from file if exist

func (*TokenSources) JSON

func (t *TokenSources) JSON() string

JSON return current token instance as JSON bytes

func (*TokenSources) WriteToFile

func (t *TokenSources) WriteToFile(filepath string) error

WriteToFile write tokens to given file

Jump to

Keyboard shortcuts

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