Documentation ¶
Index ¶
- type DB
- func (db *DB) AddAccount(user string, host string) error
- func (db *DB) AddCollective(name string, host string) error
- func (db *DB) AddInvite(code string, user string) error
- func (db *DB) AddLastSeen(user string, lastSeen time.Time) error
- func (db *DB) AddOpenpgpNotification(dn string, fingerprint string) error
- func (db *DB) Close()
- func (db *DB) CountCollectives(host string) (int, error)
- func (db *DB) DelInvite(code string) error
- func (db *DB) ExpireAccounts(duration time.Duration) error
- func (db *DB) ExpireCollectives(duration time.Duration) error
- func (db *DB) ExpireInvites(duration time.Duration) error
- func (db *DB) ExpireLastSeen(duration time.Duration) error
- func (db *DB) ExpireOpenpgpNotifications(duration time.Duration) error
- func (db *DB) GetHost(user string) (string, error)
- func (db *DB) GetLastSeen(user string) (time.Time, error)
- func (db *DB) GetOpenpgpNotification(dn string) (string, error)
- func (db *DB) InviteHost(code string) (string, error)
- func (db *DB) IsInviteValid(code string) bool
- func (db *DB) ListUserInvites(user string) ([]Invite, error)
- type Invite
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB to store the status of lowry
func (*DB) AddAccount ¶
AddAccount stores in the db the account and it's host who invited it
func (*DB) AddCollective ¶
AddCollective stores in the db the collective that was created by host
func (*DB) AddLastSeen ¶
AddLastSeen stores in the db the account and it's lastseen date
func (*DB) AddOpenpgpNotification ¶
AddOpenpgpNotification stores in the db the dn being notified for their key being expired
func (*DB) CountCollectives ¶
CountCollectives returns the nubmer of collectives created by host
func (*DB) ExpireAccounts ¶
ExpireAccounts older than duration
func (*DB) ExpireCollectives ¶
ExpireCollectives older than duration
func (*DB) ExpireInvites ¶
ExpireInvites older than duration
func (*DB) ExpireLastSeen ¶
ExpireLastSeen older than duration
func (*DB) ExpireOpenpgpNotifications ¶
ExpireOpenpgpNotifications older than duration
func (*DB) GetLastSeen ¶
GetLastSeen time for the user
func (*DB) GetOpenpgpNotification ¶
GetOpenpgpNotification gets the fingerprint latest notification for the dn
func (*DB) InviteHost ¶
InviteHost returns the user name that created the inviteValue
func (*DB) IsInviteValid ¶
IsInviteValid checks if the inviteValue code is in the database