Documentation
¶
Index ¶
- Constants
- Variables
- func DeletePrivateKey(connection *connect.Connect) error
- func GetConnections() (*connect.Connections, error)
- func GetCryptKey() (string, error)
- func SavePrivateKey(connection *connect.Connect) (string, error)
- func SetConnections(connections *connect.Connections) error
- func UpdatePrivateKey(connection *connect.Connect) (string, error)
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 ¶
DeletePrivateKey delete key from dir for current connection
func GetConnections ¶
func GetConnections() (*connect.Connections, error)
GetConnections get connection from file
func SavePrivateKey ¶
SavePrivateKey create private key for connection in spec dir
func SetConnections ¶
func SetConnections(connections *connect.Connections) error
SetConnections save connection in file
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.