dao

package
v0.0.0-...-20fe6b4 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DAO

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

DAO is data access object for users table.

func New

func New(conn *pgxpool.Pool) *DAO

func (*DAO) GetByID

func (d *DAO) GetByID(ctx context.Context, userID int) (*User, error)

type User

type User struct {
	ID   int64  `db:"id" json:"id"`
	Name string `db:"name" json:"name"`
}

Jump to

Keyboard shortcuts

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