mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 12:50:05 +01:00
annotations api and page
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
httpPprof "net/http/pprof"
|
||||
|
||||
"github.com/glueops/autoglue/internal/config"
|
||||
"github.com/glueops/autoglue/internal/handlers/annotations"
|
||||
"github.com/glueops/autoglue/internal/handlers/authn"
|
||||
"github.com/glueops/autoglue/internal/handlers/health"
|
||||
"github.com/glueops/autoglue/internal/handlers/labels"
|
||||
@@ -54,6 +55,18 @@ func RegisterRoutes(r chi.Router) {
|
||||
})
|
||||
})
|
||||
|
||||
v1.Route("/annotations", func(a chi.Router) {
|
||||
a.Use(authMW)
|
||||
a.Get("/", annotations.ListAnnotations)
|
||||
a.Post("/", annotations.CreateAnnotation)
|
||||
a.Get("/{id}", annotations.GetAnnotation)
|
||||
a.Patch("/{id}", annotations.UpdateAnnotation)
|
||||
a.Delete("/{id}", annotations.DeleteAnnotation)
|
||||
a.Get("/{id}/node_pools", annotations.ListNodePoolsWithAnnotation)
|
||||
a.Post("/{id}/node_pools", annotations.AddAnnotationToNodePools)
|
||||
a.Delete("/{id}/node_pools/{poolId}", annotations.RemoveAnnotationFromNodePool)
|
||||
})
|
||||
|
||||
v1.Route("/orgs", func(o chi.Router) {
|
||||
o.Use(authMW)
|
||||
o.Post("/", orgs.CreateOrganization)
|
||||
|
||||
Reference in New Issue
Block a user