Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorResponse ¶
func ErrorResponse(ctx context.Context, w http.ResponseWriter, status int, errorResponse *models.ErrorResponse)
ErrorResponse sets the structured error message in the http response body
Types ¶
type FoodRecipeAPI ¶
FoodRecipeAPI manages access to food recipes
func NewFoodRecipeAPI ¶
func NewFoodRecipeAPI(ctx context.Context, connectionString string, mongoClient *mongo.Client, data map[string]models.Recipe, defaultMaxResults int, router *mux.Router) *FoodRecipeAPI
NewFoodRecipeAPI create a new Food Recipe API instance and register the API routes based on the application configuration.
Click to show internal directories.
Click to hide internal directories.