session

package
v0.0.0-...-702c875 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateSessionParams

type CreateSessionParams struct {
	UserID       pgtype.UUID
	RefreshToken string
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) CreateSession

func (q *Queries) CreateSession(ctx context.Context, arg CreateSessionParams) error

func (*Queries) DeleteSession

func (q *Queries) DeleteSession(ctx context.Context, userID pgtype.UUID) error

func (*Queries) GetSession

func (q *Queries) GetSession(ctx context.Context, userID pgtype.UUID) (Session, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type Session

type Session struct {
	ID           pgtype.UUID
	UserID       pgtype.UUID
	RefreshToken string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL