Versions in this module Expand all Collapse all v0 v0.2.1 Feb 19, 2024 v0.2.0 Jan 24, 2024 Changes in this version + var RecordNotFoundError = pgx.ErrNoRows + type Account struct + CreatedAt time.Time + ID uuid.UUID + Owner string + Role Role + type CreateSessionParams struct + ClientIp string + ExpiresAt time.Time + ID uuid.UUID + RefreshToken string + UserAgent string + WalletAddress string + type DBTX interface + Exec func(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query func(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow func(context.Context, string, ...interface{}) pgx.Row + type NullRole struct + Role Role + Valid bool + func (ns *NullRole) Scan(value interface{}) error + func (ns NullRole) Value() (driver.Value, error) + type Querier interface + CreateAccount func(ctx context.Context, owner string) (Account, error) + CreateSession func(ctx context.Context, arg CreateSessionParams) (Session, error) + GetAccountByOwner func(ctx context.Context, owner string) (Account, error) + GetSession func(ctx context.Context, id uuid.UUID) (Session, error) + RevokeAccountSessions func(ctx context.Context, walletAddress string) (pgconn.CommandTag, error) + type Queries struct + func New(db DBTX) *Queries + func (q *Queries) CreateAccount(ctx context.Context, owner string) (Account, error) + func (q *Queries) CreateSession(ctx context.Context, arg CreateSessionParams) (Session, error) + func (q *Queries) GetAccountByOwner(ctx context.Context, owner string) (Account, error) + func (q *Queries) GetSession(ctx context.Context, id uuid.UUID) (Session, error) + func (q *Queries) RevokeAccountSessions(ctx context.Context, walletAddress string) (pgconn.CommandTag, error) + func (q *Queries) WithTx(tx pgx.Tx) *Queries + type Role string + const RoleAdmin + const RoleGamer + func (e *Role) Scan(src interface{}) error + type SQLStore struct + type Session struct + ClientIp string + CreatedAt time.Time + ExpiresAt time.Time + ID uuid.UUID + IsRevoked bool + RefreshToken string + UserAgent string + WalletAddress string + type Store interface + func NewStore(connPool *pgxpool.Pool) Store