Documentation
¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.6.0 DO NOT EDIT.
Index ¶
- func RegisterHandlers(router fiber.Router, si ServerInterface)
- func RegisterHandlersWithOptions(router fiber.Router, si ServerInterface, options FiberServerOptions)
- type CreateUserJSONRequestBody
- type FiberServerOptions
- type GlobalResponses
- type MiddlewareFunc
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) Check(c *fiber.Ctx) error
- func (siw *ServerInterfaceWrapper) CreateUser(c *fiber.Ctx) error
- func (siw *ServerInterfaceWrapper) DeleteUser(c *fiber.Ctx) error
- func (siw *ServerInterfaceWrapper) GetUserById(c *fiber.Ctx) error
- func (siw *ServerInterfaceWrapper) GetUsers(c *fiber.Ctx) error
- func (siw *ServerInterfaceWrapper) UpdateUser(c *fiber.Ctx) error
- type UpdateUserJSONRequestBody
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterHandlers ¶
func RegisterHandlers(router fiber.Router, si ServerInterface)
RegisterHandlers creates http.Handler with routing matching OpenAPI spec.
func RegisterHandlersWithOptions ¶
func RegisterHandlersWithOptions(router fiber.Router, si ServerInterface, options FiberServerOptions)
RegisterHandlersWithOptions creates http.Handler with additional options
Types ¶
type CreateUserJSONRequestBody ¶
type CreateUserJSONRequestBody = User
CreateUserJSONRequestBody defines body for CreateUser for application/json ContentType.
type FiberServerOptions ¶
type FiberServerOptions struct {
BaseURL string
Middlewares []MiddlewareFunc
}
FiberServerOptions provides options for the Fiber server.
type GlobalResponses ¶
type GlobalResponses struct {
ResponseCode string `json:"responseCode"`
ResponseMessage string `json:"responseMessage"`
}
GlobalResponses defines model for GlobalResponses.
type MiddlewareFunc ¶
type ServerInterface ¶
type ServerInterface interface {
// Check
// (GET /api/v1.0/check)
Check(c *fiber.Ctx) error
// Get all users
// (GET /api/v1.0/users)
GetUsers(c *fiber.Ctx) error
// Create a new user
// (POST /api/v1.0/users)
CreateUser(c *fiber.Ctx) error
// Delete a user
// (DELETE /api/v1.0/users/{id})
DeleteUser(c *fiber.Ctx, id string) error
// Get user by ID
// (GET /api/v1.0/users/{id})
GetUserById(c *fiber.Ctx, id string) error
// Update a user
// (PUT /api/v1.0/users/{id})
UpdateUser(c *fiber.Ctx, id string) error
}
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) Check ¶
func (siw *ServerInterfaceWrapper) Check(c *fiber.Ctx) error
Check operation middleware
func (*ServerInterfaceWrapper) CreateUser ¶
func (siw *ServerInterfaceWrapper) CreateUser(c *fiber.Ctx) error
CreateUser operation middleware
func (*ServerInterfaceWrapper) DeleteUser ¶
func (siw *ServerInterfaceWrapper) DeleteUser(c *fiber.Ctx) error
DeleteUser operation middleware
func (*ServerInterfaceWrapper) GetUserById ¶
func (siw *ServerInterfaceWrapper) GetUserById(c *fiber.Ctx) error
GetUserById operation middleware
func (*ServerInterfaceWrapper) GetUsers ¶
func (siw *ServerInterfaceWrapper) GetUsers(c *fiber.Ctx) error
GetUsers operation middleware
func (*ServerInterfaceWrapper) UpdateUser ¶
func (siw *ServerInterfaceWrapper) UpdateUser(c *fiber.Ctx) error
UpdateUser operation middleware
type UpdateUserJSONRequestBody ¶
type UpdateUserJSONRequestBody = User
UpdateUserJSONRequestBody defines body for UpdateUser for application/json ContentType.