2024-05-03 17:11:56 +00:00
|
|
|
package handler
|
|
|
|
|
2024-10-29 14:30:04 +00:00
|
|
|
func (s *fiberServer) Routes() {
|
|
|
|
s.App.Get("/", s.homeHandler)
|
2024-05-03 17:11:56 +00:00
|
|
|
|
2024-10-29 14:30:04 +00:00
|
|
|
// V1 API routes
|
|
|
|
v1 := s.App.Group("/api/v1")
|
2024-05-03 17:11:56 +00:00
|
|
|
|
2024-06-03 07:17:51 +00:00
|
|
|
// these routes are public, they don't require a prober api key
|
|
|
|
v1.Get("/nodes", Nodes)
|
2024-05-04 10:24:47 +00:00
|
|
|
v1.Post("/nodes", AddNode)
|
2024-06-03 07:17:51 +00:00
|
|
|
v1.Get("/nodes/id/:id", Node)
|
2024-05-06 10:19:17 +00:00
|
|
|
v1.Get("/nodes/logs", ProbeLogs)
|
2024-05-31 06:30:56 +00:00
|
|
|
v1.Get("/fees", NetFees)
|
2024-05-06 06:35:15 +00:00
|
|
|
v1.Get("/countries", Countries)
|
2024-06-03 07:17:51 +00:00
|
|
|
|
|
|
|
// these routes are for prober, they require a prober api key
|
2024-05-04 12:52:22 +00:00
|
|
|
v1.Get("/job", CheckProber, GiveJob)
|
2024-05-04 18:42:47 +00:00
|
|
|
v1.Post("/job", CheckProber, ProcessJob)
|
2024-05-03 17:11:56 +00:00
|
|
|
}
|