productManager

package
v0.0.0-...-33e56a9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProductManager

type ProductManager struct {
	BasePath string
	// contains filtered or unexported fields
}

ProductManager is the struct defined to group and contain all the methods that interact with the product 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

New is the function to create the struct ProductManager that grant access to the methods to interact with the Product 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: - ProductManager: struct to interact with product endpoint functionalities.

func (*ProductManager) AddProduct

AddProduct (Swagger func) is the function behind the (POST) API Endpoint /product Its function is to add the provided product into the db.

func (*ProductManager) GetProduct

GetProduct (Swagger func) is the function behind the (GET) API Endpoint /product/{id} Its function is to retrieve the information that the system has about the product whose ID has been provided.

func (*ProductManager) ListProducts

ListProducts (Swagger func) is the function behind the (GET) API Endpoint /product Its function is to provide a list containing all the products in the system.

func (*ProductManager) UpdateProduct

UpdateProduct (Swagger func) is the function behind the (PUT) API Endpoint /product/{id} Its function is to update the product whose ID is provided with the new data.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL