feat: add query feature endpoint for 'serve' support

This commit is contained in:
Johan Siebens
2023-12-29 14:47:11 +01:00
parent 038c0afa8b
commit 75b58d0784
2 changed files with 72 additions and 0 deletions
+2
View File
@@ -114,6 +114,7 @@ func Start(c *config.Config) error {
dnsHandlers := handlers.NewDNSHandlers(binder, dnsProvider)
idTokenHandlers := handlers.NewIDTokenHandlers(binder, c, repository)
sshActionHandlers := handlers.NewSSHActionHandlers(binder, c, repository)
queryFeatureHandlers := handlers.NewQueryFeatureHandlers(binder, dnsProvider, repository)
e := echo.New()
e.Use(EchoMetrics(p), EchoLogger(httpLogger), EchoErrorHandler(), EchoRecover())
@@ -124,6 +125,7 @@ func Start(c *config.Config) error {
e.GET("/machine/ssh/action/:src_machine_id/to/:dst_machine_id", sshActionHandlers.StartAuth)
e.GET("/machine/ssh/action/:src_machine_id/to/:dst_machine_id/:check_period", sshActionHandlers.StartAuth)
e.GET("/machine/ssh/action/check/:key", sshActionHandlers.CheckAuth)
e.POST("/machine/feature/query", queryFeatureHandlers.QueryFeature)
return e
}