credentials

package
v1.12.3 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// KeyringService is the service the credential belongs to
	KeyringService = "sectionctl"
)

Functions

func Delete

func Delete(endpoint string) error

Delete deletes a previously stored credential for the Section API

func IsCredentialRecorded

func IsCredentialRecorded(s, u string) bool

IsCredentialRecorded returns if API credentials have been recorded

func Prompt

func Prompt(in io.Reader, out io.Writer) (token string, err error)

Prompt interactively prompts the user for a credential to authenticate to the Section API

func PromptAndWrite

func PromptAndWrite(in io.Reader, out io.Writer, endpoint string) (token string, err error)

PromptAndWrite prompts for a credential then writes it to a store

func Read

func Read(endpoint string) (string, error)

Read returns a token for authenticating to the Section API

func Setup

func Setup(endpoint string) (token string, err error)

Setup ensures authentication is set up

func Write

func Write(endpoint, token string) error

Write saves Section API credentials to a persistent store

Types

This section is empty.

Jump to

Keyboard shortcuts

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