keepassv2

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2021 License: ISC Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapEntry

func WrapEntry(entry *g.Entry, db t.Database) t.Entry

func WrapGroup

func WrapGroup(g *gokeepasslib.Group, db t.Database) t.Group

WrapGroup wraps a bare gokeepasslib.Group and a database in a Group wrapper

Types

type Database

type Database struct {
	c.Database
	// contains filtered or unexported fields
}

func (*Database) Binary

func (d *Database) Binary(id int, name string) (t.OptionalWrapper, error)

Binary returns a Value in an OptionalWrapper representing a binary because v2 stores half the metadata in the entry and half in the database, this function takes a 'Name' parameter so it can properly create the values Returns an empty Value (not even with a Name) if the binary doesn't exit, Returns a full Value if it does

func (*Database) Init

func (d *Database) Init(opts t.Options) error

Init will initialize the database.

func (*Database) Raw

func (d *Database) Raw() interface{}

func (*Database) Root

func (d *Database) Root() t.Group

func (*Database) Save

func (d *Database) Save() error

func (*Database) Version

func (d *Database) Version() t.Version

Version returns the t.Version enum for this DB

type Entry

type Entry struct {
	c.Entry
	// contains filtered or unexported fields
}

func (*Entry) CreationTime

func (e *Entry) CreationTime() time.Time

func (*Entry) ExpiredTime

func (e *Entry) ExpiredTime() time.Time

func (Entry) Get

func (e Entry) Get(field string) t.Value

func (*Entry) LastAccessTime

func (e *Entry) LastAccessTime() time.Time

func (*Entry) LastModificationTime

func (e *Entry) LastModificationTime() time.Time

func (*Entry) Password

func (e *Entry) Password() string

func (*Entry) Raw

func (e *Entry) Raw() interface{}

func (*Entry) Set

func (e *Entry) Set(value t.Value) bool

func (*Entry) SetCreationTime

func (e *Entry) SetCreationTime(t time.Time)

func (*Entry) SetExpiredTime

func (e *Entry) SetExpiredTime(t time.Time)

func (*Entry) SetLastAccessTime

func (e *Entry) SetLastAccessTime(t time.Time)

func (*Entry) SetLastModificationTime

func (e *Entry) SetLastModificationTime(t time.Time)

func (*Entry) SetPassword

func (e *Entry) SetPassword(password string)

func (*Entry) SetTitle

func (e *Entry) SetTitle(title string)

func (*Entry) SetUsername

func (e *Entry) SetUsername(name string)

func (*Entry) Title

func (e *Entry) Title() string

func (*Entry) UUIDString

func (e *Entry) UUIDString() (string, error)

returns the fully qualified path to the entry, if there's no parent, only the name is returned

func (*Entry) Username

func (e *Entry) Username() string

func (*Entry) Values

func (e *Entry) Values() (values []t.Value, err error)

type Group

type Group struct {
	c.Group
	// contains filtered or unexported fields
}

func (*Group) AddEntry

func (g *Group) AddEntry(e t.Entry) error

func (*Group) AddSubgroup

func (g *Group) AddSubgroup(subgroup t.Group) error

func (*Group) Entries

func (g *Group) Entries() (rv []t.Entry)

func (*Group) Groups

func (g *Group) Groups() (rv []t.Group)

func (*Group) IsRoot

func (g *Group) IsRoot() bool

func (*Group) Name

func (g *Group) Name() string

func (*Group) NewEntry

func (g *Group) NewEntry(name string) (t.Entry, error)

func (*Group) NewSubgroup

func (g *Group) NewSubgroup(name string) (t.Group, error)

Creates a new subgroup with a given name under this group

func (*Group) Parent

func (g *Group) Parent() t.Group

func (*Group) Raw

func (g *Group) Raw() interface{}

func (*Group) RemoveEntry

func (g *Group) RemoveEntry(entry t.Entry) error

func (*Group) RemoveSubgroup

func (g *Group) RemoveSubgroup(subgroup t.Group) error

RemoveSubgroup will remove a group from a parent group If this function returns an error, that means that either the UUIDs on the parent or child were corrupted or the group didn't actually exist in the parent

func (*Group) SetName

func (g *Group) SetName(name string)

func (*Group) SetParent

func (g *Group) SetParent(parent t.Group) error

func (*Group) UUIDString

func (g *Group) UUIDString() (string, error)

type RootGroup

type RootGroup struct {
	// contains filtered or unexported fields
}

func (*RootGroup) AddEntry

func (r *RootGroup) AddEntry(e t.Entry) error

func (*RootGroup) AddSubgroup

func (r *RootGroup) AddSubgroup(subgroup t.Group) error

func (*RootGroup) Entries

func (r *RootGroup) Entries() (rv []t.Entry)

technically, this could return all the entries in the database, but since that's inconsistent with other groups, leaving it this way for now

func (*RootGroup) Groups

func (r *RootGroup) Groups() (rv []t.Group)

func (*RootGroup) IsRoot

func (r *RootGroup) IsRoot() bool

func (*RootGroup) Name

func (r *RootGroup) Name() string

func (*RootGroup) NewEntry

func (r *RootGroup) NewEntry(name string) (t.Entry, error)

func (*RootGroup) NewSubgroup

func (r *RootGroup) NewSubgroup(name string) (t.Group, error)

Creates a new subgroup with a given name under this group

func (*RootGroup) Parent

func (r *RootGroup) Parent() t.Group

func (*RootGroup) Path

func (r *RootGroup) Path() (string, error)

func (*RootGroup) Raw

func (r *RootGroup) Raw() interface{}

func (*RootGroup) RemoveEntry

func (r *RootGroup) RemoveEntry(entry t.Entry) error

func (*RootGroup) RemoveSubgroup

func (r *RootGroup) RemoveSubgroup(subgroup t.Group) error

func (*RootGroup) Search

func (r *RootGroup) Search(term *regexp.Regexp) (paths []string, err error)

func (*RootGroup) SetName

func (r *RootGroup) SetName(name string)

func (*RootGroup) SetParent

func (r *RootGroup) SetParent(parent t.Group) error

func (*RootGroup) UUIDString

func (r *RootGroup) UUIDString() (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL