Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Rulesheets ¶
type Rulesheets interface { CreateRulesheet() gin.HandlerFunc GetRulesheets() gin.HandlerFunc GetRulesheet() gin.HandlerFunc UpdateRulesheet() gin.HandlerFunc DeleteRulesheet() gin.HandlerFunc }
Rulesheets defines a set of methods for handling CRUD operations on rulesheets in a Gin web framework.
Property:
- CreateRulesheet: A function that handles the creation of a new rulesheet. It should receive data from the client and store it in a db or other storage system.
- GetRulesheets: is a function that handles the HTTP GET request to retrieve a list of all rulesheets. It returns a gin.HandlerFunc which is a function that handles the request and sends the response.
- GetRulesheet: is a function that handles the HTTP GET request to retrieve a specific rulesheet from a database or other data source. It takes in a gin.Context object as a parameter and returns a gin.HandlerFunc that can be used as a middleware to handle the request. The function should typically extract the ID
- UpdateRulesheet: is a function that handles the updating of a specific rulesheet. It takes in a gin context object and returns a gin handler function. This handler function should retrieve the updated rulesheet data from the request body, validate it, and update the corresponding rulesheet in the database. The handler
- DeleteRulesheet: is a function that handles the deletion of a specific
rulesheet. It is a gin.HandlerFunc, which means it is a function that takes in a gin.Context object as its parameter and returns nothing. The function should retrieve the ID of the rulesheet to be deleted from the request parameters or
func NewRulesheets ¶
func NewRulesheets(service services.Rulesheets) Rulesheets
NewRulesheets creates a new instance of the Rulesheets struct with a given service.
Click to show internal directories.
Click to hide internal directories.