github.com/machinefi/w3bstream@v1.6.5-rc9.0.20240426031326-b8c7c4876e72/cmd/srv-applet-mgr/apis/strategy/root.go (about) 1 package strategy 2 3 import ( 4 "github.com/machinefi/w3bstream/cmd/srv-applet-mgr/apis/middleware" 5 "github.com/machinefi/w3bstream/pkg/depends/kit/httptransport" 6 "github.com/machinefi/w3bstream/pkg/depends/kit/kit" 7 "github.com/machinefi/w3bstream/pkg/enums" 8 "github.com/machinefi/w3bstream/pkg/modules/access_key" 9 ) 10 11 var Root = kit.NewRouter(httptransport.Group("/strategy")) 12 13 func init() { 14 Root.Register(kit.NewRouter(&middleware.ProjectProvider{}, &CreateStrategy{})) 15 Root.Register(kit.NewRouter(&UpdateStrategy{})) 16 Root.Register(kit.NewRouter(&GetStrategy{})) 17 Root.Register(kit.NewRouter(&middleware.ProjectProvider{}, &ListStrategy{})) 18 Root.Register(kit.NewRouter(&RemoveStrategy{})) 19 Root.Register(kit.NewRouter(&middleware.ProjectProvider{}, &BatchRemoveStrategy{})) 20 21 access_key.RouterRegister(Root, enums.ApiGroupStrategy, enums.ApiGroupStrategyDesc) 22 }