Ajouter apihandler.ScanGET
Ajouter *bottin.Data#ApiClient à APIHandler Implémenter BottinStatus dans apihandler.HealthGET
This commit is contained in:
parent
916a83fc02
commit
309942921d
5 changed files with 93 additions and 5 deletions
|
@ -9,6 +9,7 @@ import (
|
|||
|
||||
"git.agecem.com/agecem/bottin-ag/apihandler"
|
||||
"git.agecem.com/agecem/bottin-ag/config"
|
||||
bottindata "git.agecem.com/agecem/bottin/v5/data"
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/labstack/echo/v4/middleware"
|
||||
"github.com/spf13/cobra"
|
||||
|
@ -31,8 +32,13 @@ var apiCmd = &cobra.Command{
|
|||
v0 := e.Group("/v0")
|
||||
|
||||
handler := apihandler.New()
|
||||
if &handler == nil {
|
||||
log.Fatal("Newly created APIHandler is nil")
|
||||
}
|
||||
|
||||
apihandler.DeclareRoutes(v0, handler)
|
||||
handler.BottinAPIClient = bottindata.NewApiClient("bottin", "localhost", "http", 1312)
|
||||
|
||||
apihandler.DeclareRoutes(v0, &handler)
|
||||
|
||||
e.Start(fmt.Sprintf(":%d", cfg.API.Port))
|
||||
},
|
||||
|
|
Reference in a new issue