Documentation
¶
Index ¶
- type CustomerManager
- func (m *CustomerManager) AddCustomer(ctx context.Context, params customer_management.AddCustomerParams) middleware.Responder
- func (m *CustomerManager) GetCustomer(ctx context.Context, params customer_management.GetCustomerParams) middleware.Responder
- func (m *CustomerManager) ListCustomers(ctx context.Context, params customer_management.ListCustomersParams) middleware.Responder
- func (m *CustomerManager) UpdateCustomer(ctx context.Context, params customer_management.UpdateCustomerParams) middleware.Responder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomerManager ¶
type CustomerManager struct {
BasePath string
// contains filtered or unexported fields
}
CustomerManager is the struct defined to group and contain all the methods that interact with the customer endpoint. Parameters: - db: a DbParameter reference to be able to use the DBManager methods. - monit: a StatusManager reference to be able to use the status subsystem methods. - BasePath: a string with the base path of the system.
func New ¶
func New(db *dbManager.DbParameter, monit *statusManager.StatusManager, bp string) *CustomerManager
New is the function to create the struct CustomerManager that grant access to the methods to interact with the customer endpoint. Parameters: - db: a reference to the DbParameter to be able to interact with the db methods. - monit: a reference to the StatusManager to be able to interact with the status subsystem. - bp: a string containing the base path of the service. Returns: - CustomerManager: struct to interact with customer endpoint functionalities.
func (*CustomerManager) AddCustomer ¶
func (m *CustomerManager) AddCustomer(ctx context.Context, params customer_management.AddCustomerParams) middleware.Responder
AddCustomer (Swagger func) is the function behind the (POST) API Endpoint /customer Its function is to add the provided customer into the db.
func (*CustomerManager) GetCustomer ¶
func (m *CustomerManager) GetCustomer(ctx context.Context, params customer_management.GetCustomerParams) middleware.Responder
GetCustomer (Swagger func) is the function behind the (GET) API Endpoint /customer/{id} Its function is to retrieve the information that the system has about the customer whose ID has been provided.
func (*CustomerManager) ListCustomers ¶
func (m *CustomerManager) ListCustomers(ctx context.Context, params customer_management.ListCustomersParams) middleware.Responder
ListCustomers (Swagger func) is the function behind the (GET) API Endpoint /customer Its function is to provide a list containing all the customers in the system.
func (*CustomerManager) UpdateCustomer ¶
func (m *CustomerManager) UpdateCustomer(ctx context.Context, params customer_management.UpdateCustomerParams) middleware.Responder
UpdateCustomer (Swagger func) is the function behind the (PUT) API Endpoint /customer/{id} Its function is to update the customer whose ID is provided with the new data.