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 GpgHome() string
- func Home() string
- 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 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 EntityRepo
- 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)
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 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 (CryptoFS) CreateEncrypted ¶
func (fs CryptoFS) CreateEncrypted(name string) (io.WriteCloser, error)
func (CryptoFS) Identities ¶
func (CryptoFS) OpenEncrypted ¶
func (CryptoFS) SetIdentities ¶
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 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 ¶
Click to show internal directories.
Click to hide internal directories.