tokenhelper

package
v0.0.0-...-22e582f Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type External

type External struct {
	BinaryPath string
}

External retrieves token using external binary.

func (*External) Read

func (e *External) Read() (string, error)

Read retrieves token.

func (*External) Update

func (e *External) Update(token string) error

Update either modify or set token.

type Helper

type Helper interface {
	Read() (string, error)
	Update(string) error
}

Helper is an interface that contains basic operations that must be implemented by a token helper.

type Internal

type Internal struct {
}

Internal retrieves token from file in home directory and doesn't rely on executing external binary.

func (*Internal) Read

func (i *Internal) Read() (string, error)

Read retrieves token.

func (*Internal) Update

func (i *Internal) Update(token string) error

Update either modify or set token.

Jump to

Keyboard shortcuts

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