keys

package
v0.1.44 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key struct {
	// Content contains the content of the key
	Content []byte
	// Fingerprint contains a unique string value that identifies this key
	Fingerprint string
	// IsPasswordProtected defines if the key is protected by a password
	IsPasswordProtected bool
	// Name contains the name of the key (applies to only TypeSSHPublic keys if it's specified)
	Name string
	// Path contains a usable relative path to the key
	Path string
	// Type contains the type of key
	Type Type
}

Key represents a logical key

func GetSSH

func GetSSH(keysDirectory string) ([]Key, error)

func (Key) String

func (k Key) String() string

type Type

type Type string

Type is a string symbol that indicates the type of key we're dealing with

const (
	// TypeSSHPrivate indicates the key is a private key
	TypeSSHPrivate Type = "KEY_SSH_PRIVATE"
	// TypeSSHpublic indicates the key is a public key
	TypeSSHPublic Type = "KEY_SSH_PUBLIC"
	// TypePGP indicates a Pretty Good Privacy key
	TypePGP Type = "KEY_PGP"
	// TypeGPG is an alias for TypePGP (heh)
	TypeGPG Type = TypePGP
)

Jump to

Keyboard shortcuts

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