store

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const FileConnections = envconst.FilenameConnections

Variables

View Source
var (
	DirectionApp = storage.GetAppDir()

	ErrEncryptData   = errors.New("err encrypt data")
	ErrMarshalJson   = errors.New("failed to marshal json")
	ErrWriteJson     = errors.New("failed to write json")
	ErrUnmarshalJson = errors.New("failed to unmarshal json")
	ErrGetConnection = errors.New("failed to get connection")
	ErrDecryptData   = errors.New("failed to decrypt data")
)
View Source
var (
	DirectionKeys = storage.GetPrivateKeysDir()

	ErrWriteToFilePrivateKey = errors.New("err write to file private key")
	ErrCreateFilePrivateKey  = errors.New("err create file private key")
	ErrNotValidPrivateKey    = errors.New("private key is not valid")
	ErrGetDataPrivateKey     = errors.New("private key get data error")
)
View Source
var ErrGetCryptKey = errors.New("err get crypt key")

Functions

func DeletePrivateKey

func DeletePrivateKey(connection *connect.Connect) error

DeletePrivateKey delete key from dir for current connection

func GetConnections

func GetConnections() (*connect.Connections, error)

GetConnections get connection from file

func GetCryptKey

func GetCryptKey() (string, error)

GetCryptKey get master key from keyring

func SavePrivateKey

func SavePrivateKey(connection *connect.Connect) (string, error)

SavePrivateKey create private key for connection in spec dir

func SetConnections

func SetConnections(connections *connect.Connections) error

SetConnections save connection in file

func UpdatePrivateKey

func UpdatePrivateKey(connection *connect.Connect) (string, error)

UpdatePrivateKey update data private key

Types

This section is empty.

Jump to

Keyboard shortcuts

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