github.com/machinefi/w3bstream@v1.6.5-rc9.0.20240426031326-b8c7c4876e72/cmd/srv-applet-mgr/apis/deploy/root.go (about)

     1  package deploy
     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("/deploy"))
    12  
    13  func init() {
    14  	Root.Register(kit.NewRouter(&CreateAndStartInstance{}))
    15  	Root.Register(kit.NewRouter(&GetInstanceByInstanceID{}))
    16  	Root.Register(kit.NewRouter(&GetInstanceByAppletID{}))
    17  	Root.Register(kit.NewRouter(&ControlInstance{}))
    18  	Root.Register(kit.NewRouter(&RemoveInstance{}))
    19  	Root.Register(kit.NewRouter(&middleware.ProjectProvider{}, &BatchRemoveInstance{}))
    20  
    21  	access_key.RouterRegister(Root, enums.ApiGroupDeploy, enums.ApiGroupDeployDesc)
    22  }