repo_admin_auth

package
v0.0.0-...-91e0860 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 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 CreateReq

type CreateReq struct {
	Name string `json:"name" db:"name"`
	Age  int    `json:"age"  db:"age"`
}

type Read

type Read struct {
	DB *pgxpool.Pool
}

func NewRead

func NewRead(db *pgxpool.Pool) *Read

func (*Read) Find

func (r *Read) Find(ctx context.Context) ([]Res, error)

type Res

type Res struct {
	ID        uuid.UUID `db:"id"         json:"id"`
	Name      string    `db:"name"       json:"name"`
	Age       int       `db:"age"        json:"age"`
	CreatedAt time.Time `db:"created_at" json:"created_at"`
}

type Write

type Write struct {
	TX pgx.Tx
}

func NewWrite

func NewWrite(tx pgx.Tx) *Write

func (*Write) Create

func (w *Write) Create(ctx context.Context, p CreateReq) error

Jump to

Keyboard shortcuts

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