package
0.0.0-20250206051800-550901d12f5f
Repository: https://github.com/donskova1ex/mylearningproject.git
Documentation: pkg.go.dev

# Functions

AssertIngredientConstraints checks if the values respects the defined constraints.
AssertIngredientRequired checks if the required fields are not zero-ed.
AssertParametersConstraints checks if the values respects the defined constraints.
AssertParametersRequired checks if the required fields are not zero-ed.
AssertRecipeConstraints checks if the values respects the defined constraints.
AssertRecipeRequired checks if the required fields are not zero-ed.
AssertRecurseInterfaceRequired recursively checks each struct in a slice against the callback.
AssertRecurseValueRequired checks each struct in the nested slice against the callback.
AssertWitchConstraints checks if the values respects the defined constraints.
AssertWitchRequired checks if the required fields are not zero-ed.
DefaultErrorHandler defines the default logic on how to handle errors from the controller.
EncodeJSONResponse uses the json encoder to write an interface to the http response with an optional status code.
IsZeroValue checks if the val is the zero-ed value.
No description provided by the author
NewIngredientAPIController creates a default api controller.
NewIngredientAPIService creates a default api service.
NewRecipeAPIController creates a default api controller.
NewRecipeAPIService creates a default api service.
NewRouter creates a new router for any number of api routers.
NewWitchAPIController creates a default api controller.
NewWitchAPIService creates a default api service.
ReadFormFilesToTempFiles reads files array data from a request form and writes it to a temporary files.
ReadFormFileToTempFile reads file data from a request form and writes it to a temporary file.
Response return a ImplResponse struct filled.
No description provided by the author
WithIngredientAPIErrorHandler inject ErrorHandler into controller.
No description provided by the author
No description provided by the author
No description provided by the author
WithRecipeAPIErrorHandler inject ErrorHandler into controller.
No description provided by the author
WithWitchAPIErrorHandler inject ErrorHandler into controller.

# Variables

ErrTypeAssertionError is thrown when type an interface does not match the asserted type.

# Structs

ImplResponse defines an implementation response with error code and the associated body.
No description provided by the author
IngredientAPIController binds http requests to an api service and writes the service results to the http response.
No description provided by the author
No description provided by the author
ParsingError indicates that an error has occurred when parsing request parameters.
No description provided by the author
RecipeAPIController binds http requests to an api service and writes the service results to the http response.
No description provided by the author
RequiredError indicates that an error has occurred when parsing request parameters.
A Route defines the parameters for an api endpoint.
No description provided by the author
WitchAPIController binds http requests to an api service and writes the service results to the http response.
No description provided by the author

# Interfaces

IngredientAPIRouter defines the required methods for binding the api requests to a responses for the IngredientAPI The IngredientAPIRouter implementation should parse necessary information from the http request, pass the data to a IngredientAPIServicer to perform the required actions, then write the service results to the http response.
IngredientAPIServicer defines the api actions for the IngredientAPI service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can be ignored with the .openapi-generator-ignore file and updated with the logic required for the API.
No description provided by the author
No description provided by the author
RecipeAPIRouter defines the required methods for binding the api requests to a responses for the RecipeAPI The RecipeAPIRouter implementation should parse necessary information from the http request, pass the data to a RecipeAPIServicer to perform the required actions, then write the service results to the http response.
RecipeAPIServicer defines the api actions for the RecipeAPI service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can be ignored with the .openapi-generator-ignore file and updated with the logic required for the API.
RecipeAPIService is a service that implements the logic for the RecipeAPIServicer This service should implement the business logic for every endpoint for the RecipeAPI API.
Router defines the required methods for retrieving api routes.
WitchAPIRouter defines the required methods for binding the api requests to a responses for the WitchAPI The WitchAPIRouter implementation should parse necessary information from the http request, pass the data to a WitchAPIServicer to perform the required actions, then write the service results to the http response.
WitchAPIServicer defines the api actions for the WitchAPI service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can be ignored with the .openapi-generator-ignore file and updated with the logic required for the API.
WitchAPIService is a service that implements the logic for the WitchAPIServicer This service should implement the business logic for every endpoint for the WitchAPI API.

# Type aliases

No description provided by the author
ErrorHandler defines the required method for handling error.
IngredientAPIOption for how the controller is set up.
No description provided by the author
No description provided by the author
RecipeAPIOption for how the controller is set up.
Routes is a map of defined api endpoints.
WitchAPIOption for how the controller is set up.