josesecrets

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 14, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalWrite

func MarshalWrite(w io.Writer, data interface{}, password string) error

func ReadUnmarshal

func ReadUnmarshal(target interface{}, r io.Reader, password string) error

func ReadUnmarshalFile

func ReadUnmarshalFile(target interface{}, fileName, password string) error

func SaveToFile

func SaveToFile(fileName string, value interface{}, password string) error

func UpdateFile

func UpdateFile(
	fileName string,
	updateFn func(values map[string]json.RawMessage) error,
	password string,
) (map[string]json.RawMessage, error)

Types

type Keyring

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

func OpenKeyring

func OpenKeyring(path string, password string) (*Keyring, error)

func (*Keyring) Contains

func (k *Keyring) Contains(valueName string) bool

func (*Keyring) GetTo

func (k *Keyring) GetTo(
	valueName string,
	target interface{},
) error

func (*Keyring) Put

func (k *Keyring) Put(name string, value interface{}) error

func (*Keyring) Update

func (k *Keyring) Update(
	updateFn func(values map[string]json.RawMessage) error,
) error

Jump to

Keyboard shortcuts

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