pgstore

package
v0.0.0-...-e9cac5d Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 InsertUserDataParams

type InsertUserDataParams struct {
	Ip               string
	UserAgent        string
	Location         string
	Device           string
	Action           string
	JsonResponseBody string
	Referrer         string
	RequestMethod    string
	RequestPath      string
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) GetAllUserData

func (q *Queries) GetAllUserData(ctx context.Context) ([]UserDatum, error)

func (*Queries) GetUserData

func (q *Queries) GetUserData(ctx context.Context, id uuid.UUID) (UserDatum, error)

func (*Queries) InsertUserData

func (q *Queries) InsertUserData(ctx context.Context, arg InsertUserDataParams) (UserDatum, error)

func (*Queries) WithTx

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

type UserDatum

type UserDatum struct {
	ID               uuid.UUID
	Ip               string
	UserAgent        string
	Timestamp        pgtype.Timestamptz
	Location         string
	Device           string
	Action           string
	JsonResponseBody string
	Referrer         string
	RequestMethod    string
	RequestPath      string
}

Jump to

Keyboard shortcuts

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