Documentation ¶
Index ¶
- func Backup(w http.ResponseWriter, r *http.Request) error
- func BackupHTTP(w http.ResponseWriter, r *http.Request)
- func BackupLocal() error
- func HashPassword(s string) string
- func NewHTTPError(err error, status int, detail string) error
- func ReadRecord(r Recorder) error
- func RemoveRecord(r Recorder) error
- func Serve()
- func WriteRecord(r Recorder) error
- type Application
- type BoltOption
- type BoltRecord
- func (r *BoltRecord) AddRecord() error
- func (r *BoltRecord) DeleteEncryptedRecord(db *bbolt.DB) error
- func (r *BoltRecord) DeletePlainRecord(db *bbolt.DB) error
- func (r *BoltRecord) DeleteRecord() error
- func (r *BoltRecord) GetEncryptedRecord(db *bbolt.DB) error
- func (r *BoltRecord) GetPlainRecord(db *bbolt.DB) error
- func (r *BoltRecord) GetRecord() error
- type ClientError
- type HTTPError
- type MasterPass
- type Password
- type Recorder
- type Route
- type Routes
- type Status
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BackupHTTP ¶
func BackupHTTP(w http.ResponseWriter, r *http.Request)
func BackupLocal ¶
func BackupLocal() error
func HashPassword ¶
func ReadRecord ¶
func RemoveRecord ¶
func WriteRecord ¶
Types ¶
type Application ¶
type Application struct { Application string `json:"application"` Username string `json:"username"` Password string `json:"password"` // contains filtered or unexported fields }
func (*Application) String ¶
func (a *Application) String() string
type BoltOption ¶
type BoltOption func(*BoltRecord) (*BoltRecord, error)
func BoltBucket ¶
func BoltBucket(bucket string) BoltOption
BoltBucket sets the bucket as the string parameter
func BoltValue ¶
func BoltValue(value []byte) BoltOption
BoltValue sets the value as the byte slice parameter
type BoltRecord ¶
BoltRecord is a record that holds the values for a BoltDB Bucket, Key, and VAlue.
func NewBoltRecord ¶
func NewBoltRecord(opts ...BoltOption) (*BoltRecord, error)
NewBoltRecord takes optional values and either returns an empty BoltRecord or a record containing the optional values.
func (*BoltRecord) AddRecord ¶
func (r *BoltRecord) AddRecord() error
AddRecord creates a bucket and a key value pair inside of the bucket using a record for values.
func (*BoltRecord) DeleteEncryptedRecord ¶
func (r *BoltRecord) DeleteEncryptedRecord(db *bbolt.DB) error
DeleteEncryptedRecord only deletes keys that are encrypted. These are things like credentials.
func (*BoltRecord) DeletePlainRecord ¶
func (r *BoltRecord) DeletePlainRecord(db *bbolt.DB) error
DeletePlainRecord deletes keys with only plaintext values. These are things like user records.
func (*BoltRecord) DeleteRecord ¶
func (r *BoltRecord) DeleteRecord() error
DeleteRecord calls either DeletetPlainRecord or DeleteEncryptedRecord depending on the name of the bucket.
func (*BoltRecord) GetEncryptedRecord ¶
func (r *BoltRecord) GetEncryptedRecord(db *bbolt.DB) error
GetEncryptedRecord reads only encrypted keys in a bucket.
func (*BoltRecord) GetPlainRecord ¶
func (r *BoltRecord) GetPlainRecord(db *bbolt.DB) error
GetPlainRecord specifically looks for an unencrypted key name
func (*BoltRecord) GetRecord ¶
func (r *BoltRecord) GetRecord() error
GetRecord calls either the GetPlainRecord or GetEncryptedRecord depending on whether the bucket name.
type ClientError ¶
type HTTPError ¶
type MasterPass ¶
type MasterPass struct {
MasterPassword string `json:"master_password"`
}
type Password ¶
type Password struct { PlainText string `json:"password"` // contains filtered or unexported fields }