add server api get and update service control endpoints
This commit is contained in:
38
local/controller/system.go
Normal file
38
local/controller/system.go
Normal file
@@ -0,0 +1,38 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"acc-server-manager/local/utl/common"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
)
|
||||
|
||||
type SystemController struct {
|
||||
}
|
||||
|
||||
// NewSystemController
|
||||
// Initializes SystemController.
|
||||
//
|
||||
// Args:
|
||||
// *services.SystemService: Service control service
|
||||
// *Fiber.RouterGroup: Fiber Router Group
|
||||
// Returns:
|
||||
// *SystemController: Controller for service control interactions
|
||||
func NewSystemController(routeGroups *common.RouteGroups) *SystemController {
|
||||
ac := &SystemController{}
|
||||
|
||||
apiGroup := routeGroups.System
|
||||
apiGroup.Get("/health", ac.getFirst)
|
||||
|
||||
return ac
|
||||
}
|
||||
|
||||
// getFirst returns service control status
|
||||
//
|
||||
// @Summary Return service control status
|
||||
// @Description Return service control status
|
||||
// @Tags service-control
|
||||
// @Success 200 {array} string
|
||||
// @Router /v1/service-control [get]
|
||||
func (ac *SystemController) getFirst(c *fiber.Ctx) error {
|
||||
return c.SendStatus(fiber.StatusOK)
|
||||
}
|
||||
Reference in New Issue
Block a user