oyster

package module
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: May 20, 2015 License: MIT Imports: 14 Imported by: 0

README

Oyster

OpenPGP password storage.

Installation

OSX

You must have a PGP 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 GpgHome added in v0.2.4

func GpgHome() string

func Home added in v0.2.4

func Home() string

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 CryptoFS

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

func NewCryptoFS

func NewCryptoFS(fs rwvfs.FileSystem, entities EntityRepo) *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 EntityRepo

type EntityRepo interface {
	SecureKeyRing(ids []string) (openpgp.EntityList, error)
	PublicKeyRing(ids []string) (openpgp.EntityList, error)
}

func NewGpgRepo

func NewGpgRepo(root string) EntityRepo

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) Search

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

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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