// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.4.0 // - protoc (unknown) // source: api/v1/subscription_service.proto package apiv1 import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.62.0 or later. const _ = grpc.SupportPackageIsVersion8 const ( SubscriptionService_GetSubscription_FullMethodName = "/slash.api.v1.SubscriptionService/GetSubscription" SubscriptionService_UpdateSubscription_FullMethodName = "/slash.api.v1.SubscriptionService/UpdateSubscription" ) // SubscriptionServiceClient is the client API for SubscriptionService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type SubscriptionServiceClient interface { GetSubscription(ctx context.Context, in *GetSubscriptionRequest, opts ...grpc.CallOption) (*GetSubscriptionResponse, error) UpdateSubscription(ctx context.Context, in *UpdateSubscriptionRequest, opts ...grpc.CallOption) (*UpdateSubscriptionResponse, error) } type subscriptionServiceClient struct { cc grpc.ClientConnInterface } func NewSubscriptionServiceClient(cc grpc.ClientConnInterface) SubscriptionServiceClient { return &subscriptionServiceClient{cc} } func (c *subscriptionServiceClient) GetSubscription(ctx context.Context, in *GetSubscriptionRequest, opts ...grpc.CallOption) (*GetSubscriptionResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetSubscriptionResponse) err := c.cc.Invoke(ctx, SubscriptionService_GetSubscription_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *subscriptionServiceClient) UpdateSubscription(ctx context.Context, in *UpdateSubscriptionRequest, opts ...grpc.CallOption) (*UpdateSubscriptionResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UpdateSubscriptionResponse) err := c.cc.Invoke(ctx, SubscriptionService_UpdateSubscription_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // SubscriptionServiceServer is the server API for SubscriptionService service. // All implementations must embed UnimplementedSubscriptionServiceServer // for forward compatibility type SubscriptionServiceServer interface { GetSubscription(context.Context, *GetSubscriptionRequest) (*GetSubscriptionResponse, error) UpdateSubscription(context.Context, *UpdateSubscriptionRequest) (*UpdateSubscriptionResponse, error) mustEmbedUnimplementedSubscriptionServiceServer() } // UnimplementedSubscriptionServiceServer must be embedded to have forward compatible implementations. type UnimplementedSubscriptionServiceServer struct { } func (UnimplementedSubscriptionServiceServer) GetSubscription(context.Context, *GetSubscriptionRequest) (*GetSubscriptionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetSubscription not implemented") } func (UnimplementedSubscriptionServiceServer) UpdateSubscription(context.Context, *UpdateSubscriptionRequest) (*UpdateSubscriptionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateSubscription not implemented") } func (UnimplementedSubscriptionServiceServer) mustEmbedUnimplementedSubscriptionServiceServer() {} // UnsafeSubscriptionServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to SubscriptionServiceServer will // result in compilation errors. type UnsafeSubscriptionServiceServer interface { mustEmbedUnimplementedSubscriptionServiceServer() } func RegisterSubscriptionServiceServer(s grpc.ServiceRegistrar, srv SubscriptionServiceServer) { s.RegisterService(&SubscriptionService_ServiceDesc, srv) } func _SubscriptionService_GetSubscription_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetSubscriptionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(SubscriptionServiceServer).GetSubscription(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: SubscriptionService_GetSubscription_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SubscriptionServiceServer).GetSubscription(ctx, req.(*GetSubscriptionRequest)) } return interceptor(ctx, in, info, handler) } func _SubscriptionService_UpdateSubscription_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateSubscriptionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(SubscriptionServiceServer).UpdateSubscription(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: SubscriptionService_UpdateSubscription_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SubscriptionServiceServer).UpdateSubscription(ctx, req.(*UpdateSubscriptionRequest)) } return interceptor(ctx, in, info, handler) } // SubscriptionService_ServiceDesc is the grpc.ServiceDesc for SubscriptionService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var SubscriptionService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "slash.api.v1.SubscriptionService", HandlerType: (*SubscriptionServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetSubscription", Handler: _SubscriptionService_GetSubscription_Handler, }, { MethodName: "UpdateSubscription", Handler: _SubscriptionService_UpdateSubscription_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/v1/subscription_service.proto", }