users

package
v0.0.0-...-8699099 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	ID        int64  `json:"id"`         // ID is the unique identifier for the user.
	Username  string `json:"username"`   // Username is the unique username for the user.
	Email     string `json:"email"`      // Email is the unique email address for the user.
	Password  string `json:"-"`          // Password is the user's password.
	CreatedAt string `json:"created_at"` // CreatedAt is the timestamp when the user account was created.
}

User represents a user account in the system.

type UserStore

type UserStore interface {
	// CreateUser inserts a new user into the database and returns the created user's ID and timestamps.
	CreateUser(ctx context.Context, user *User) error
}

User represents a user account in the system.

func NewUserStore

func NewUserStore(dbPool *pgxpool.Pool) UserStore

NewUserStore creates a new instance of userStore, implementing the UserStore interface.

Jump to

Keyboard shortcuts

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