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

     1  package publisher
     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("/publisher"))
    12  
    13  func init() {
    14  	Root.Register(kit.NewRouter(&GetPublisher{}))
    15  	Root.Register(kit.NewRouter(&middleware.ProjectProvider{}, &ListPublisher{}))
    16  	Root.Register(kit.NewRouter(&RemovePublisher{}))
    17  	Root.Register(kit.NewRouter(&middleware.ProjectProvider{}, &BatchRemovePublisher{}))
    18  	Root.Register(kit.NewRouter(&middleware.ProjectProvider{}, &CreatePublisher{}))
    19  	Root.Register(kit.NewRouter(&middleware.ProjectProvider{}, &UpsertPublisher{}))
    20  	Root.Register(kit.NewRouter(&middleware.ProjectProvider{}, &CreateAnonymousPublisher{}))
    21  	Root.Register(kit.NewRouter(&middleware.ProjectProvider{}, &UpdatePublisher{}))
    22  
    23  	access_key.RouterRegister(Root, enums.ApiGroupPublisher, enums.ApiGroupPublisherDesc)
    24  }