stores

package
v0.0.33 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store interface {
	Read(key string) ([]byte, error)
	Exists(key string) (bool, error)
	Write(key string, credential []byte) error
}

Store is a simple key-value interface for storing credentials in Thelma's root directory

func NewDirectoryStore

func NewDirectoryStore(dir string) (Store, error)

NewDirectoryStore returns a credential store that will read and write token values to ~/.thelma/credentials/$key, where $key is the token's unique identifier/key.

func NewNoopStore

func NewNoopStore() Store

NewNoopStore returns a new fake credential store that doesn't actually persist credentials anywhere. It is used as a fallback in weird environments

Jump to

Keyboard shortcuts

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