draft grpc
This commit is contained in:
731
internal/gen/proto/app/v1/account_grpc.pb.go
Normal file
731
internal/gen/proto/app/v1/account_grpc.pb.go
Normal file
@@ -0,0 +1,731 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.1
|
||||
// - protoc (unknown)
|
||||
// source: app/v1/account.proto
|
||||
|
||||
package appv1
|
||||
|
||||
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.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
AccountService_GetMe_FullMethodName = "/stream.app.v1.AccountService/GetMe"
|
||||
AccountService_UpdateMe_FullMethodName = "/stream.app.v1.AccountService/UpdateMe"
|
||||
AccountService_DeleteMe_FullMethodName = "/stream.app.v1.AccountService/DeleteMe"
|
||||
AccountService_ClearMyData_FullMethodName = "/stream.app.v1.AccountService/ClearMyData"
|
||||
)
|
||||
|
||||
// AccountServiceClient is the client API for AccountService 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 AccountServiceClient interface {
|
||||
GetMe(ctx context.Context, in *GetMeRequest, opts ...grpc.CallOption) (*GetMeResponse, error)
|
||||
UpdateMe(ctx context.Context, in *UpdateMeRequest, opts ...grpc.CallOption) (*UpdateMeResponse, error)
|
||||
DeleteMe(ctx context.Context, in *DeleteMeRequest, opts ...grpc.CallOption) (*MessageResponse, error)
|
||||
ClearMyData(ctx context.Context, in *ClearMyDataRequest, opts ...grpc.CallOption) (*MessageResponse, error)
|
||||
}
|
||||
|
||||
type accountServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewAccountServiceClient(cc grpc.ClientConnInterface) AccountServiceClient {
|
||||
return &accountServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *accountServiceClient) GetMe(ctx context.Context, in *GetMeRequest, opts ...grpc.CallOption) (*GetMeResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetMeResponse)
|
||||
err := c.cc.Invoke(ctx, AccountService_GetMe_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountServiceClient) UpdateMe(ctx context.Context, in *UpdateMeRequest, opts ...grpc.CallOption) (*UpdateMeResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(UpdateMeResponse)
|
||||
err := c.cc.Invoke(ctx, AccountService_UpdateMe_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountServiceClient) DeleteMe(ctx context.Context, in *DeleteMeRequest, opts ...grpc.CallOption) (*MessageResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MessageResponse)
|
||||
err := c.cc.Invoke(ctx, AccountService_DeleteMe_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountServiceClient) ClearMyData(ctx context.Context, in *ClearMyDataRequest, opts ...grpc.CallOption) (*MessageResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MessageResponse)
|
||||
err := c.cc.Invoke(ctx, AccountService_ClearMyData_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// AccountServiceServer is the server API for AccountService service.
|
||||
// All implementations must embed UnimplementedAccountServiceServer
|
||||
// for forward compatibility.
|
||||
type AccountServiceServer interface {
|
||||
GetMe(context.Context, *GetMeRequest) (*GetMeResponse, error)
|
||||
UpdateMe(context.Context, *UpdateMeRequest) (*UpdateMeResponse, error)
|
||||
DeleteMe(context.Context, *DeleteMeRequest) (*MessageResponse, error)
|
||||
ClearMyData(context.Context, *ClearMyDataRequest) (*MessageResponse, error)
|
||||
mustEmbedUnimplementedAccountServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedAccountServiceServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedAccountServiceServer struct{}
|
||||
|
||||
func (UnimplementedAccountServiceServer) GetMe(context.Context, *GetMeRequest) (*GetMeResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetMe not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServiceServer) UpdateMe(context.Context, *UpdateMeRequest) (*UpdateMeResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method UpdateMe not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServiceServer) DeleteMe(context.Context, *DeleteMeRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DeleteMe not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServiceServer) ClearMyData(context.Context, *ClearMyDataRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ClearMyData not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServiceServer) mustEmbedUnimplementedAccountServiceServer() {}
|
||||
func (UnimplementedAccountServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeAccountServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to AccountServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeAccountServiceServer interface {
|
||||
mustEmbedUnimplementedAccountServiceServer()
|
||||
}
|
||||
|
||||
func RegisterAccountServiceServer(s grpc.ServiceRegistrar, srv AccountServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedAccountServiceServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&AccountService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _AccountService_GetMe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetMeRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AccountServiceServer).GetMe(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AccountService_GetMe_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountServiceServer).GetMe(ctx, req.(*GetMeRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AccountService_UpdateMe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateMeRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AccountServiceServer).UpdateMe(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AccountService_UpdateMe_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountServiceServer).UpdateMe(ctx, req.(*UpdateMeRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AccountService_DeleteMe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteMeRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AccountServiceServer).DeleteMe(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AccountService_DeleteMe_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountServiceServer).DeleteMe(ctx, req.(*DeleteMeRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AccountService_ClearMyData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ClearMyDataRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AccountServiceServer).ClearMyData(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AccountService_ClearMyData_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountServiceServer).ClearMyData(ctx, req.(*ClearMyDataRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// AccountService_ServiceDesc is the grpc.ServiceDesc for AccountService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var AccountService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "stream.app.v1.AccountService",
|
||||
HandlerType: (*AccountServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetMe",
|
||||
Handler: _AccountService_GetMe_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateMe",
|
||||
Handler: _AccountService_UpdateMe_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteMe",
|
||||
Handler: _AccountService_DeleteMe_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ClearMyData",
|
||||
Handler: _AccountService_ClearMyData_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "app/v1/account.proto",
|
||||
}
|
||||
|
||||
const (
|
||||
PreferencesService_GetPreferences_FullMethodName = "/stream.app.v1.PreferencesService/GetPreferences"
|
||||
PreferencesService_UpdatePreferences_FullMethodName = "/stream.app.v1.PreferencesService/UpdatePreferences"
|
||||
)
|
||||
|
||||
// PreferencesServiceClient is the client API for PreferencesService 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 PreferencesServiceClient interface {
|
||||
GetPreferences(ctx context.Context, in *GetPreferencesRequest, opts ...grpc.CallOption) (*GetPreferencesResponse, error)
|
||||
UpdatePreferences(ctx context.Context, in *UpdatePreferencesRequest, opts ...grpc.CallOption) (*UpdatePreferencesResponse, error)
|
||||
}
|
||||
|
||||
type preferencesServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewPreferencesServiceClient(cc grpc.ClientConnInterface) PreferencesServiceClient {
|
||||
return &preferencesServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *preferencesServiceClient) GetPreferences(ctx context.Context, in *GetPreferencesRequest, opts ...grpc.CallOption) (*GetPreferencesResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetPreferencesResponse)
|
||||
err := c.cc.Invoke(ctx, PreferencesService_GetPreferences_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *preferencesServiceClient) UpdatePreferences(ctx context.Context, in *UpdatePreferencesRequest, opts ...grpc.CallOption) (*UpdatePreferencesResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(UpdatePreferencesResponse)
|
||||
err := c.cc.Invoke(ctx, PreferencesService_UpdatePreferences_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// PreferencesServiceServer is the server API for PreferencesService service.
|
||||
// All implementations must embed UnimplementedPreferencesServiceServer
|
||||
// for forward compatibility.
|
||||
type PreferencesServiceServer interface {
|
||||
GetPreferences(context.Context, *GetPreferencesRequest) (*GetPreferencesResponse, error)
|
||||
UpdatePreferences(context.Context, *UpdatePreferencesRequest) (*UpdatePreferencesResponse, error)
|
||||
mustEmbedUnimplementedPreferencesServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedPreferencesServiceServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedPreferencesServiceServer struct{}
|
||||
|
||||
func (UnimplementedPreferencesServiceServer) GetPreferences(context.Context, *GetPreferencesRequest) (*GetPreferencesResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetPreferences not implemented")
|
||||
}
|
||||
func (UnimplementedPreferencesServiceServer) UpdatePreferences(context.Context, *UpdatePreferencesRequest) (*UpdatePreferencesResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method UpdatePreferences not implemented")
|
||||
}
|
||||
func (UnimplementedPreferencesServiceServer) mustEmbedUnimplementedPreferencesServiceServer() {}
|
||||
func (UnimplementedPreferencesServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafePreferencesServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to PreferencesServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafePreferencesServiceServer interface {
|
||||
mustEmbedUnimplementedPreferencesServiceServer()
|
||||
}
|
||||
|
||||
func RegisterPreferencesServiceServer(s grpc.ServiceRegistrar, srv PreferencesServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedPreferencesServiceServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&PreferencesService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _PreferencesService_GetPreferences_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetPreferencesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PreferencesServiceServer).GetPreferences(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: PreferencesService_GetPreferences_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PreferencesServiceServer).GetPreferences(ctx, req.(*GetPreferencesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _PreferencesService_UpdatePreferences_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdatePreferencesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PreferencesServiceServer).UpdatePreferences(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: PreferencesService_UpdatePreferences_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PreferencesServiceServer).UpdatePreferences(ctx, req.(*UpdatePreferencesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// PreferencesService_ServiceDesc is the grpc.ServiceDesc for PreferencesService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var PreferencesService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "stream.app.v1.PreferencesService",
|
||||
HandlerType: (*PreferencesServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetPreferences",
|
||||
Handler: _PreferencesService_GetPreferences_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdatePreferences",
|
||||
Handler: _PreferencesService_UpdatePreferences_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "app/v1/account.proto",
|
||||
}
|
||||
|
||||
const (
|
||||
UsageService_GetUsage_FullMethodName = "/stream.app.v1.UsageService/GetUsage"
|
||||
)
|
||||
|
||||
// UsageServiceClient is the client API for UsageService 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 UsageServiceClient interface {
|
||||
GetUsage(ctx context.Context, in *GetUsageRequest, opts ...grpc.CallOption) (*GetUsageResponse, error)
|
||||
}
|
||||
|
||||
type usageServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewUsageServiceClient(cc grpc.ClientConnInterface) UsageServiceClient {
|
||||
return &usageServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *usageServiceClient) GetUsage(ctx context.Context, in *GetUsageRequest, opts ...grpc.CallOption) (*GetUsageResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetUsageResponse)
|
||||
err := c.cc.Invoke(ctx, UsageService_GetUsage_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// UsageServiceServer is the server API for UsageService service.
|
||||
// All implementations must embed UnimplementedUsageServiceServer
|
||||
// for forward compatibility.
|
||||
type UsageServiceServer interface {
|
||||
GetUsage(context.Context, *GetUsageRequest) (*GetUsageResponse, error)
|
||||
mustEmbedUnimplementedUsageServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedUsageServiceServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedUsageServiceServer struct{}
|
||||
|
||||
func (UnimplementedUsageServiceServer) GetUsage(context.Context, *GetUsageRequest) (*GetUsageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetUsage not implemented")
|
||||
}
|
||||
func (UnimplementedUsageServiceServer) mustEmbedUnimplementedUsageServiceServer() {}
|
||||
func (UnimplementedUsageServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeUsageServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to UsageServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeUsageServiceServer interface {
|
||||
mustEmbedUnimplementedUsageServiceServer()
|
||||
}
|
||||
|
||||
func RegisterUsageServiceServer(s grpc.ServiceRegistrar, srv UsageServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedUsageServiceServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&UsageService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _UsageService_GetUsage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetUsageRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UsageServiceServer).GetUsage(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: UsageService_GetUsage_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UsageServiceServer).GetUsage(ctx, req.(*GetUsageRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// UsageService_ServiceDesc is the grpc.ServiceDesc for UsageService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var UsageService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "stream.app.v1.UsageService",
|
||||
HandlerType: (*UsageServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetUsage",
|
||||
Handler: _UsageService_GetUsage_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "app/v1/account.proto",
|
||||
}
|
||||
|
||||
const (
|
||||
NotificationsService_ListNotifications_FullMethodName = "/stream.app.v1.NotificationsService/ListNotifications"
|
||||
NotificationsService_MarkNotificationRead_FullMethodName = "/stream.app.v1.NotificationsService/MarkNotificationRead"
|
||||
NotificationsService_MarkAllNotificationsRead_FullMethodName = "/stream.app.v1.NotificationsService/MarkAllNotificationsRead"
|
||||
NotificationsService_DeleteNotification_FullMethodName = "/stream.app.v1.NotificationsService/DeleteNotification"
|
||||
NotificationsService_ClearNotifications_FullMethodName = "/stream.app.v1.NotificationsService/ClearNotifications"
|
||||
)
|
||||
|
||||
// NotificationsServiceClient is the client API for NotificationsService 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 NotificationsServiceClient interface {
|
||||
ListNotifications(ctx context.Context, in *ListNotificationsRequest, opts ...grpc.CallOption) (*ListNotificationsResponse, error)
|
||||
MarkNotificationRead(ctx context.Context, in *MarkNotificationReadRequest, opts ...grpc.CallOption) (*MessageResponse, error)
|
||||
MarkAllNotificationsRead(ctx context.Context, in *MarkAllNotificationsReadRequest, opts ...grpc.CallOption) (*MessageResponse, error)
|
||||
DeleteNotification(ctx context.Context, in *DeleteNotificationRequest, opts ...grpc.CallOption) (*MessageResponse, error)
|
||||
ClearNotifications(ctx context.Context, in *ClearNotificationsRequest, opts ...grpc.CallOption) (*MessageResponse, error)
|
||||
}
|
||||
|
||||
type notificationsServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewNotificationsServiceClient(cc grpc.ClientConnInterface) NotificationsServiceClient {
|
||||
return ¬ificationsServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *notificationsServiceClient) ListNotifications(ctx context.Context, in *ListNotificationsRequest, opts ...grpc.CallOption) (*ListNotificationsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListNotificationsResponse)
|
||||
err := c.cc.Invoke(ctx, NotificationsService_ListNotifications_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *notificationsServiceClient) MarkNotificationRead(ctx context.Context, in *MarkNotificationReadRequest, opts ...grpc.CallOption) (*MessageResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MessageResponse)
|
||||
err := c.cc.Invoke(ctx, NotificationsService_MarkNotificationRead_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *notificationsServiceClient) MarkAllNotificationsRead(ctx context.Context, in *MarkAllNotificationsReadRequest, opts ...grpc.CallOption) (*MessageResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MessageResponse)
|
||||
err := c.cc.Invoke(ctx, NotificationsService_MarkAllNotificationsRead_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *notificationsServiceClient) DeleteNotification(ctx context.Context, in *DeleteNotificationRequest, opts ...grpc.CallOption) (*MessageResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MessageResponse)
|
||||
err := c.cc.Invoke(ctx, NotificationsService_DeleteNotification_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *notificationsServiceClient) ClearNotifications(ctx context.Context, in *ClearNotificationsRequest, opts ...grpc.CallOption) (*MessageResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MessageResponse)
|
||||
err := c.cc.Invoke(ctx, NotificationsService_ClearNotifications_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// NotificationsServiceServer is the server API for NotificationsService service.
|
||||
// All implementations must embed UnimplementedNotificationsServiceServer
|
||||
// for forward compatibility.
|
||||
type NotificationsServiceServer interface {
|
||||
ListNotifications(context.Context, *ListNotificationsRequest) (*ListNotificationsResponse, error)
|
||||
MarkNotificationRead(context.Context, *MarkNotificationReadRequest) (*MessageResponse, error)
|
||||
MarkAllNotificationsRead(context.Context, *MarkAllNotificationsReadRequest) (*MessageResponse, error)
|
||||
DeleteNotification(context.Context, *DeleteNotificationRequest) (*MessageResponse, error)
|
||||
ClearNotifications(context.Context, *ClearNotificationsRequest) (*MessageResponse, error)
|
||||
mustEmbedUnimplementedNotificationsServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedNotificationsServiceServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedNotificationsServiceServer struct{}
|
||||
|
||||
func (UnimplementedNotificationsServiceServer) ListNotifications(context.Context, *ListNotificationsRequest) (*ListNotificationsResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ListNotifications not implemented")
|
||||
}
|
||||
func (UnimplementedNotificationsServiceServer) MarkNotificationRead(context.Context, *MarkNotificationReadRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method MarkNotificationRead not implemented")
|
||||
}
|
||||
func (UnimplementedNotificationsServiceServer) MarkAllNotificationsRead(context.Context, *MarkAllNotificationsReadRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method MarkAllNotificationsRead not implemented")
|
||||
}
|
||||
func (UnimplementedNotificationsServiceServer) DeleteNotification(context.Context, *DeleteNotificationRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DeleteNotification not implemented")
|
||||
}
|
||||
func (UnimplementedNotificationsServiceServer) ClearNotifications(context.Context, *ClearNotificationsRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ClearNotifications not implemented")
|
||||
}
|
||||
func (UnimplementedNotificationsServiceServer) mustEmbedUnimplementedNotificationsServiceServer() {}
|
||||
func (UnimplementedNotificationsServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeNotificationsServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to NotificationsServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeNotificationsServiceServer interface {
|
||||
mustEmbedUnimplementedNotificationsServiceServer()
|
||||
}
|
||||
|
||||
func RegisterNotificationsServiceServer(s grpc.ServiceRegistrar, srv NotificationsServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedNotificationsServiceServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&NotificationsService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _NotificationsService_ListNotifications_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListNotificationsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NotificationsServiceServer).ListNotifications(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: NotificationsService_ListNotifications_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NotificationsServiceServer).ListNotifications(ctx, req.(*ListNotificationsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _NotificationsService_MarkNotificationRead_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MarkNotificationReadRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NotificationsServiceServer).MarkNotificationRead(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: NotificationsService_MarkNotificationRead_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NotificationsServiceServer).MarkNotificationRead(ctx, req.(*MarkNotificationReadRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _NotificationsService_MarkAllNotificationsRead_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MarkAllNotificationsReadRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NotificationsServiceServer).MarkAllNotificationsRead(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: NotificationsService_MarkAllNotificationsRead_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NotificationsServiceServer).MarkAllNotificationsRead(ctx, req.(*MarkAllNotificationsReadRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _NotificationsService_DeleteNotification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteNotificationRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NotificationsServiceServer).DeleteNotification(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: NotificationsService_DeleteNotification_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NotificationsServiceServer).DeleteNotification(ctx, req.(*DeleteNotificationRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _NotificationsService_ClearNotifications_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ClearNotificationsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NotificationsServiceServer).ClearNotifications(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: NotificationsService_ClearNotifications_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NotificationsServiceServer).ClearNotifications(ctx, req.(*ClearNotificationsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// NotificationsService_ServiceDesc is the grpc.ServiceDesc for NotificationsService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var NotificationsService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "stream.app.v1.NotificationsService",
|
||||
HandlerType: (*NotificationsServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "ListNotifications",
|
||||
Handler: _NotificationsService_ListNotifications_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "MarkNotificationRead",
|
||||
Handler: _NotificationsService_MarkNotificationRead_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "MarkAllNotificationsRead",
|
||||
Handler: _NotificationsService_MarkAllNotificationsRead_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteNotification",
|
||||
Handler: _NotificationsService_DeleteNotification_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ClearNotifications",
|
||||
Handler: _NotificationsService_ClearNotifications_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "app/v1/account.proto",
|
||||
}
|
||||
Reference in New Issue
Block a user