Documentation
¶
Index ¶
- func NewPostgresPool(cfg config.DBConfig) (*pgxpool.Pool, error)
- type QueryTracer
- type Store
- func (r *Store) ConsumeOAuthCode(ctx context.Context, codeID uuid.UUID, usedAt time.Time) error
- func (r *Store) ConsumePasswordResetToken(ctx context.Context, id uuid.UUID, usedAt time.Time) error
- func (r *Store) CreateOAuthCode(ctx context.Context, code *data.OAuthAuthorizationCode) (*data.OAuthAuthorizationCode, error)
- func (r *Store) CreatePasswordResetToken(ctx context.Context, token *data.PasswordResetToken) (*data.PasswordResetToken, error)
- func (r *Store) CreateSession(ctx context.Context, session *data.Session) (*data.Session, error)
- func (r *Store) CreateUser(ctx context.Context, user *data.User) (*data.User, error)
- func (r *Store) DeleteSession(ctx context.Context, sessionID uuid.UUID) error
- func (r *Store) OAuthCodeByHash(ctx context.Context, codeHash string) (*data.OAuthAuthorizationCode, error)
- func (r *Store) PasswordResetTokenByHash(ctx context.Context, hash string) (*data.PasswordResetToken, error)
- func (r *Store) UpdateUserLastLogin(ctx context.Context, userID uuid.UUID, loginAt time.Time) error
- func (r *Store) UpdateUserPassword(ctx context.Context, userID uuid.UUID, passwordHash string) error
- func (r *Store) User(ctx context.Context, id uuid.UUID) (*data.User, error)
- func (r *Store) UserAndSessionBySessionID(ctx context.Context, sessionID uuid.UUID) (*data.User, *data.Session, error)
- func (r *Store) UserByEmail(ctx context.Context, email string) (*data.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type QueryTracer ¶
type QueryTracer struct{}
func (*QueryTracer) TraceQueryEnd ¶
func (t *QueryTracer) TraceQueryEnd(ctx context.Context, conn *pgx.Conn, data pgx.TraceQueryEndData)
func (*QueryTracer) TraceQueryStart ¶
func (t *QueryTracer) TraceQueryStart(ctx context.Context, conn *pgx.Conn, data pgx.TraceQueryStartData) context.Context
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) ConsumeOAuthCode ¶
func (*Store) ConsumePasswordResetToken ¶
func (*Store) CreateOAuthCode ¶
func (r *Store) CreateOAuthCode(ctx context.Context, code *data.OAuthAuthorizationCode) (*data.OAuthAuthorizationCode, error)
func (*Store) CreatePasswordResetToken ¶
func (r *Store) CreatePasswordResetToken(ctx context.Context, token *data.PasswordResetToken) (*data.PasswordResetToken, error)
func (*Store) CreateSession ¶
func (*Store) CreateUser ¶
func (*Store) DeleteSession ¶
func (*Store) OAuthCodeByHash ¶
func (*Store) PasswordResetTokenByHash ¶
func (*Store) UpdateUserLastLogin ¶
func (*Store) UpdateUserPassword ¶
func (*Store) UserAndSessionBySessionID ¶
Click to show internal directories.
Click to hide internal directories.