pink_fox/application/inner/controllers/ping_controller.go

22 lines
441 B
Go

package controllers
import "pink_fox/packages/fw"
type PingController struct {
services PingControllerService
}
type PingControllerService interface {
ResponseFactory() *fw.ResponseFactory
}
func NewPingController(services PingControllerService) *PingController {
return &PingController{
services: services,
}
}
func (it *PingController) Index() (fw.Response, fw.Error) {
return it.services.ResponseFactory().String("ok"), nil
}