secure

package
v0.0.0-...-afa0028 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Secure

type Secure struct {
	// contains filtered or unexported fields
}

Secure is a secure backend. It uses system keychain to store keys and secrets. macOS/OSX Keychain, Windows credential store, or Linux Pass.

func New

func New(kr string) *Secure

New creates a new secure backend instance. It takes as argument the name of the keyring to be created or opened.

func (*Secure) List

func (sec *Secure) List() ([]string, error)

List gets all keys stored in the keychain backend

func (*Secure) Read

func (sec *Secure) Read(key string) ([]byte, error)

Read retrieves a key stored in the backend

func (*Secure) Remove

func (sec *Secure) Remove(key string) error

Remove deletes a key from the keychain backend

func (*Secure) Store

func (sec *Secure) Store(key, secret string) error

Store adds a new key in the keychain backend

Jump to

Keyboard shortcuts

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