secret

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package secret stores per-target credentials in the OS keychain (A5). crofty never sends these anywhere of ours — there is no server (A7). They are the user's own tokens for the user's own destinations, kept locally. Secret values are entered through a hidden prompt and never pass through agent context.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("secret not found")

ErrNotFound is returned when no secret exists for the given target/field.

Functions

This section is empty.

Types

type Store

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

Store reads and writes credentials for one workspace. Keys are namespaced workspace:target:field so multiple sites and targets never collide (A5).

func New

func New(workspace string) *Store

New returns a Store scoped to a workspace id.

func (*Store) Delete

func (s *Store) Delete(target, field string) error

Delete removes a secret; absence is not an error.

func (*Store) Get

func (s *Store) Get(target, field string) (string, error)

Get returns the stored secret, or ErrNotFound if absent.

func (*Store) Set

func (s *Store) Set(target, field, value string) error

Set stores (or replaces) a secret.

Jump to

Keyboard shortcuts

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