Documentation
¶
Overview ¶
Package huma is a demo Huma migrated project for migration testing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateUserRequest ¶
type CreateUserRequest struct {
Body struct {
Name string `json:"name"`
Email string `json:"email"`
}
}
CreateUserRequest represents a request to create a user.
type CreateUserResponse ¶
type CreateUserResponse struct {
Body User
}
CreateUserResponse is the response for CreateUser (Huma expects output struct with Body for response body).
func CreateUser ¶
func CreateUser(ctx context.Context, input *CreateUserRequest) (*CreateUserResponse, error)
CreateUser handles POST /users
type GetUserResponse ¶
type GetUserResponse struct {
Body User
}
GetUserResponse is the response for GetUser (Huma output with Body).
type HealthResponse ¶
type HealthResponse struct {
Body struct {
Status string `json:"status"`
}
}
HealthResponse represents a health check response.
type User ¶
type User struct {
ID string `json:"id"`
Name string `json:"name"`
Email string `json:"email"`
CreatedAt string `json:"created_at"`
}
User represents a user entity (Huma version).
type UserListResponse ¶
type UserListResponse struct {
Body struct {
Items []User `json:"items"`
TotalCount int `json:"total_count"`
}
}
UserListResponse represents a list of users.
Click to show internal directories.
Click to hide internal directories.