Documentation
¶
Overview ¶
Package handlers contains HTTP handlers for the core module of nutrix.
The handlers in this package are used to handle incoming HTTP requests for the core module of nutrix. The handlers are used to interact with the services package, which contains the business logic of the core module.
The handlers in this package are used to create a RESTful API for the core module of nutrix. The API endpoints are documented using the Swagger specification.
Package handlers contains HTTP handlers for the core module of nutrix.
The handlers in this package are used to handle incoming HTTP requests for the core module of nutrix. They interact with the services package, which contains the business logic of the core module.
The handlers in this package create a RESTful API for the core module of nutrix. The API endpoints are documented using the Swagger specification. Each handler function is responsible for processing HTTP requests, calling the appropriate service methods, and returning HTTP responses.
Package handlers contains HTTP handlers for the core module of nutrix.
The handlers in this package are used to handle incoming HTTP requests for the core module of nutrix. The handlers are used to interact with the services package, which contains the business logic of the core module.
The handlers in this package are used to create a RESTful API for the core module of nutrix. The API endpoints are documented using the Swagger specification.
Package handlers contains HTTP handlers for the core module of nutrix.
The handlers in this package are used to handle incoming HTTP requests for the core module of nutrix. The handlers are used to interact with the services package, which contains the business logic of the core module.
The handlers in this package are used to create a RESTful API for the core module of nutrix. The API endpoints are documented using the Swagger specification.
Index ¶
- func AddMaterial(config config.Config, logger logger.ILogger) http.HandlerFunc
- func CalculateMaterialCost(config config.Config, logger logger.ILogger) http.HandlerFunc
- func CancelOrder(config config.Config, logger logger.ILogger) http.HandlerFunc
- func DeleteCategory(config config.Config, logger logger.ILogger) http.HandlerFunc
- func DeleteEntry(config config.Config, logger logger.ILogger) http.HandlerFunc
- func DeleteProduct(config config.Config, logger logger.ILogger) http.HandlerFunc
- func EditMaterial(config config.Config, logger logger.ILogger) http.HandlerFunc
- func FinishOrder(config config.Config, logger logger.ILogger) http.HandlerFunc
- func GetCategories(config config.Config, logger logger.ILogger) http.HandlerFunc
- func GetMaterialLogs(config config.Config, logger logger.ILogger) http.HandlerFunc
- func GetMaterials(config config.Config, logger logger.ILogger) http.HandlerFunc
- func GetOrder(config config.Config, logger logger.ILogger) http.HandlerFunc
- func GetOrders(config config.Config, logger logger.ILogger) http.HandlerFunc
- func GetProductReadyNumber(config config.Config, logger logger.ILogger) http.HandlerFunc
- func GetProducts(config config.Config, logger logger.ILogger) http.HandlerFunc
- func GetRecipeAvailability(config config.Config, logger logger.ILogger) http.HandlerFunc
- func GetRecipeTree(config config.Config, logger logger.ILogger) http.HandlerFunc
- func GetSalesLog(config config.Config, logger logger.ILogger) http.HandlerFunc
- func GetSalesPerDay(config config.Config, logger logger.ILogger) http.HandlerFunc
- func GetSettings(conf config.Config, logger logger.ILogger) http.HandlerFunc
- func GetStashedOrders(config config.Config, logger logger.ILogger) http.HandlerFunc
- func GetUnpaidOrders(config config.Config, logger logger.ILogger) http.HandlerFunc
- func HandleNotificationsWsRequest(config config.Config, logger logger.ILogger, ...) http.HandlerFunc
- func InesrtNewProduct(config config.Config, logger logger.ILogger) http.HandlerFunc
- func InsertCategory(config config.Config, logger logger.ILogger) http.HandlerFunc
- func OrderRemoveFromStash(config config.Config, logger logger.ILogger) http.HandlerFunc
- func OrderStash(config config.Config, logger logger.ILogger) http.HandlerFunc
- func PayUnpaidOrder(config config.Config, logger logger.ILogger) http.HandlerFunc
- func PushMaterialEntry(config config.Config, logger logger.ILogger) http.HandlerFunc
- func StartOrder(config config.Config, logger logger.ILogger, settings models.Settings) http.HandlerFunc
- func SubmitOrder(config config.Config, logger logger.ILogger) http.HandlerFunc
- func UpdateCategory(config config.Config, logger logger.ILogger) http.HandlerFunc
- func UpdateProduct(config config.Config, logger logger.ILogger) http.HandlerFunc
- func UpdateSettings(conf config.Config, logger logger.ILogger) http.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddMaterial ¶
AddMaterial returns a HTTP handler function to add a new material to the database.
func CalculateMaterialCost ¶
CalculateMaterialCost returns a HTTP handler function to calculate the cost of a material entry.
This handler retrieves the entry ID, material ID, and quantity from the query string, and uses the MaterialService to calculate and return the cost.
func CancelOrder ¶
CancelOrder returns a HTTP handler function to cancel an order.
func DeleteCategory ¶
DeleteCategory returns a HTTP handler function to delete a Category from the database.
func DeleteEntry ¶
DeleteEntry returns a HTTP handler function to delete an entry in the material database.
func DeleteProduct ¶
DeleteProduct returns a HTTP handler function to delete a product from the database.
func EditMaterial ¶
EditMaterial returns a HTTP handler function to edit an existing material in the database.
func FinishOrder ¶
FinishOrder returns a HTTP handler function to finish an order.
func GetCategories ¶
GetCategories returns a HTTP handler function to retrieve a list of Categories from the database.
func GetMaterialLogs ¶
GetMaterialLogs returns a HTTP handler function to retrieve a list of logs for a material.
func GetMaterials ¶
GetMaterials returns a HTTP handler function to retrieve a list of materials from the database.
func GetOrders ¶
GetOrders returns a HTTP handler function to retrieve a list of orders. to use pagination, send a "first" and "rows" query string to select all rows, send a "rows" query string with value -1 to filter for orders that contains a specific display_id, just send a display_id query string
func GetProductReadyNumber ¶
GetProductReadyNumber returns a HTTP handler function to retrieve the ready number for a product. The product ID is required as query string.
func GetProducts ¶
GetProducts returns a HTTP handler function to retrieve a list of products from the database. It requires two query string parameters: first_index: the index of the first product to be retrieved rows: the number of products to be retrieved
func GetRecipeAvailability ¶
GetRecipeAvailability returns a HTTP handler function to check the availability of multiple recipes. The recipe IDs are required as query string, comma separated.
func GetRecipeTree ¶
GetRecipeTree returns a HTTP handler function to retrieve a recipe tree. The recipe ID is required as query string.
func GetSalesLog ¶
GetSalesLog returns a HTTP handler function to retrieve a sales log.
func GetSalesPerDay ¶
GetSalesPerDay returns a HTTP handler function to retrieve sales data per day. It requires two query string parameters: first_index: the index of the first record to be retrieved rows: the number of records to be retrieved
func GetSettings ¶
GetSettings is an http get handlers that just returns the settings object from the db
func GetStashedOrders ¶
GetStashedOrders returns a HTTP handler function to get all orders in stash.
func GetUnpaidOrders ¶
GetUnpaidOrders returns a HTTP handler function to get all unpaid orders.
func HandleNotificationsWsRequest ¶
func HandleNotificationsWsRequest(config config.Config, logger logger.ILogger, notificationService services.INotificationService) http.HandlerFunc
HandleNotificationsWsRequest returns a HTTP handler function to handle WebSocket requests.
The function takes a configuration object, a logger object, and a INotificationService object as input. It returns a HTTP handler function that handles WebSocket requests.
func InesrtNewProduct ¶
InesrtNewProduct returns a HTTP handler function to insert a new product in the database.
func InsertCategory ¶
InsertCategory returns a HTTP handler function to insert a Category into the database.
func OrderRemoveFromStash ¶
OrderRemoveFromStash returns a HTTP handler function to remove an order from the stash.
func OrderStash ¶
OrderStash returns a HTTP handler function to stash an order.
func PayUnpaidOrder ¶
PayUnpaidOrder returns a HTTP handler function to pay an unpaid order.
func PushMaterialEntry ¶
PushMaterialEntry returns a HTTP handler function to add a new entry to a material in the database.
func StartOrder ¶
func StartOrder(config config.Config, logger logger.ILogger, settings models.Settings) http.HandlerFunc
StartOrder returns a HTTP handler function to start an order.
func SubmitOrder ¶
SubmitOrder returns a HTTP handler function to submit an order.
func UpdateCategory ¶
UpdateCategory returns a HTTP handler function to update a Category in the database.
func UpdateProduct ¶
UpdateProduct returns a HTTP handler function to update a product in the database.
func UpdateSettings ¶
UpdateSettings is a post request handler that updates the settings in the database send a models.Settings directory to body to use it.
Types ¶
This section is empty.