deployment.pb.micro.go 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. // Code generated by protoc-gen-micro. DO NOT EDIT.
  2. // source: proto/deployment.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 DeploymentService service
  25. func NewDeploymentServiceEndpoints() []*api.Endpoint {
  26. return []*api.Endpoint{}
  27. }
  28. // Client API for DeploymentService service
  29. type DeploymentService interface {
  30. GetDeploymentList(ctx context.Context, in *GetDeploymentListRequest, opts ...client.CallOption) (*GetDeploymentListResponse, error)
  31. GetDeployment(ctx context.Context, in *GetDeploymentRequest, opts ...client.CallOption) (*GetDeploymentResponse, error)
  32. UpdateDeployment(ctx context.Context, in *UpdateDeploymentRequest, opts ...client.CallOption) (*UpdateDeploymentResponse, error)
  33. CreateDeployment(ctx context.Context, in *CreateDeploymentRequest, opts ...client.CallOption) (*CreateDeploymentResponse, error)
  34. DeleteDeployment(ctx context.Context, in *DeleteDeploymentRequest, opts ...client.CallOption) (*DeleteDeploymentResponse, error)
  35. }
  36. type deploymentService struct {
  37. c client.Client
  38. name string
  39. }
  40. func NewDeploymentService(name string, c client.Client) DeploymentService {
  41. return &deploymentService{
  42. c: c,
  43. name: name,
  44. }
  45. }
  46. func (c *deploymentService) GetDeploymentList(ctx context.Context, in *GetDeploymentListRequest, opts ...client.CallOption) (*GetDeploymentListResponse, error) {
  47. req := c.c.NewRequest(c.name, "DeploymentService.GetDeploymentList", in)
  48. out := new(GetDeploymentListResponse)
  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 *deploymentService) GetDeployment(ctx context.Context, in *GetDeploymentRequest, opts ...client.CallOption) (*GetDeploymentResponse, error) {
  56. req := c.c.NewRequest(c.name, "DeploymentService.GetDeployment", in)
  57. out := new(GetDeploymentResponse)
  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 *deploymentService) UpdateDeployment(ctx context.Context, in *UpdateDeploymentRequest, opts ...client.CallOption) (*UpdateDeploymentResponse, error) {
  65. req := c.c.NewRequest(c.name, "DeploymentService.UpdateDeployment", in)
  66. out := new(UpdateDeploymentResponse)
  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 *deploymentService) CreateDeployment(ctx context.Context, in *CreateDeploymentRequest, opts ...client.CallOption) (*CreateDeploymentResponse, error) {
  74. req := c.c.NewRequest(c.name, "DeploymentService.CreateDeployment", in)
  75. out := new(CreateDeploymentResponse)
  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 *deploymentService) DeleteDeployment(ctx context.Context, in *DeleteDeploymentRequest, opts ...client.CallOption) (*DeleteDeploymentResponse, error) {
  83. req := c.c.NewRequest(c.name, "DeploymentService.DeleteDeployment", in)
  84. out := new(DeleteDeploymentResponse)
  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 DeploymentService service
  92. type DeploymentServiceHandler interface {
  93. GetDeploymentList(context.Context, *GetDeploymentListRequest, *GetDeploymentListResponse) error
  94. GetDeployment(context.Context, *GetDeploymentRequest, *GetDeploymentResponse) error
  95. UpdateDeployment(context.Context, *UpdateDeploymentRequest, *UpdateDeploymentResponse) error
  96. CreateDeployment(context.Context, *CreateDeploymentRequest, *CreateDeploymentResponse) error
  97. DeleteDeployment(context.Context, *DeleteDeploymentRequest, *DeleteDeploymentResponse) error
  98. }
  99. func RegisterDeploymentServiceHandler(s server.Server, hdlr DeploymentServiceHandler, opts ...server.HandlerOption) error {
  100. type deploymentService interface {
  101. GetDeploymentList(ctx context.Context, in *GetDeploymentListRequest, out *GetDeploymentListResponse) error
  102. GetDeployment(ctx context.Context, in *GetDeploymentRequest, out *GetDeploymentResponse) error
  103. UpdateDeployment(ctx context.Context, in *UpdateDeploymentRequest, out *UpdateDeploymentResponse) error
  104. CreateDeployment(ctx context.Context, in *CreateDeploymentRequest, out *CreateDeploymentResponse) error
  105. DeleteDeployment(ctx context.Context, in *DeleteDeploymentRequest, out *DeleteDeploymentResponse) error
  106. }
  107. type DeploymentService struct {
  108. deploymentService
  109. }
  110. h := &deploymentServiceHandler{hdlr}
  111. return s.Handle(s.NewHandler(&DeploymentService{h}, opts...))
  112. }
  113. type deploymentServiceHandler struct {
  114. DeploymentServiceHandler
  115. }
  116. func (h *deploymentServiceHandler) GetDeploymentList(ctx context.Context, in *GetDeploymentListRequest, out *GetDeploymentListResponse) error {
  117. return h.DeploymentServiceHandler.GetDeploymentList(ctx, in, out)
  118. }
  119. func (h *deploymentServiceHandler) GetDeployment(ctx context.Context, in *GetDeploymentRequest, out *GetDeploymentResponse) error {
  120. return h.DeploymentServiceHandler.GetDeployment(ctx, in, out)
  121. }
  122. func (h *deploymentServiceHandler) UpdateDeployment(ctx context.Context, in *UpdateDeploymentRequest, out *UpdateDeploymentResponse) error {
  123. return h.DeploymentServiceHandler.UpdateDeployment(ctx, in, out)
  124. }
  125. func (h *deploymentServiceHandler) CreateDeployment(ctx context.Context, in *CreateDeploymentRequest, out *CreateDeploymentResponse) error {
  126. return h.DeploymentServiceHandler.CreateDeployment(ctx, in, out)
  127. }
  128. func (h *deploymentServiceHandler) DeleteDeployment(ctx context.Context, in *DeleteDeploymentRequest, out *DeleteDeploymentResponse) error {
  129. return h.DeploymentServiceHandler.DeleteDeployment(ctx, in, out)
  130. }