Documentation ¶
Index ¶
- func CompareUUIDs(me t.UUIDer, them t.UUIDer) (bool, error)
- func FindPathToGroup(source t.Group, target t.Group) (rv []t.Group, err error)
- func FormatTime(t time.Time) (formatted string)
- type Database
- func (d *Database) Backup() error
- func (d *Database) BackupPath() string
- func (d *Database) Changed() bool
- func (d *Database) CurrentLocation() t.Group
- func (d *Database) Lock() error
- func (d *Database) Locked() bool
- func (d *Database) Path() (string, error)
- func (d *Database) RemoveBackup() error
- func (d *Database) RestoreBackup() error
- func (d *Database) SavePath() string
- func (d *Database) Search(term *regexp.Regexp) (paths []string, err error)
- func (d *Database) SetChanged(changed bool)
- func (d *Database) SetCurrentLocation(g t.Group)
- func (d *Database) SetDriver(driver t.Database)
- func (d *Database) SetSavePath(newPath string)
- func (d *Database) Unlock() error
- type Entry
- func (e *Entry) DB() t.Database
- func (e *Entry) Output(full bool) (val string)
- func (e *Entry) Parent() t.Group
- func (e *Entry) Path() (path string, err error)
- func (e *Entry) Search(term *regexp.Regexp) (paths []string, err error)
- func (e *Entry) SetDB(db t.Database)
- func (e *Entry) SetDriver(entry t.Entry)
- func (e *Entry) SetParent(g t.Group) error
- type Group
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindPathToGroup ¶
func FormatTime ¶
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func (*Database) Backup ¶
Backup executes a backup, if the database exists, otherwise it will do nothing
func (*Database) BackupPath ¶
BackupPath returns the path to which a backup can be written or restored
func (*Database) CurrentLocation ¶
CurrentLocation returns the group currently used as the user's shell location in the DB
func (*Database) Path ¶
Path will walk up the group hierarchy to determine the path to the current location
func (*Database) RemoveBackup ¶
RemoveBackup will delete the backup database
func (*Database) RestoreBackup ¶
RestoreBackup will restore a backup from the BackupPath() to the SavePath(). This will overwrite whatever's in the main location, handle with care
func (*Database) SetChanged ¶
func (*Database) SetCurrentLocation ¶
func (*Database) SetDriver ¶
SetDriver sets pointer to the version of itself that can access child methods... FIXME this is a bit of a mind bender
func (*Database) SetSavePath ¶
type Entry ¶
type Entry struct {
// contains filtered or unexported fields
}
func (*Entry) Path ¶
Path returns the fully qualified path to the entry, if there's no parent, only the name is returned
func (*Entry) Search ¶
TODO test various fields to make sure they are searchable, consider adding searchability toggle
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
func NewValue ¶
func NewValue(value []byte, name string, searchable bool, protected bool, readOnly bool, valueType t.ValueType) Value
NewValue initializes a value object
func (Value) FormattedValue ¶
FormattedValue returns the appropriately formatted value contents, with the `full` argument determining whether protected values should be returned in cleartext