package api import ( "net/http" "github.com/ncarlier/webhookd/pkg/config" ) // HandlerFunc custom function handler type HandlerFunc func(conf *config.Config) http.Handler // Route is the structure of an HTTP route definition type Route struct { Methods []string Path string HandlerFunc HandlerFunc } // Routes is a list of Route type Routes []Route var routes = Routes{ Route{ []string{"GET", "POST"}, "/", index, }, Route{ []string{"GET"}, "/healthz", healthz, }, Route{ []string{"GET"}, "/varz", varz, }, }