cmd

package
v0.0.0-...-030a24c Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2018 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "stymie",
	Short: "A cryptographically secure password manager",
	Long:  "`stymie` is a password manager that uses GPG to encrypt and sign all the things.",
}

RootCmd represents the base command when called without any subcommands

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func GetStymieDir

func GetStymieDir() string

Types

type ByKey

type ByKey []string

func (ByKey) Len

func (a ByKey) Len() int

func (ByKey) Less

func (a ByKey) Less(i, j int) bool

func (ByKey) Swap

func (a ByKey) Swap(i, j int)

type GPGConfig

type GPGConfig struct {
	Armor     bool   `json:"armor"`
	Sign      bool   `json:"sign"`
	Recipient string `json:"recipient"`
}

https://talks.golang.org/2012/10things.slide#4

type Key

type Key struct {
	Fields map[string]string `json:"fields"`
}

func GetKeyFields

func GetKeyFields(passConfig PassConfig) *Key
-----------------------------------------------------------

Public

-----------------------------------------------------------

type PassConfig

type PassConfig struct {
	Diceware  int `json:"diceware"`  // Number of words in a Diceware passphrase.
	Sillypass int `json:"sillypass"` // Number of characters in a Sillypass password.
}

type Stymie

type Stymie struct {
	Dir string     `json:"dir"`
	GPG *GPGConfig `json:"gpg"`
	// TODO: Why can't PassConfig be a pointer? 20180603
	PassConfig PassConfig      `json:"passConfig"`
	Keys       map[string]*Key `json:"keys"`
}

func (*Stymie) Decrypt

func (c *Stymie) Decrypt(b []byte) []byte
-----------------------------------------------------------

Stymie methods

-----------------------------------------------------------

func (*Stymie) Encrypt

func (c *Stymie) Encrypt(b []byte) []byte

func (*Stymie) GetFileContents

func (c *Stymie) GetFileContents() error

func (*Stymie) PutFileContents

func (c *Stymie) PutFileContents()

Jump to

Keyboard shortcuts

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