credentials

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateMasterKey

func GenerateMasterKey() ([]byte, error)

func LastIndex

func LastIndex(data []byte, b byte) int

func LoadMasterKey

func LoadMasterKey(filename string) ([]byte, error)

func RemoveCredential added in v0.3.1

func RemoveCredential(filename string, host string, key []byte) error

func RevealCredentialPassword added in v0.4.0

func RevealCredentialPassword(filename string, host string, key []byte) (string, error)

func SaveMasterKey

func SaveMasterKey(filename string, key []byte) error

func UpsertCredential added in v0.3.1

func UpsertCredential(filename string, host, hostname, user, port string, password string, key []byte) error

Types

type Credentials

type Credentials struct {
	Entries map[string]Entry `json:"credentials"`
}

func LoadCredentials

func LoadCredentials(filename string, key []byte) (Credentials, error)

type Entry added in v0.4.0

type Entry struct {
	Password string `json:"password"`
	Hostname string `json:"hostname"`
	User     string `json:"user"`
	Port     string `json:"port"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳