func InitRepo(fs *CryptoFS, ids []string) error { if err := fs.CheckIdentities(ids); err != nil { return err } if err := rwvfs.MkdirAll(fs, "/"); err != nil { return err } return fs.SetIdentities(ids) }
func (r *FormRepo) Put(form *Form) error { if err := rwvfs.MkdirAll(r.fs, form.Key); err != nil { return err } for _, field := range form.Fields { if err := r.putField(form.Key, field); err != nil { return err } } return nil }
func (r *FileRepo) Create(key string) (io.WriteCloser, error) { if err := rwvfs.MkdirAll(r.fs, filepath.Dir(key)); err != nil { return nil, err } return r.fs.CreateEncrypted(key + fileExtension) }