Documentation ¶
Index ¶
- func Connection(c *m.Config) string
- type DB
- func (d *DB) Archived(hash string)
- func (d *DB) CheckTemp2FAToken(t string) bool
- func (d *DB) DefaultSettings() m.Settings
- func (d *DB) GetBookmarkByHash(hash string) m.Entity
- func (d *DB) GetBookmarks(id uint) []m.Entity
- func (d *DB) GetFolders(id uint) []m.Folder
- func (d *DB) GetRecentBookmarks(id uint) []m.Entity
- func (d *DB) GetShared(shareHash string) m.Entity
- func (d *DB) GetSubEntities(hash string, id uint) []m.Folder
- func (d *DB) GetSubFolders(hash string, id uint) []m.Folder
- func (d *DB) Init(c *m.Config)
- func (d *DB) LoadSettings() m.Settings
- func (d *DB) Register(user, pass, last, first, mail string) error
- func (d *DB) SaveBookmarkToFolder(parentHash string, b m.Bookmark) error
- func (d *DB) SaveEntity(e m.Entity)
- func (d *DB) SaveFolder(f m.Folder)
- func (d *DB) SaveSubFolder(parentHash string, sub m.Folder) error
- func (d *DB) SetTemp2FAToken(u *m.User, t string, expirationTime time.Time) error
- func (d *DB) ShareBookmark(hash string) (string, error)
- func (d *DB) Update2FA(username, key string) error
- func (d *DB) ValidateCredentials(username, inputPass string) (bool, m.User)
- func (d *DB) ValidateNewCredentials(u, p string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Connection ¶
Connection creates the connection string and returns it.
Types ¶
type DB ¶
DB is the top-level Database instance.
func (*DB) CheckTemp2FAToken ¶
CheckTemp2FAToken checks the temp 2FA token and its expiration timestamp
func (*DB) DefaultSettings ¶
func (*DB) Init ¶
Init sets up the Database connection. This function will panic if the connection isn't possible.
func (*DB) LoadSettings ¶
func (*DB) SaveBookmarkToFolder ¶
func (*DB) SaveEntity ¶
func (*DB) SaveFolder ¶
func (*DB) SetTemp2FAToken ¶
SetTempTwoFAToken sets a temp 2FA token and its expiration timestamp
func (*DB) ValidateCredentials ¶
func (*DB) ValidateNewCredentials ¶
Click to show internal directories.
Click to hide internal directories.