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)
- func GenerateFileHash(filename string) (hash string, err error)
- type Attachment
- type Backend
- type Database
- func (d *Database) Backend() t.Backend
- 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) SetBackend(backend *Backend)
- func (d *Database) SetChanged(changed bool)
- func (d *Database) SetCurrentLocation(g t.Group)
- func (d *Database) SetDriver(driver t.Database)
- func (d *Database) SetSavePath(path 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 EntryValue
- func (v EntryValue) FormattedValue(full bool) string
- func (v EntryValue) Name() string
- func (v EntryValue) NameTitle() string
- func (v EntryValue) Output(showProtected bool) string
- func (v EntryValue) Protected() bool
- func (v EntryValue) ReadOnly() bool
- func (v EntryValue) Searchable() bool
- func (v EntryValue) Type() t.ValueType
- func (v EntryValue) Value() []byte
- type Group
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindPathToGroup ¶
func FormatTime ¶
func GenerateFileHash ¶
Types ¶
type Attachment ¶
type Attachment struct {
EntryValue
}
func (Attachment) FormattedValue ¶
func (a Attachment) FormattedValue(full bool) string
func (Attachment) Output ¶
func (a Attachment) Output(showProtected bool) string
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
func InitBackend ¶
func (Backend) IsModified ¶
IsModified determines whether or not the underlying storage has been modified since the utility was opened, indicating that something will get stomped
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 original file path. This will overwrite whatever's in the main location, handle with care
func (*Database) SetBackend ¶
SetBackend and Backend manage a cached hash representing the state of the backend
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 ¶
SetSavePath is a shortcut for setting the backend filename
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 EntryValue ¶
type EntryValue struct {
// contains filtered or unexported fields
}
func NewValue ¶
func NewValue(value []byte, name string, searchable bool, protected bool, readOnly bool, valueType t.ValueType) EntryValue
NewValue initializes a value object
func (EntryValue) FormattedValue ¶
func (v EntryValue) FormattedValue(full bool) string
FormattedValue returns the appropriately formatted value contents, with the `full` argument determining whether protected values should be returned in cleartext
func (EntryValue) Name ¶
func (v EntryValue) Name() string
func (EntryValue) NameTitle ¶
func (v EntryValue) NameTitle() string
func (EntryValue) Output ¶
func (v EntryValue) Output(showProtected bool) string
func (EntryValue) Protected ¶
func (v EntryValue) Protected() bool
func (EntryValue) ReadOnly ¶
func (v EntryValue) ReadOnly() bool
func (EntryValue) Searchable ¶
func (v EntryValue) Searchable() bool
func (EntryValue) Type ¶
func (v EntryValue) Type() t.ValueType
func (EntryValue) Value ¶
func (v EntryValue) Value() []byte