Documentation ¶
Index ¶
- Variables
- func EntitiesFromKeyRing(keyRingName string, ids []string) (openpgp.EntityList, error)
- func EntityMatchesAnyId(entity *openpgp.Entity, ids []string) bool
- func EntityMatchesId(entity *openpgp.Entity, id string) bool
- func IdMatchesAnyEntity(id string, el openpgp.EntityList) bool
- func InitRepo(fs *CryptoFS, ids []string) error
- func ReadEncrypted(ciphertext io.ReadCloser, el openpgp.EntityList, passphrase []byte) (io.ReadCloser, error)
- func ReadKeyRing(keyRingName string) (openpgp.EntityList, error)
- func WriteEncrypted(ciphertext io.WriteCloser, el openpgp.EntityList) (io.WriteCloser, error)
- type Config
- type CryptoFS
- func (fs CryptoFS) CheckIdentities(ids []string) error
- func (fs CryptoFS) CreateEncrypted(name string) (io.WriteCloser, error)
- func (fs CryptoFS) Identities() ([]string, error)
- func (fs CryptoFS) Join(elem ...string) string
- func (fs CryptoFS) OpenEncrypted(name string, passphrase []byte) (io.ReadCloser, error)
- func (fs CryptoFS) SetIdentities(ids []string) error
- type Field
- type FieldSlice
- type FileRepo
- func (r *FileRepo) Create(key string) (io.WriteCloser, error)
- func (r *FileRepo) Line(key string, passphrase []byte) (string, error)
- func (r *FileRepo) Open(key string, passphrase []byte) (io.ReadCloser, error)
- func (r *FileRepo) Remove(key string) error
- func (r *FileRepo) Walk(walkFn func(file string)) error
- type Form
- type FormRepo
- func (r *FormRepo) Fields(key string) (*Form, error)
- func (r *FormRepo) Get(key string, passphrase []byte) (*Form, error)
- func (r *FormRepo) List() ([]Form, error)
- func (r *FormRepo) Put(form *Form) error
- func (r *FormRepo) Remove(key string) error
- func (r *FormRepo) Search(query string) ([]Form, error)
- type GpgEntityRepo
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 IdMatchesAnyEntity ¶
func IdMatchesAnyEntity(id string, el openpgp.EntityList) bool
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 ReadConfig ¶ added in v0.2.8
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 (CryptoFS) CreateEncrypted ¶
func (fs CryptoFS) CreateEncrypted(name string) (io.WriteCloser, error)
func (CryptoFS) Identities ¶
func (CryptoFS) OpenEncrypted ¶
func (CryptoFS) SetIdentities ¶
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 ¶
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 ¶
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)
Click to show internal directories.
Click to hide internal directories.