Documentation ¶
Index ¶
- type DB
- func (db DB) BeginTx(ctx context.Context) (*sqlx.Tx, error)
- func (db DB) DeleteClient(id uuid.UUID, opts store.QueryOptions) error
- func (db DB) DeleteClientAPIKey(clientID, keyID uuid.UUID, opts store.QueryOptions) error
- func (db DB) DeleteSession(token string, opts store.QueryOptions) error
- func (db DB) DeleteUser(id uuid.UUID, opts store.QueryOptions) error
- func (db DB) GetClientAPIKey(clientID uuid.UUID, prefix string, opts store.QueryOptions) (store.APIKey, error)
- func (db DB) GetClientById(id uuid.UUID, opts store.QueryOptions) (store.Client, error)
- func (db DB) GetSession(token string, opts store.QueryOptions) (store.Session, error)
- func (db DB) GetUserByEmail(email string, opts store.QueryOptions) (store.User, error)
- func (db DB) GetUserById(id uuid.UUID, opts store.QueryOptions) (store.User, error)
- func (db DB) GetUserPasswordHash(userID uuid.UUID, opts store.QueryOptions) (string, error)
- func (db DB) InsertAPIKey(key store.NewAPIKey, opts store.QueryOptions) (uuid.UUID, error)
- func (db DB) InsertClient(client store.NewClient, opts store.QueryOptions) (uuid.UUID, error)
- func (db DB) InsertEmail(email store.NewEmail, opts store.QueryOptions) (uuid.UUID, error)
- func (db DB) InsertPassword(password store.NewPassword, opts store.QueryOptions) (uuid.UUID, error)
- func (db DB) InsertUser(user store.NewUser, opts store.QueryOptions) (uuid.UUID, error)
- func (db DB) ListClientAPIKeys(clientID uuid.UUID, opts store.QueryOptions) ([]store.APIKey, error)
- func (db DB) ListClients(opts store.QueryOptions) ([]store.Client, error)
- func (db DB) ListUsers(opts store.QueryOptions) ([]store.User, error)
- func (db DB) SaveClient(client store.Client, opts store.QueryOptions) error
- func (db DB) SaveSession(session store.Session, opts store.QueryOptions) error
- func (db DB) SaveUser(user store.User, opts store.QueryOptions) error
- type Querier
- type UUIDGenerator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct { Conn *sqlx.DB UUIDGenerator UUIDGenerator }
func (DB) DeleteClient ¶
func (db DB) DeleteClient(id uuid.UUID, opts store.QueryOptions) error
func (DB) DeleteClientAPIKey ¶
func (db DB) DeleteClientAPIKey(clientID, keyID uuid.UUID, opts store.QueryOptions) error
func (DB) DeleteSession ¶
func (db DB) DeleteSession(token string, opts store.QueryOptions) error
func (DB) DeleteUser ¶
func (db DB) DeleteUser(id uuid.UUID, opts store.QueryOptions) error
func (DB) GetClientAPIKey ¶
func (DB) GetClientById ¶
func (DB) GetSession ¶
func (DB) GetUserByEmail ¶
func (DB) GetUserById ¶
func (DB) GetUserPasswordHash ¶
func (db DB) GetUserPasswordHash(userID uuid.UUID, opts store.QueryOptions) (string, error)
func (DB) InsertAPIKey ¶
func (DB) InsertClient ¶
func (DB) InsertEmail ¶
func (DB) InsertPassword ¶
func (db DB) InsertPassword(password store.NewPassword, opts store.QueryOptions) (uuid.UUID, error)
func (DB) InsertUser ¶
func (DB) ListClientAPIKeys ¶
func (DB) ListClients ¶
func (DB) SaveClient ¶
func (DB) SaveSession ¶
type UUIDGenerator ¶
type UUIDGenerator interface {
GenerateUUID() uuid.UUID
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.