secret

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvToken = "MAGECLI_TOKEN"
)

Variables

View Source
var ErrKeyringTimeout = errors.New("keyring operation timed out")

Functions

func IsHeadless

func IsHeadless() bool

func IsNoKeyringError

func IsNoKeyringError(err error) bool

func TokenFromEnv

func TokenFromEnv() string

func TokenKey

func TokenKey(hostKey string) string

Types

type Option

type Option func(*openOptions)

func WithAllowFileFallback

func WithAllowFileFallback(enable bool) Option

func WithPassphrase

func WithPassphrase(pass string) Option

type Store

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

func Open

func Open(opts ...Option) (*Store, error)

func (*Store) Delete

func (s *Store) Delete(key string) error

func (*Store) Get

func (s *Store) Get(key string) (string, error)

func (*Store) Set

func (s *Store) Set(key, value string) error

Jump to

Keyboard shortcuts

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