Documentation ¶
Index ¶
- type DbDriver
- func (h *DbDriver) AddGPGKey(key models.GPGKey) (string, bool, error)
- func (h *DbDriver) AddGPGKeys(keys []models.GPGKey) (ids []string, addeds []bool, err error)
- func (h *DbDriver) AddUser(um models.User) (string, error)
- func (h *DbDriver) AddUserToken(ut models.UserToken) (string, error)
- func (h *DbDriver) DeleteGPGKey(key models.GPGKey) error
- func (h *DbDriver) FetchGPGKeyByFingerprint(fingerprint string) (*models.GPGKey, error)
- func (h *DbDriver) FetchGPGKeysWithoutSubKeys() ([]models.GPGKey, error)
- func (h *DbDriver) FindGPGKeyByEmail(email string, pageStart, pageEnd int) ([]models.GPGKey, error)
- func (h *DbDriver) FindGPGKeyByFingerPrint(fingerprint string, pageStart, pageEnd int) ([]models.GPGKey, error)
- func (h *DbDriver) FindGPGKeyByName(name string, pageStart, pageEnd int) ([]models.GPGKey, error)
- func (h *DbDriver) FindGPGKeyByValue(value string, pageStart, pageEnd int) ([]models.GPGKey, error)
- func (h *DbDriver) FinishCursor() error
- func (h *DbDriver) GetUser(username string) (um *models.User, err error)
- func (h *DbDriver) GetUserToken(token string) (ut *models.UserToken, err error)
- func (h *DbDriver) HealthCheck() error
- func (h *DbDriver) InitCursor() error
- func (h *DbDriver) InvalidateUserTokens() (int, error)
- func (h *DbDriver) NextGPGKey(key *models.GPGKey) bool
- func (h *DbDriver) NextUser(user *models.User) bool
- func (h *DbDriver) NumGPGKeys() (int, error)
- func (h *DbDriver) RemoveUserToken(token string) (err error)
- func (h *DbDriver) UpdateGPGKey(key models.GPGKey) error
- func (h *DbDriver) UpdateUser(um models.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DbDriver ¶
type DbDriver struct {
// contains filtered or unexported fields
}
DbDriver is a database driver for in-memory database for testing
func MakeMemoryDBDriver ¶
MakeMemoryDBDriver creates a new database driver for rethinkdb
func (*DbDriver) AddGPGKey ¶
AddGPGKey adds a GPG Key to the database or update an existing one by fingerprint Returns generated id / hasBeenAdded / error
func (*DbDriver) AddGPGKeys ¶
AddGPGKey adds a list GPG Key to the database or update an existing one by fingerprint Same as AddGPGKey but in a single transaction
func (*DbDriver) AddUserToken ¶
func (*DbDriver) FetchGPGKeyByFingerprint ¶
func (*DbDriver) FetchGPGKeysWithoutSubKeys ¶
func (*DbDriver) FindGPGKeyByEmail ¶
func (*DbDriver) FindGPGKeyByFingerPrint ¶
func (*DbDriver) FindGPGKeyByName ¶
func (*DbDriver) FindGPGKeyByValue ¶
func (*DbDriver) FinishCursor ¶
func (*DbDriver) GetUserToken ¶
func (*DbDriver) HealthCheck ¶
func (*DbDriver) InitCursor ¶
func (*DbDriver) InvalidateUserTokens ¶
func (*DbDriver) NumGPGKeys ¶
func (*DbDriver) RemoveUserToken ¶
RemoveUserToken removes a user token from the database
Click to show internal directories.
Click to hide internal directories.