stores

package
v1.0.23 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 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 NewMapStore added in v0.0.34

func NewMapStore() Store

NewMapStore returns a new credential store that caches credentials in memory instead of on disk.

Jump to

Keyboard shortcuts

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