// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 // - protoc v3.21.11 // source: account/v1/account.proto package v1 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 ( Account_UserRegister_FullMethodName = "/account.v1.Account/UserRegister" Account_UserLogin_FullMethodName = "/account.v1.Account/UserLogin" Account_UserInfo_FullMethodName = "/account.v1.Account/UserInfo" ) // AccountClient is the client API for Account 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 AccountClient interface { UserRegister(ctx context.Context, in *UserRegisterReq, opts ...grpc.CallOption) (*UserRegisterRes, error) UserLogin(ctx context.Context, in *UserLoginReq, opts ...grpc.CallOption) (*UserLoginRes, error) UserInfo(ctx context.Context, in *UserInfoReq, opts ...grpc.CallOption) (*UserInfoRes, error) } type accountClient struct { cc grpc.ClientConnInterface } func NewAccountClient(cc grpc.ClientConnInterface) AccountClient { return &accountClient{cc} } func (c *accountClient) UserRegister(ctx context.Context, in *UserRegisterReq, opts ...grpc.CallOption) (*UserRegisterRes, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UserRegisterRes) err := c.cc.Invoke(ctx, Account_UserRegister_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *accountClient) UserLogin(ctx context.Context, in *UserLoginReq, opts ...grpc.CallOption) (*UserLoginRes, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UserLoginRes) err := c.cc.Invoke(ctx, Account_UserLogin_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *accountClient) UserInfo(ctx context.Context, in *UserInfoReq, opts ...grpc.CallOption) (*UserInfoRes, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UserInfoRes) err := c.cc.Invoke(ctx, Account_UserInfo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // AccountServer is the server API for Account service. // All implementations must embed UnimplementedAccountServer // for forward compatibility. type AccountServer interface { UserRegister(context.Context, *UserRegisterReq) (*UserRegisterRes, error) UserLogin(context.Context, *UserLoginReq) (*UserLoginRes, error) UserInfo(context.Context, *UserInfoReq) (*UserInfoRes, error) mustEmbedUnimplementedAccountServer() } // UnimplementedAccountServer 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 UnimplementedAccountServer struct{} func (UnimplementedAccountServer) UserRegister(context.Context, *UserRegisterReq) (*UserRegisterRes, error) { return nil, status.Errorf(codes.Unimplemented, "method UserRegister not implemented") } func (UnimplementedAccountServer) UserLogin(context.Context, *UserLoginReq) (*UserLoginRes, error) { return nil, status.Errorf(codes.Unimplemented, "method UserLogin not implemented") } func (UnimplementedAccountServer) UserInfo(context.Context, *UserInfoReq) (*UserInfoRes, error) { return nil, status.Errorf(codes.Unimplemented, "method UserInfo not implemented") } func (UnimplementedAccountServer) mustEmbedUnimplementedAccountServer() {} func (UnimplementedAccountServer) testEmbeddedByValue() {} // UnsafeAccountServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AccountServer will // result in compilation errors. type UnsafeAccountServer interface { mustEmbedUnimplementedAccountServer() } func RegisterAccountServer(s grpc.ServiceRegistrar, srv AccountServer) { // If the following call pancis, it indicates UnimplementedAccountServer 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(&Account_ServiceDesc, srv) } func _Account_UserRegister_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UserRegisterReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AccountServer).UserRegister(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Account_UserRegister_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AccountServer).UserRegister(ctx, req.(*UserRegisterReq)) } return interceptor(ctx, in, info, handler) } func _Account_UserLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UserLoginReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AccountServer).UserLogin(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Account_UserLogin_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AccountServer).UserLogin(ctx, req.(*UserLoginReq)) } return interceptor(ctx, in, info, handler) } func _Account_UserInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UserInfoReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AccountServer).UserInfo(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Account_UserInfo_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AccountServer).UserInfo(ctx, req.(*UserInfoReq)) } return interceptor(ctx, in, info, handler) } // Account_ServiceDesc is the grpc.ServiceDesc for Account service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Account_ServiceDesc = grpc.ServiceDesc{ ServiceName: "account.v1.Account", HandlerType: (*AccountServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "UserRegister", Handler: _Account_UserRegister_Handler, }, { MethodName: "UserLogin", Handler: _Account_UserLogin_Handler, }, { MethodName: "UserInfo", Handler: _Account_UserInfo_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "account/v1/account.proto", }