persistentvolume.pb.micro.go 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. // Code generated by protoc-gen-micro. DO NOT EDIT.
  2. // source: proto/persistentvolume.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 PersistentVolumeService service
  25. func NewPersistentVolumeServiceEndpoints() []*api.Endpoint {
  26. return []*api.Endpoint{}
  27. }
  28. // Client API for PersistentVolumeService service
  29. type PersistentVolumeService interface {
  30. GetPersistentVolumeList(ctx context.Context, in *GetPersistentVolumeListRequest, opts ...client.CallOption) (*GetPersistentVolumeListResponse, error)
  31. CreatePersistentVolume(ctx context.Context, in *CreatePersistentVolumeRequest, opts ...client.CallOption) (*CreatePersistentVolumeResponse, error)
  32. DeletePersistentVolume(ctx context.Context, in *DeletePersistentVolumeRequest, opts ...client.CallOption) (*DeletePersistentVolumeResponse, error)
  33. }
  34. type persistentVolumeService struct {
  35. c client.Client
  36. name string
  37. }
  38. func NewPersistentVolumeService(name string, c client.Client) PersistentVolumeService {
  39. return &persistentVolumeService{
  40. c: c,
  41. name: name,
  42. }
  43. }
  44. func (c *persistentVolumeService) GetPersistentVolumeList(ctx context.Context, in *GetPersistentVolumeListRequest, opts ...client.CallOption) (*GetPersistentVolumeListResponse, error) {
  45. req := c.c.NewRequest(c.name, "PersistentVolumeService.GetPersistentVolumeList", in)
  46. out := new(GetPersistentVolumeListResponse)
  47. err := c.c.Call(ctx, req, out, opts...)
  48. if err != nil {
  49. return nil, err
  50. }
  51. return out, nil
  52. }
  53. func (c *persistentVolumeService) CreatePersistentVolume(ctx context.Context, in *CreatePersistentVolumeRequest, opts ...client.CallOption) (*CreatePersistentVolumeResponse, error) {
  54. req := c.c.NewRequest(c.name, "PersistentVolumeService.CreatePersistentVolume", in)
  55. out := new(CreatePersistentVolumeResponse)
  56. err := c.c.Call(ctx, req, out, opts...)
  57. if err != nil {
  58. return nil, err
  59. }
  60. return out, nil
  61. }
  62. func (c *persistentVolumeService) DeletePersistentVolume(ctx context.Context, in *DeletePersistentVolumeRequest, opts ...client.CallOption) (*DeletePersistentVolumeResponse, error) {
  63. req := c.c.NewRequest(c.name, "PersistentVolumeService.DeletePersistentVolume", in)
  64. out := new(DeletePersistentVolumeResponse)
  65. err := c.c.Call(ctx, req, out, opts...)
  66. if err != nil {
  67. return nil, err
  68. }
  69. return out, nil
  70. }
  71. // Server API for PersistentVolumeService service
  72. type PersistentVolumeServiceHandler interface {
  73. GetPersistentVolumeList(context.Context, *GetPersistentVolumeListRequest, *GetPersistentVolumeListResponse) error
  74. CreatePersistentVolume(context.Context, *CreatePersistentVolumeRequest, *CreatePersistentVolumeResponse) error
  75. DeletePersistentVolume(context.Context, *DeletePersistentVolumeRequest, *DeletePersistentVolumeResponse) error
  76. }
  77. func RegisterPersistentVolumeServiceHandler(s server.Server, hdlr PersistentVolumeServiceHandler, opts ...server.HandlerOption) error {
  78. type persistentVolumeService interface {
  79. GetPersistentVolumeList(ctx context.Context, in *GetPersistentVolumeListRequest, out *GetPersistentVolumeListResponse) error
  80. CreatePersistentVolume(ctx context.Context, in *CreatePersistentVolumeRequest, out *CreatePersistentVolumeResponse) error
  81. DeletePersistentVolume(ctx context.Context, in *DeletePersistentVolumeRequest, out *DeletePersistentVolumeResponse) error
  82. }
  83. type PersistentVolumeService struct {
  84. persistentVolumeService
  85. }
  86. h := &persistentVolumeServiceHandler{hdlr}
  87. return s.Handle(s.NewHandler(&PersistentVolumeService{h}, opts...))
  88. }
  89. type persistentVolumeServiceHandler struct {
  90. PersistentVolumeServiceHandler
  91. }
  92. func (h *persistentVolumeServiceHandler) GetPersistentVolumeList(ctx context.Context, in *GetPersistentVolumeListRequest, out *GetPersistentVolumeListResponse) error {
  93. return h.PersistentVolumeServiceHandler.GetPersistentVolumeList(ctx, in, out)
  94. }
  95. func (h *persistentVolumeServiceHandler) CreatePersistentVolume(ctx context.Context, in *CreatePersistentVolumeRequest, out *CreatePersistentVolumeResponse) error {
  96. return h.PersistentVolumeServiceHandler.CreatePersistentVolume(ctx, in, out)
  97. }
  98. func (h *persistentVolumeServiceHandler) DeletePersistentVolume(ctx context.Context, in *DeletePersistentVolumeRequest, out *DeletePersistentVolumeResponse) error {
  99. return h.PersistentVolumeServiceHandler.DeletePersistentVolume(ctx, in, out)
  100. }