Documentation
¶
Index ¶
- type DeleteUserParams
- type GetSettingsParams
- type GetUserParams
- type GetUsersQuery
- type PostgresUserStore
- func (s *PostgresUserStore) CreateSettings(ctx context.Context, set *types.Settings) (types.Settings, error)
- func (s *PostgresUserStore) CreateUser(ctx context.Context, u *types.User) (types.User, error)
- func (s *PostgresUserStore) DeleteUser(ctx context.Context, userId int) (types.User, error)
- func (s *PostgresUserStore) GetSettings(ctx context.Context, userId int) (types.Settings, error)
- func (s *PostgresUserStore) GetUserByEmail(ctx context.Context, email string) (types.User, error)
- func (s *PostgresUserStore) GetUserById(ctx context.Context, userId int) (types.User, error)
- func (s *PostgresUserStore) GetUsers(ctx context.Context, options *types.GetUsersStoreOptions) ([]types.User, types.PaginationMetadata, error)
- func (s *PostgresUserStore) UpdateSettings(ctx context.Context, set *types.Settings) (types.Settings, error)
- func (s *PostgresUserStore) UpdateUserLoggedIn(ctx context.Context, userId int) (types.User, error)
- func (s *PostgresUserStore) UpdateVerification(ctx context.Context, userId int) (types.User, error)
- type UpdateSettingsParams
- type UpdateSettingsPayload
- type UpdateVerificationParams
- type UserHandlerImpl
- func (h *UserHandlerImpl) DeleteUser(c fiber.Ctx) error
- func (h *UserHandlerImpl) GetSettings(c fiber.Ctx) error
- func (h *UserHandlerImpl) GetUser(c fiber.Ctx) error
- func (h *UserHandlerImpl) GetUsers(c fiber.Ctx) error
- func (h *UserHandlerImpl) UpdateSettings(c fiber.Ctx) error
- func (h *UserHandlerImpl) UpdateVerification(c fiber.Ctx) error
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 (*PostgresUserStore) CreateUser ¶
func (*PostgresUserStore) DeleteUser ¶
func (*PostgresUserStore) GetSettings ¶
func (*PostgresUserStore) GetUserByEmail ¶
func (*PostgresUserStore) GetUserById ¶
func (*PostgresUserStore) GetUsers ¶
func (s *PostgresUserStore) GetUsers(ctx context.Context, options *types.GetUsersStoreOptions) ([]types.User, types.PaginationMetadata, error)
func (*PostgresUserStore) UpdateSettings ¶
func (*PostgresUserStore) UpdateUserLoggedIn ¶
func (*PostgresUserStore) UpdateVerification ¶
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) UpdateSettings ¶
func (h *UserHandlerImpl) UpdateSettings(c fiber.Ctx) error
func (*UserHandlerImpl) UpdateVerification ¶
func (h *UserHandlerImpl) UpdateVerification(c fiber.Ctx) error
Source Files
¶
- handler.go
- handler_deleteuser.go
- handler_getsettings.go
- handler_getuser.go
- handler_getusers.go
- handler_updatesettings.go
- handler_updateverification.go
- schema_deleteuser.go
- schema_getsettings.go
- schema_getuser.go
- schema_getusers.go
- schema_updatesettings.go
- schema_updateverification.go
- store.go
- store_createsettings.go
- store_createuser.go
- store_deleteuser.go
- store_getsettings.go
- store_getuserbyemail.go
- store_getuserbyid.go
- store_getusers.go
- store_updatesettings.go
- store_updateuserloggedin.go
- store_updateverification.go
Click to show internal directories.
Click to hide internal directories.