oyster

package module
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: May 24, 2015 License: MIT Imports: 15 Imported by: 0

README

Oyster

GPG password store.

Installation

Oyster encrypts your passwords with your GPG key. If you do not have GPG key already, set one up before installed Oyster.

OSX

You must have a GPG key setup before installing Oyster.

brew tap proglottis/oyster
brew install oyster
Chrome Extension
Post Install

Make sure your password repository is setup.

oyster init <your gpg key ID or email>

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCannotDecryptKey = errors.New("Cannot decrypt key")
	ErrNoMatchingKeys   = errors.New("No matching keys")
)
View Source
var (
	ErrNotFound = errors.New("Not found")
)

Functions

func EntitiesFromKeyRing

func EntitiesFromKeyRing(keyRingName string, ids []string) (openpgp.EntityList, error)

func EntityMatchesAnyId

func EntityMatchesAnyId(entity *openpgp.Entity, ids []string) bool

func EntityMatchesId

func EntityMatchesId(entity *openpgp.Entity, id string) bool

func IdMatchesAnyEntity

func IdMatchesAnyEntity(id string, el openpgp.EntityList) bool

func InitRepo

func InitRepo(fs *CryptoFS, ids []string) error

func ReadEncrypted

func ReadEncrypted(ciphertext io.ReadCloser, el openpgp.EntityList, passphrase []byte) (io.ReadCloser, error)

func ReadKeyRing

func ReadKeyRing(keyRingName string) (openpgp.EntityList, error)

func WriteEncrypted

func WriteEncrypted(ciphertext io.WriteCloser, el openpgp.EntityList) (io.WriteCloser, error)

Types

type Config added in v0.2.8

type Config struct {
	// contains filtered or unexported fields
}

func NewConfig added in v0.2.8

func NewConfig() *Config

func ReadConfig added in v0.2.8

func ReadConfig() (*Config, error)

func (*Config) GpgHome added in v0.2.8

func (c *Config) GpgHome() string

func (*Config) Home added in v0.2.8

func (c *Config) Home() string

type CryptoFS

type CryptoFS struct {
	rwvfs.FileSystem
	// contains filtered or unexported fields
}

func NewCryptoFS

func NewCryptoFS(fs rwvfs.FileSystem, entities GpgEntityRepo) *CryptoFS

func (CryptoFS) CheckIdentities

func (fs CryptoFS) CheckIdentities(ids []string) error

func (CryptoFS) CreateEncrypted

func (fs CryptoFS) CreateEncrypted(name string) (io.WriteCloser, error)

func (CryptoFS) Identities

func (fs CryptoFS) Identities() ([]string, error)

func (CryptoFS) Join

func (fs CryptoFS) Join(elem ...string) string

func (CryptoFS) OpenEncrypted

func (fs CryptoFS) OpenEncrypted(name string, passphrase []byte) (io.ReadCloser, error)

func (CryptoFS) SetIdentities

func (fs CryptoFS) SetIdentities(ids []string) error

type Field

type Field struct {
	Name  string `json:"name"`
	Value string `json:"value,omitempty"`
}

type FieldSlice

type FieldSlice []Field

func (FieldSlice) Len

func (p FieldSlice) Len() int

func (FieldSlice) Less

func (p FieldSlice) Less(i, j int) bool

func (FieldSlice) Swap

func (p FieldSlice) Swap(i, j int)

type FileRepo

type FileRepo struct {
	// contains filtered or unexported fields
}

func NewFileRepo

func NewFileRepo(fs *CryptoFS) *FileRepo

func (*FileRepo) Create

func (r *FileRepo) Create(key string) (io.WriteCloser, error)

func (*FileRepo) Line

func (r *FileRepo) Line(key string, passphrase []byte) (string, error)

func (*FileRepo) Open

func (r *FileRepo) Open(key string, passphrase []byte) (io.ReadCloser, error)

func (*FileRepo) Remove

func (r *FileRepo) Remove(key string) error

func (*FileRepo) Walk

func (r *FileRepo) Walk(walkFn func(file string)) error

type Form

type Form struct {
	Key    string     `json:"key"`
	Fields FieldSlice `json:"fields,omitempty"`
}

type FormRepo

type FormRepo struct {
	// contains filtered or unexported fields
}

func NewFormRepo

func NewFormRepo(fs *CryptoFS) *FormRepo

func (*FormRepo) Fields

func (r *FormRepo) Fields(key string) (*Form, error)

func (*FormRepo) Get

func (r *FormRepo) Get(key string, passphrase []byte) (*Form, error)

func (*FormRepo) List added in v0.2.4

func (r *FormRepo) List() ([]Form, error)

func (*FormRepo) Put

func (r *FormRepo) Put(form *Form) error

func (*FormRepo) Remove added in v0.2.5

func (r *FormRepo) Remove(key string) error

func (*FormRepo) Search

func (r *FormRepo) Search(query string) ([]Form, error)

type GpgEntityRepo added in v0.2.9

type GpgEntityRepo struct {
	// contains filtered or unexported fields
}

func NewGpgRepo

func NewGpgRepo(root string) GpgEntityRepo

func (GpgEntityRepo) DefaultKeys added in v0.2.9

func (r GpgEntityRepo) DefaultKeys() ([]string, error)

func (GpgEntityRepo) PublicKeyRing added in v0.2.9

func (r GpgEntityRepo) PublicKeyRing(ids []string) (openpgp.EntityList, error)

func (GpgEntityRepo) SecureKeyRing added in v0.2.9

func (r GpgEntityRepo) SecureKeyRing(ids []string) (openpgp.EntityList, error)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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