clusterrole.pb.micro.go 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. // Code generated by protoc-gen-micro. DO NOT EDIT.
  2. // source: proto/clusterrole.proto
  3. package kubernetes_service
  4. import (
  5. fmt "fmt"
  6. proto "google.golang.org/protobuf/proto"
  7. math "math"
  8. )
  9. import (
  10. context "context"
  11. api "go-micro.dev/v4/api"
  12. client "go-micro.dev/v4/client"
  13. server "go-micro.dev/v4/server"
  14. )
  15. // Reference imports to suppress errors if they are not otherwise used.
  16. var _ = proto.Marshal
  17. var _ = fmt.Errorf
  18. var _ = math.Inf
  19. // Reference imports to suppress errors if they are not otherwise used.
  20. var _ api.Endpoint
  21. var _ context.Context
  22. var _ client.Option
  23. var _ server.Option
  24. // Api Endpoints for ClusterRoleService service
  25. func NewClusterRoleServiceEndpoints() []*api.Endpoint {
  26. return []*api.Endpoint{}
  27. }
  28. // Client API for ClusterRoleService service
  29. type ClusterRoleService interface {
  30. GetClusterRoleList(ctx context.Context, in *GetClusterRoleListRequest, opts ...client.CallOption) (*GetClusterRoleListResponse, error)
  31. GetClusterRole(ctx context.Context, in *GetClusterRoleRequest, opts ...client.CallOption) (*GetClusterRoleResponse, error)
  32. UpdateClusterRole(ctx context.Context, in *UpdateClusterRoleRequest, opts ...client.CallOption) (*UpdateClusterRoleResponse, error)
  33. CreateClusterRole(ctx context.Context, in *CreateClusterRoleRequest, opts ...client.CallOption) (*CreateClusterRoleResponse, error)
  34. DeleteClusterRole(ctx context.Context, in *DeleteClusterRoleRequest, opts ...client.CallOption) (*DeleteClusterRoleResponse, error)
  35. }
  36. type clusterRoleService struct {
  37. c client.Client
  38. name string
  39. }
  40. func NewClusterRoleService(name string, c client.Client) ClusterRoleService {
  41. return &clusterRoleService{
  42. c: c,
  43. name: name,
  44. }
  45. }
  46. func (c *clusterRoleService) GetClusterRoleList(ctx context.Context, in *GetClusterRoleListRequest, opts ...client.CallOption) (*GetClusterRoleListResponse, error) {
  47. req := c.c.NewRequest(c.name, "ClusterRoleService.GetClusterRoleList", in)
  48. out := new(GetClusterRoleListResponse)
  49. err := c.c.Call(ctx, req, out, opts...)
  50. if err != nil {
  51. return nil, err
  52. }
  53. return out, nil
  54. }
  55. func (c *clusterRoleService) GetClusterRole(ctx context.Context, in *GetClusterRoleRequest, opts ...client.CallOption) (*GetClusterRoleResponse, error) {
  56. req := c.c.NewRequest(c.name, "ClusterRoleService.GetClusterRole", in)
  57. out := new(GetClusterRoleResponse)
  58. err := c.c.Call(ctx, req, out, opts...)
  59. if err != nil {
  60. return nil, err
  61. }
  62. return out, nil
  63. }
  64. func (c *clusterRoleService) UpdateClusterRole(ctx context.Context, in *UpdateClusterRoleRequest, opts ...client.CallOption) (*UpdateClusterRoleResponse, error) {
  65. req := c.c.NewRequest(c.name, "ClusterRoleService.UpdateClusterRole", in)
  66. out := new(UpdateClusterRoleResponse)
  67. err := c.c.Call(ctx, req, out, opts...)
  68. if err != nil {
  69. return nil, err
  70. }
  71. return out, nil
  72. }
  73. func (c *clusterRoleService) CreateClusterRole(ctx context.Context, in *CreateClusterRoleRequest, opts ...client.CallOption) (*CreateClusterRoleResponse, error) {
  74. req := c.c.NewRequest(c.name, "ClusterRoleService.CreateClusterRole", in)
  75. out := new(CreateClusterRoleResponse)
  76. err := c.c.Call(ctx, req, out, opts...)
  77. if err != nil {
  78. return nil, err
  79. }
  80. return out, nil
  81. }
  82. func (c *clusterRoleService) DeleteClusterRole(ctx context.Context, in *DeleteClusterRoleRequest, opts ...client.CallOption) (*DeleteClusterRoleResponse, error) {
  83. req := c.c.NewRequest(c.name, "ClusterRoleService.DeleteClusterRole", in)
  84. out := new(DeleteClusterRoleResponse)
  85. err := c.c.Call(ctx, req, out, opts...)
  86. if err != nil {
  87. return nil, err
  88. }
  89. return out, nil
  90. }
  91. // Server API for ClusterRoleService service
  92. type ClusterRoleServiceHandler interface {
  93. GetClusterRoleList(context.Context, *GetClusterRoleListRequest, *GetClusterRoleListResponse) error
  94. GetClusterRole(context.Context, *GetClusterRoleRequest, *GetClusterRoleResponse) error
  95. UpdateClusterRole(context.Context, *UpdateClusterRoleRequest, *UpdateClusterRoleResponse) error
  96. CreateClusterRole(context.Context, *CreateClusterRoleRequest, *CreateClusterRoleResponse) error
  97. DeleteClusterRole(context.Context, *DeleteClusterRoleRequest, *DeleteClusterRoleResponse) error
  98. }
  99. func RegisterClusterRoleServiceHandler(s server.Server, hdlr ClusterRoleServiceHandler, opts ...server.HandlerOption) error {
  100. type clusterRoleService interface {
  101. GetClusterRoleList(ctx context.Context, in *GetClusterRoleListRequest, out *GetClusterRoleListResponse) error
  102. GetClusterRole(ctx context.Context, in *GetClusterRoleRequest, out *GetClusterRoleResponse) error
  103. UpdateClusterRole(ctx context.Context, in *UpdateClusterRoleRequest, out *UpdateClusterRoleResponse) error
  104. CreateClusterRole(ctx context.Context, in *CreateClusterRoleRequest, out *CreateClusterRoleResponse) error
  105. DeleteClusterRole(ctx context.Context, in *DeleteClusterRoleRequest, out *DeleteClusterRoleResponse) error
  106. }
  107. type ClusterRoleService struct {
  108. clusterRoleService
  109. }
  110. h := &clusterRoleServiceHandler{hdlr}
  111. return s.Handle(s.NewHandler(&ClusterRoleService{h}, opts...))
  112. }
  113. type clusterRoleServiceHandler struct {
  114. ClusterRoleServiceHandler
  115. }
  116. func (h *clusterRoleServiceHandler) GetClusterRoleList(ctx context.Context, in *GetClusterRoleListRequest, out *GetClusterRoleListResponse) error {
  117. return h.ClusterRoleServiceHandler.GetClusterRoleList(ctx, in, out)
  118. }
  119. func (h *clusterRoleServiceHandler) GetClusterRole(ctx context.Context, in *GetClusterRoleRequest, out *GetClusterRoleResponse) error {
  120. return h.ClusterRoleServiceHandler.GetClusterRole(ctx, in, out)
  121. }
  122. func (h *clusterRoleServiceHandler) UpdateClusterRole(ctx context.Context, in *UpdateClusterRoleRequest, out *UpdateClusterRoleResponse) error {
  123. return h.ClusterRoleServiceHandler.UpdateClusterRole(ctx, in, out)
  124. }
  125. func (h *clusterRoleServiceHandler) CreateClusterRole(ctx context.Context, in *CreateClusterRoleRequest, out *CreateClusterRoleResponse) error {
  126. return h.ClusterRoleServiceHandler.CreateClusterRole(ctx, in, out)
  127. }
  128. func (h *clusterRoleServiceHandler) DeleteClusterRole(ctx context.Context, in *DeleteClusterRoleRequest, out *DeleteClusterRoleResponse) error {
  129. return h.ClusterRoleServiceHandler.DeleteClusterRole(ctx, in, out)
  130. }