user

package
v0.0.0-...-1c2eb0b Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Closer

type Closer interface {
	internal.RepoCloser
}

type ReadWriter

type ReadWriter interface {
	Reader
	Writer
}

type Reader

type Reader interface {
	internal.RepoReader[internal.User]
}

type Repo

type Repo interface {
	Closer
	Writer
	Reader
}

func NewRepo

func NewRepo(ctx context.Context, conn *pgxpool.Pool) Repo

This is not really required

type User

type User struct {
	// Primary key.
	ID suid.UUID
	// Unique. Stored as text.
	Username string
	// Unique. Stored as case-sensitive text.
	Email email.Email
	// Required. Stored as case-sensitive text.
	Password password.PasswordHash
	// Required. Defaults to current time.
	CreatedAt time.Time
}

Definition of our User in the DB layer

type Writer

type Writer interface {
	internal.RepoWriter[internal.User]
}

Jump to

Keyboard shortcuts

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