user

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2025 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteUserParams

type DeleteUserParams struct {
	Id int
}

func (DeleteUserParams) Validate

func (p DeleteUserParams) Validate() error

type GetSettingsParams

type GetSettingsParams struct {
	Id int
}

func (GetSettingsParams) Validate

func (p GetSettingsParams) Validate() error

type GetUserParams

type GetUserParams struct {
	Id int
}

func (GetUserParams) Validate

func (p GetUserParams) Validate() error

type GetUsersQuery

type GetUsersQuery struct {
	types.PaginationQuery
}

func (GetUsersQuery) Validate

func (q GetUsersQuery) Validate() error

type PostgresUserStore

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

func NewPostgresUserStore

func NewPostgresUserStore(postgresDb *pgxpool.Pool, logger *slog.Logger) *PostgresUserStore

func (*PostgresUserStore) CreateSettings

func (s *PostgresUserStore) CreateSettings(ctx context.Context, set *types.Settings) (types.Settings, error)

func (*PostgresUserStore) CreateUser

func (s *PostgresUserStore) CreateUser(ctx context.Context, u *types.User) (types.User, error)

func (*PostgresUserStore) DeleteUser

func (s *PostgresUserStore) DeleteUser(ctx context.Context, userId int) (types.User, error)

func (*PostgresUserStore) GetSettings

func (s *PostgresUserStore) GetSettings(ctx context.Context, userId int) (types.Settings, error)

func (*PostgresUserStore) GetUserByEmail

func (s *PostgresUserStore) GetUserByEmail(ctx context.Context, email string) (types.User, error)

func (*PostgresUserStore) GetUserById

func (s *PostgresUserStore) GetUserById(ctx context.Context, userId int) (types.User, error)

func (*PostgresUserStore) GetUsers

func (*PostgresUserStore) UpdateSettings

func (s *PostgresUserStore) UpdateSettings(ctx context.Context, set *types.Settings) (types.Settings, error)

func (*PostgresUserStore) UpdateUserLoggedIn

func (s *PostgresUserStore) UpdateUserLoggedIn(ctx context.Context, userId int) (types.User, error)

func (*PostgresUserStore) UpdateVerification

func (s *PostgresUserStore) UpdateVerification(ctx context.Context, userId int) (types.User, error)

type UpdateSettingsParams

type UpdateSettingsParams struct {
	Id int
}

func (UpdateSettingsParams) Validate

func (p UpdateSettingsParams) Validate() error

type UpdateSettingsPayload

type UpdateSettingsPayload struct {
	Reb_thresh_pct int `json:"reb_thresh_pct"`
	Benchmark_id   int `json:"benchmark_id,omitempty"`
}

func (UpdateSettingsPayload) Validate

func (p UpdateSettingsPayload) Validate() error

type UpdateVerificationParams

type UpdateVerificationParams struct {
	Id int
}

func (UpdateVerificationParams) Validate

func (p UpdateVerificationParams) Validate() error

type UserHandlerImpl

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

func NewUserHandler

func NewUserHandler(userStore types.UserStore, benchmarkStore types.BenchmarkStore, logger *slog.Logger) *UserHandlerImpl

func (*UserHandlerImpl) DeleteUser

func (h *UserHandlerImpl) DeleteUser(c fiber.Ctx) error

func (*UserHandlerImpl) GetSettings

func (h *UserHandlerImpl) GetSettings(c fiber.Ctx) error

func (*UserHandlerImpl) GetUser

func (h *UserHandlerImpl) GetUser(c fiber.Ctx) error

func (*UserHandlerImpl) GetUsers

func (h *UserHandlerImpl) GetUsers(c fiber.Ctx) error

func (*UserHandlerImpl) UpdateSettings

func (h *UserHandlerImpl) UpdateSettings(c fiber.Ctx) error

func (*UserHandlerImpl) UpdateVerification

func (h *UserHandlerImpl) UpdateVerification(c fiber.Ctx) error

Jump to

Keyboard shortcuts

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