Documentation
¶
Index ¶
- func CreateCustomer(c *fiber.Ctx) error
- func CreateEmployee(c *fiber.Ctx) error
- func CreateInventory(c *fiber.Ctx) error
- func CreateItem(c *fiber.Ctx) error
- func CreateShop(c *fiber.Ctx) error
- func DefaultRoute(c *fiber.Ctx) error
- func DeleteEmployee(c *fiber.Ctx) error
- func DeleteInventory(c *fiber.Ctx) error
- func DeleteItem(c *fiber.Ctx) error
- func GetCustomers(c *fiber.Ctx) error
- func GetEmployee(c *fiber.Ctx) error
- func GetEmployees(c *fiber.Ctx) error
- func GetInventories(c *fiber.Ctx) error
- func GetInventory(c *fiber.Ctx) error
- func GetItem(c *fiber.Ctx) error
- func GetItems(c *fiber.Ctx) error
- func GetShops(c *fiber.Ctx) error
- func LoginCustomer(c *fiber.Ctx) error
- func LoginShopOwner(c *fiber.Ctx) error
- func NotFoundRoute(c *fiber.Ctx) error
- func SetupRoutes(app *fiber.App)
- func UpdateEmployee(c *fiber.Ctx) error
- func UpdateInventory(c *fiber.Ctx) error
- func UpdateItem(c *fiber.Ctx) error
- func UpdateShop(c *fiber.Ctx) error
- type CreateShopRequest
- type LoginRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCustomer ¶
CreateCustomer registers a new customer.
func CreateEmployee ¶
CreateEmployee registers a new shop employee.
func CreateInventory ¶
CreateInventory creates a new inventory for a shop.
func CreateItem ¶
CreateItem creates a new item under a given inventory.
func CreateShop ¶
CreateShop creates a new shop along with its owner.
func DeleteEmployee ¶
DeleteEmployee deletes a shop employee by ID.
func DeleteInventory ¶
DeleteInventory deletes an inventory by its ID.
func GetCustomers ¶
GetCustomers retrieves all customers with selected fields.
func GetEmployee ¶
GetEmployee retrieves a single shop employee by ID.
func GetEmployees ¶
GetEmployees retrieves all shop employees.
func GetInventories ¶
GetInventories retrieves all inventories with their items.
func GetInventory ¶
GetInventory retrieves a single inventory by ID, including its items.
func LoginCustomer ¶
LoginCustomer authenticates a customer and issues a JWT token.
func LoginShopOwner ¶
LoginShopOwner authenticates a shop owner and returns a JWT token.
func NotFoundRoute ¶
NotFoundRoute handles undefined endpoints.
func UpdateEmployee ¶
UpdateEmployee updates an existing shop employee.
func UpdateInventory ¶
UpdateInventory updates an existing inventory record.
Types ¶
type CreateShopRequest ¶
type CreateShopRequest struct {
Name string `json:"name"`
Email string `json:"email"`
Owner models.ShopOwner `json:"owner"`
}
CreateShopRequest represents the JSON payload for creating a shop and its owner.