Documentation
¶
Index ¶
- func Module() fx.Option
- func RegisterCategory(c Category)
- func RegisterClient(c Client)
- func RegisterInventory(c Inventory)
- func RegisterInvoice(c Invoice)
- func RegisterProduct(c Product)
- func RegisterSwagger(c Swagger)
- func RegisterUser(c User)
- type Category
- type Client
- type Inventory
- type Invoice
- type Product
- type Swagger
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterCategory ¶
func RegisterCategory(c Category)
func RegisterClient ¶
func RegisterClient(c Client)
func RegisterInventory ¶
func RegisterInventory(c Inventory)
func RegisterInvoice ¶
func RegisterInvoice(c Invoice)
func RegisterProduct ¶
func RegisterProduct(c Product)
func RegisterSwagger ¶
func RegisterSwagger(c Swagger)
func RegisterUser ¶
func RegisterUser(c User)
Types ¶
type Category ¶
type Category struct {
fx.In
Validator *helper.Validator
Service *service.Category
Route fiber.Router `name:"api-v1"`
}
func (Category) AddCategory ¶
AddCategories godoc
@Summary Add New Category
@Description Add New Category
@Tags categories
@Accept json
@Produce json
@param request body dto.CategoryDTO true "category data"
@Success 200 {object} output.Category
@Failure 400 {object} output.HTTPError
@Router /categories [Post]
func (Category) DeleteCategory ¶
DELETECategories godoc
@Summary delete Category
@Description delete Category
@Tags categories
@Accept json
@Produce json
@Param id path int true "Category ID"
@Success 200 {string} string "deleted successfully"
@Router /categories/{id} [Delete]
func (Category) GetCategories ¶
GetCategories godoc
@Summary get All Categories
@Description get All Categories
@Tags categories
@Accept json
@Produce json
@Success 200 {array} output.Category
@Router /categories [get]
func (Category) UpdateCategory ¶
UpdateCategories godoc
@Summary Update Category
@Description Update Category
@Tags categories
@Accept json
@Produce json
@param request body dto.CategoryDTO true "category data"
@param category_id path int true "category id"
@Success 200 {object} model.Category
@Failure 400 {object} output.HTTPError
@Router /categories/{category_id} [Patch]
type Client ¶
type Client struct {
fx.In
Uploader *helper.Uploader
Validator *helper.Validator
Service *service.Client
Route fiber.Router `name:"api-v1"`
}
func (Client) AddClient ¶
AddCategories godoc
@Summary Add New Client
@Description Add New Client
@Tags clients
@Accept mpfd
@Produce mpfd
@param name formData string true "enter client name"
@param email formData string true "enter client email"
@param phone formData number true "enter client phone"
@param is_client formData boolean false " is client ?"
@param is_supplier formData boolean false "is supplier ?"
@param image formData file true "image"
@Success 200 {object} output.Client
@Failure 400 {object} output.HTTPError
@Router /clients [Post]
func (Client) DeleteClient ¶
DeleteClient godoc
@Summary delete Client
@Description delete Client
@Tags clients
@Accept json
@Produce json
@Param id path int true "Client ID"
@Success 200 {string} string "deleted successfully"
@Router /clients/{id} [Delete]
func (*Client) GetClients ¶
GetClients godoc
@Summary get All Clients
@Description get All Clients
@Tags clients
@Accept json
@Produce json
@Success 200 {array} output.Client
@Router /clients [get]
func (Client) UpdateClient ¶
UpdateCategories godoc
@Summary Update Client
@Description Update Client
@Tags clients
@Accept mpfd
@Produce mpfd
@param name formData string true "enter client name"
@param email formData string true "enter client email"
@param phone formData number true "enter client phone"
@param is_client formData boolean false "is client ?"
@param is_supplier formData boolean false "is supplier ?"
@param image formData file true "image"
@param client_id path int true "client id"
@Success 200 {object} model.Client
@Failure 400 {object} output.HTTPError
@Router /clients/{client_id} [Patch]
type Inventory ¶
type Inventory struct {
fx.In
Validator *helper.Validator
Service *service.Inventory
Route fiber.Router `name:"api-v1"`
}
func (Inventory) AddInventory ¶
AddInventories godoc
@Summary Add New Inventory
@Description Add New Inventory
@Tags inventories
@Accept json
@Produce json
@param request body dto.InventoryDTO true "inventory data"
@Success 200 {object} output.Inventory
@Failure 400 {object} output.HTTPError
@Router /inventories [Post]
func (Inventory) DeleteInventory ¶
DELETEInventories godoc
@Summary delete Inventory
@Description delete Inventory
@Tags inventories
@Accept json
@Produce json
@Param id path int true "Inventory ID"
@Success 200 {string} string "deleted successfully"
@Router /inventories/{id} [Delete]
func (Inventory) GetInventories ¶
GetInventories godoc
@Summary get All Inventories
@Description get All Inventories
@Tags inventories
@Accept json
@Produce json
@Success 200 {array} output.Inventory
@Router /inventories [get]
func (Inventory) UpdateInventory ¶
UpdateInventories godoc
@Summary Update Inventory
@Description Update Inventory
@Tags inventories
@Accept json
@Produce json
@param request body dto.InventoryDTO true "inventory data"
@param inventory_id path int true "inventory id"
@Success 200 {object} model.Inventory
@Failure 400 {object} output.HTTPError
@Router /inventories/{inventory_id} [Patch]
type Invoice ¶
type Invoice struct {
fx.In
Validator *helper.Validator
Service *service.Invoice
Route fiber.Router `name:"api-v1"`
}
func (*Invoice) AddInvoice ¶
AddCategories godoc
@Summary Add New Invoice
@Description Add New Invoice
@Tags invoices
@Accept json
@Produce json
@param request body dto.InvoiceDTO true "invoice data"
@Success 200 {string} string "Invoice Stored Successfully"
@Failure 400 {object} output.HTTPError
@Router /invoices [Post]
type Product ¶
type Product struct {
fx.In
Uploader *helper.Uploader
Validator *helper.Validator
Service *service.Product
Route fiber.Router `name:"api-v1"`
}
func (Product) AddProduct ¶
AddCategories godoc
@Summary Add New Product
@Description Add New Product
@Tags products
@Accept mpfd
@Produce mpfd
@param name formData string true "enter product name"
@param code formData string true "enter product code"
@param cost_price formData number true "enter product cost price"
@param sell_price formData number true "enter product sell price"
@param category_id formData int true "category ID"
@param image formData file false "image"
@Success 200 {object} output.Product
@Failure 400 {object} output.HTTPError
@Router /products [Post]
func (Product) DeleteProduct ¶
DeleteProduct godoc
@Summary delete Product
@Description delete Product
@Tags products
@Accept json
@Produce json
@Param id path int true "Product ID"
@Success 200 {string} string "deleted successfully"
@Router /products/{id} [Delete]
func (*Product) GetProducts ¶
GetProducts godoc
@Summary get All Products
@Description get All Products
@Tags products
@Accept json
@Produce json
@Success 200 {array} output.Product
@Router /products [get]
func (Product) ShowProduct ¶
get product godoc
@Summary show Product
@Description show Product
@Tags products
@Accept json
@Produce json
@param product_id path int true "Product ID"
@Success 200 {object} model.Product
@Failure 400 {object} output.HTTPError
@Router /products/{product_id} [Get]
func (Product) UpdateProduct ¶
UpdateCategories godoc
@Summary Update Product
@Description Update Product
@Tags products
@Accept mpfd
@Produce mpfd
@param name formData string true "enter product name"
@param code formData string true "enter product code"
@param cost_price formData number true "enter product cost price"
@param sell_price formData number true "enter product sell price"
@param category_id formData int true "category ID"
@param image formData file true "image"
@param product_id path int true "Product ID"
@Success 200 {object} model.Product
@Failure 400 {object} output.HTTPError
@Router /products/{product_id} [Patch]
type User ¶
type User struct {
fx.In
Encryptor *helper.Encryptor
Validator *helper.Validator
Service *service.User
Route fiber.Router `name:"api-v1"`
}
func (User) AddUser ¶
AddCategories godoc
@Summary Add New User
@Description Add New User
@Tags users
@Accept json
@Produce json
@param request body dto.CreateUserDTO true "user data"
@Success 200 {object} output.User
@Failure 400 {object} output.HTTPError
@Router /users [Post]
func (User) DeleteUser ¶
DeleteUser godoc
@Summary delete User
@Description delete User
@Tags users
@Accept json
@Produce json
@Param id path int true "User ID"
@Success 200 {string} string "deleted successfully"
@Router /users/{id} [Delete]
func (*User) GetUsers ¶
GetUsers godoc
@Summary get All Users
@Description get All Users
@Tags users
@Accept json
@Produce json
@Success 200 {array} output.User
@Router /users [get]
func (User) UpdateUser ¶
UpdateCategories godoc
@Summary Update User
@Description Update User
@Tags users
@Accept json
@Produce json
@param request body dto.UpdateUserDTO true "user data"
@param user_id path int true "user id"
@Success 200 {object} model.User
@Failure 400 {object} output.HTTPError
@Router /users/{user_id} [Patch]
Click to show internal directories.
Click to hide internal directories.