users

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 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 ID

type ID string

type Repo

type Repo struct {
	Pool *pgxpool.Pool
}

func (*Repo) AddUser

func (d *Repo) AddUser(ctx context.Context, user User) error

func (*Repo) GetUserByAccount

func (d *Repo) GetUserByAccount(ctx context.Context, account string) (User, error)

func (*Repo) GetUserByID

func (d *Repo) GetUserByID(ctx context.Context, userID ID) (User, error)

func (*Repo) ListUsers

func (d *Repo) ListUsers(ctx context.Context) ([]User, error)

type User

type User struct {
	ID        ID     `json:"id"`
	Account   string `json:"account"`
	Name      string `json:"name"`
	IsAdmin   bool   `json:"isAdmin"`
	IsTeacher bool   `json:"isTeacher"`
}

Jump to

Keyboard shortcuts

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