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

     1  package monitor
     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("/monitor"))
    12  
    13  func init() {
    14  	Root.Register(kit.NewRouter(&middleware.ProjectProvider{}, &CreateContractLog{}))
    15  	Root.Register(kit.NewRouter(&middleware.ProjectProvider{}, &CreateChainTx{}))
    16  	Root.Register(kit.NewRouter(&middleware.ProjectProvider{}, &CreateChainHeight{}))
    17  	Root.Register(kit.NewRouter(&middleware.ProjectProvider{}, &RemoveContractLog{}))
    18  	Root.Register(kit.NewRouter(&middleware.ProjectProvider{}, &RemoveChainTx{}))
    19  	Root.Register(kit.NewRouter(&middleware.ProjectProvider{}, &RemoveChainHeight{}))
    20  	Root.Register(kit.NewRouter(&middleware.ProjectProvider{}, &ControlContractLog{}))
    21  	Root.Register(kit.NewRouter(&middleware.ProjectProvider{}, &ControlChainTx{}))
    22  	Root.Register(kit.NewRouter(&middleware.ProjectProvider{}, &ControlChainHeight{}))
    23  
    24  	access_key.RouterRegister(Root, enums.ApiGroupMonitor, enums.ApiGroupMonitorDesc)
    25  }