Documentation ¶
Index ¶
- Variables
- func RegisterCarServiceHTTPServer(s *http.Server, srv CarServiceHTTPServer)
- func RegisterCarServiceServer(s grpc.ServiceRegistrar, srv CarServiceServer)
- func RegisterDeptServiceHTTPServer(s *http.Server, srv DeptServiceHTTPServer)
- func RegisterDeptServiceServer(s grpc.ServiceRegistrar, srv DeptServiceServer)
- func RegisterUserServiceHTTPServer(s *http.Server, srv UserServiceHTTPServer)
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type Car
- type CarId
- type CarIdAndUserId
- func (*CarIdAndUserId) Descriptor() ([]byte, []int)deprecated
- func (x *CarIdAndUserId) GetCarId() string
- func (x *CarIdAndUserId) GetUserId() string
- func (*CarIdAndUserId) ProtoMessage()
- func (x *CarIdAndUserId) ProtoReflect() protoreflect.Message
- func (x *CarIdAndUserId) Reset()
- func (x *CarIdAndUserId) String() string
- type CarPageQuery
- func (*CarPageQuery) Descriptor() ([]byte, []int)deprecated
- func (x *CarPageQuery) GetCarId() string
- func (x *CarPageQuery) GetPageDataCount() *wrapperspb.BoolValue
- func (x *CarPageQuery) GetPageIndex() int32
- func (x *CarPageQuery) GetPageSize() int32
- func (x *CarPageQuery) GetUserId() *wrapperspb.StringValue
- func (*CarPageQuery) ProtoMessage()
- func (x *CarPageQuery) ProtoReflect() protoreflect.Message
- func (x *CarPageQuery) Reset()
- func (x *CarPageQuery) String() string
- type CarServiceClient
- type CarServiceHTTPClient
- type CarServiceHTTPClientImpl
- func (c *CarServiceHTTPClientImpl) Count(ctx context.Context, in *Car, opts ...http.CallOption) (*CountNumber, error)
- func (c *CarServiceHTTPClientImpl) Create(ctx context.Context, in *Car, opts ...http.CallOption) (*CarId, error)
- func (c *CarServiceHTTPClientImpl) Delete(ctx context.Context, in *CarId, opts ...http.CallOption) (*emptypb.Empty, error)
- func (c *CarServiceHTTPClientImpl) Find(ctx context.Context, in *CarPageQuery, opts ...http.CallOption) (*CarWithCount, error)
- func (c *CarServiceHTTPClientImpl) FindById(ctx context.Context, in *CarId, opts ...http.CallOption) (*Car, error)
- func (c *CarServiceHTTPClientImpl) Update(ctx context.Context, in *Car, opts ...http.CallOption) (*emptypb.Empty, error)
- type CarServiceHTTPServer
- type CarServiceServer
- type CarWithCount
- func (*CarWithCount) Descriptor() ([]byte, []int)deprecated
- func (x *CarWithCount) GetCars() []*Car
- func (x *CarWithCount) GetDataCount() *wrapperspb.Int32Value
- func (*CarWithCount) ProtoMessage()
- func (x *CarWithCount) ProtoReflect() protoreflect.Message
- func (x *CarWithCount) Reset()
- func (x *CarWithCount) String() string
- type Cars
- type CountNumber
- type Dept
- type DeptAddUserReq
- func (*DeptAddUserReq) Descriptor() ([]byte, []int)deprecated
- func (x *DeptAddUserReq) GetDeptId() string
- func (x *DeptAddUserReq) GetPhone() *wrapperspb.StringValue
- func (x *DeptAddUserReq) GetRace() DeptAddUserReq_Race
- func (x *DeptAddUserReq) GetUserId() string
- func (*DeptAddUserReq) ProtoMessage()
- func (x *DeptAddUserReq) ProtoReflect() protoreflect.Message
- func (x *DeptAddUserReq) Reset()
- func (x *DeptAddUserReq) String() string
- type DeptAddUserReq_Race
- func (DeptAddUserReq_Race) Descriptor() protoreflect.EnumDescriptor
- func (x DeptAddUserReq_Race) Enum() *DeptAddUserReq_Race
- func (DeptAddUserReq_Race) EnumDescriptor() ([]byte, []int)deprecated
- func (x DeptAddUserReq_Race) Number() protoreflect.EnumNumber
- func (x DeptAddUserReq_Race) String() string
- func (DeptAddUserReq_Race) Type() protoreflect.EnumType
- type DeptFindUsersReq
- func (*DeptFindUsersReq) Descriptor() ([]byte, []int)deprecated
- func (x *DeptFindUsersReq) GetDeptId() string
- func (x *DeptFindUsersReq) GetPageIndex() int32
- func (x *DeptFindUsersReq) GetPageSize() int32
- func (x *DeptFindUsersReq) GetPhone() *wrapperspb.StringValue
- func (x *DeptFindUsersReq) GetUserId() string
- func (*DeptFindUsersReq) ProtoMessage()
- func (x *DeptFindUsersReq) ProtoReflect() protoreflect.Message
- func (x *DeptFindUsersReq) Reset()
- func (x *DeptFindUsersReq) String() string
- type DeptFindUsersRes
- func (*DeptFindUsersRes) Descriptor() ([]byte, []int)deprecated
- func (x *DeptFindUsersRes) GetDataCount() int32
- func (x *DeptFindUsersRes) GetUsers() []*User
- func (*DeptFindUsersRes) ProtoMessage()
- func (x *DeptFindUsersRes) ProtoReflect() protoreflect.Message
- func (x *DeptFindUsersRes) Reset()
- func (x *DeptFindUsersRes) String() string
- type DeptId
- type DeptIdAndUserId
- func (*DeptIdAndUserId) Descriptor() ([]byte, []int)deprecated
- func (x *DeptIdAndUserId) GetDeptId() string
- func (x *DeptIdAndUserId) GetUserId() string
- func (*DeptIdAndUserId) ProtoMessage()
- func (x *DeptIdAndUserId) ProtoReflect() protoreflect.Message
- func (x *DeptIdAndUserId) Reset()
- func (x *DeptIdAndUserId) String() string
- type DeptPageQuery
- func (*DeptPageQuery) Descriptor() ([]byte, []int)deprecated
- func (x *DeptPageQuery) GetDeptId() string
- func (x *DeptPageQuery) GetPageDataCount() *wrapperspb.BoolValue
- func (x *DeptPageQuery) GetPageIndex() int32
- func (x *DeptPageQuery) GetPageSize() int32
- func (*DeptPageQuery) ProtoMessage()
- func (x *DeptPageQuery) ProtoReflect() protoreflect.Message
- func (x *DeptPageQuery) Reset()
- func (x *DeptPageQuery) String() string
- type DeptRemoveUserReq
- func (*DeptRemoveUserReq) Descriptor() ([]byte, []int)deprecated
- func (x *DeptRemoveUserReq) GetDeptId() string
- func (x *DeptRemoveUserReq) GetPageIndex() int32
- func (x *DeptRemoveUserReq) GetPageSize() int32
- func (x *DeptRemoveUserReq) GetPhone() *wrapperspb.StringValue
- func (x *DeptRemoveUserReq) GetUserId() string
- func (*DeptRemoveUserReq) ProtoMessage()
- func (x *DeptRemoveUserReq) ProtoReflect() protoreflect.Message
- func (x *DeptRemoveUserReq) Reset()
- func (x *DeptRemoveUserReq) String() string
- type DeptServiceClient
- type DeptServiceHTTPClient
- type DeptServiceHTTPClientImpl
- func (c *DeptServiceHTTPClientImpl) AddUser(ctx context.Context, in *DeptAddUserReq, opts ...http.CallOption) (*UserId, error)
- func (c *DeptServiceHTTPClientImpl) AddUserById(ctx context.Context, in *DeptIdAndUserId, opts ...http.CallOption) (*emptypb.Empty, error)
- func (c *DeptServiceHTTPClientImpl) Count(ctx context.Context, in *Dept, opts ...http.CallOption) (*CountNumber, error)
- func (c *DeptServiceHTTPClientImpl) Create(ctx context.Context, in *Dept, opts ...http.CallOption) (*DeptId, error)
- func (c *DeptServiceHTTPClientImpl) Delete(ctx context.Context, in *DeptId, opts ...http.CallOption) (*emptypb.Empty, error)
- func (c *DeptServiceHTTPClientImpl) Find(ctx context.Context, in *DeptPageQuery, opts ...http.CallOption) (*DeptWithCount, error)
- func (c *DeptServiceHTTPClientImpl) FindById(ctx context.Context, in *DeptId, opts ...http.CallOption) (*Dept, error)
- func (c *DeptServiceHTTPClientImpl) FindUsers(ctx context.Context, in *DeptFindUsersReq, opts ...http.CallOption) (*DeptFindUsersRes, error)
- func (c *DeptServiceHTTPClientImpl) RemoveUser(ctx context.Context, in *DeptRemoveUserReq, opts ...http.CallOption) (*emptypb.Empty, error)
- func (c *DeptServiceHTTPClientImpl) Update(ctx context.Context, in *Dept, opts ...http.CallOption) (*emptypb.Empty, error)
- type DeptServiceHTTPServer
- type DeptServiceServer
- type DeptWithCount
- func (*DeptWithCount) Descriptor() ([]byte, []int)deprecated
- func (x *DeptWithCount) GetDataCount() *wrapperspb.Int32Value
- func (x *DeptWithCount) GetDepts() []*Dept
- func (*DeptWithCount) ProtoMessage()
- func (x *DeptWithCount) ProtoReflect() protoreflect.Message
- func (x *DeptWithCount) Reset()
- func (x *DeptWithCount) String() string
- type Depts
- type UnimplementedCarServiceServer
- func (UnimplementedCarServiceServer) Count(context.Context, *Car) (*CountNumber, error)
- func (UnimplementedCarServiceServer) Create(context.Context, *Car) (*CarId, error)
- func (UnimplementedCarServiceServer) Delete(context.Context, *CarId) (*emptypb.Empty, error)
- func (UnimplementedCarServiceServer) Find(context.Context, *CarPageQuery) (*CarWithCount, error)
- func (UnimplementedCarServiceServer) FindById(context.Context, *CarId) (*Car, error)
- func (UnimplementedCarServiceServer) Update(context.Context, *Car) (*emptypb.Empty, error)
- type UnimplementedDeptServiceServer
- func (UnimplementedDeptServiceServer) AddUser(context.Context, *DeptAddUserReq) (*UserId, error)
- func (UnimplementedDeptServiceServer) AddUserById(context.Context, *DeptIdAndUserId) (*emptypb.Empty, error)
- func (UnimplementedDeptServiceServer) Count(context.Context, *Dept) (*CountNumber, error)
- func (UnimplementedDeptServiceServer) Create(context.Context, *Dept) (*DeptId, error)
- func (UnimplementedDeptServiceServer) Delete(context.Context, *DeptId) (*emptypb.Empty, error)
- func (UnimplementedDeptServiceServer) Find(context.Context, *DeptPageQuery) (*DeptWithCount, error)
- func (UnimplementedDeptServiceServer) FindById(context.Context, *DeptId) (*Dept, error)
- func (UnimplementedDeptServiceServer) FindUsers(context.Context, *DeptFindUsersReq) (*DeptFindUsersRes, error)
- func (UnimplementedDeptServiceServer) RemoveUser(context.Context, *DeptRemoveUserReq) (*emptypb.Empty, error)
- func (UnimplementedDeptServiceServer) Update(context.Context, *Dept) (*emptypb.Empty, error)
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) AddCar(context.Context, *Car) (*CarId, error)
- func (UnimplementedUserServiceServer) AddCarById(context.Context, *UserIdAndCarId) (*emptypb.Empty, error)
- func (UnimplementedUserServiceServer) Count(context.Context, *User) (*CountNumber, error)
- func (UnimplementedUserServiceServer) Create(context.Context, *User) (*UserId, error)
- func (UnimplementedUserServiceServer) Delete(context.Context, *UserId) (*emptypb.Empty, error)
- func (UnimplementedUserServiceServer) Find(context.Context, *UserPageQuery) (*UserWithCount, error)
- func (UnimplementedUserServiceServer) FindById(context.Context, *UserId) (*User, error)
- func (UnimplementedUserServiceServer) FindCars(context.Context, *UserFindCarsReq) (*UserFindCarsRes, error)
- func (UnimplementedUserServiceServer) FindDepts(context.Context, *UserFindDeptsReq) (*UserFindDeptsRes, error)
- func (UnimplementedUserServiceServer) RemoveCar(context.Context, *UserRemoveCarReq) (*emptypb.Empty, error)
- func (UnimplementedUserServiceServer) Update(context.Context, *User) (*emptypb.Empty, error)
- type UnsafeCarServiceServer
- type UnsafeDeptServiceServer
- type UnsafeUserServiceServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetPhone() *wrapperspb.StringValue
- func (x *User) GetRace() User_Race
- func (x *User) GetUserId() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserAddDeptReq
- func (*UserAddDeptReq) Descriptor() ([]byte, []int)deprecated
- func (x *UserAddDeptReq) GetDeptId() string
- func (x *UserAddDeptReq) GetUserId() string
- func (*UserAddDeptReq) ProtoMessage()
- func (x *UserAddDeptReq) ProtoReflect() protoreflect.Message
- func (x *UserAddDeptReq) Reset()
- func (x *UserAddDeptReq) String() string
- type UserFindCarsReq
- func (*UserFindCarsReq) Descriptor() ([]byte, []int)deprecated
- func (x *UserFindCarsReq) GetCarId() string
- func (x *UserFindCarsReq) GetPageIndex() int32
- func (x *UserFindCarsReq) GetPageSize() int32
- func (x *UserFindCarsReq) GetUserId() string
- func (*UserFindCarsReq) ProtoMessage()
- func (x *UserFindCarsReq) ProtoReflect() protoreflect.Message
- func (x *UserFindCarsReq) Reset()
- func (x *UserFindCarsReq) String() string
- type UserFindCarsRes
- func (*UserFindCarsRes) Descriptor() ([]byte, []int)deprecated
- func (x *UserFindCarsRes) GetCars() []*Car
- func (x *UserFindCarsRes) GetDataCount() int32
- func (*UserFindCarsRes) ProtoMessage()
- func (x *UserFindCarsRes) ProtoReflect() protoreflect.Message
- func (x *UserFindCarsRes) Reset()
- func (x *UserFindCarsRes) String() string
- type UserFindDeptsReq
- func (*UserFindDeptsReq) Descriptor() ([]byte, []int)deprecated
- func (x *UserFindDeptsReq) GetDeptId() string
- func (x *UserFindDeptsReq) GetPageIndex() int32
- func (x *UserFindDeptsReq) GetPageSize() int32
- func (x *UserFindDeptsReq) GetUserId() string
- func (*UserFindDeptsReq) ProtoMessage()
- func (x *UserFindDeptsReq) ProtoReflect() protoreflect.Message
- func (x *UserFindDeptsReq) Reset()
- func (x *UserFindDeptsReq) String() string
- type UserFindDeptsRes
- func (*UserFindDeptsRes) Descriptor() ([]byte, []int)deprecated
- func (x *UserFindDeptsRes) GetDataCount() int32
- func (x *UserFindDeptsRes) GetDepts() []*Dept
- func (*UserFindDeptsRes) ProtoMessage()
- func (x *UserFindDeptsRes) ProtoReflect() protoreflect.Message
- func (x *UserFindDeptsRes) Reset()
- func (x *UserFindDeptsRes) String() string
- type UserId
- type UserIdAndCarId
- func (*UserIdAndCarId) Descriptor() ([]byte, []int)deprecated
- func (x *UserIdAndCarId) GetCarId() string
- func (x *UserIdAndCarId) GetUserId() string
- func (*UserIdAndCarId) ProtoMessage()
- func (x *UserIdAndCarId) ProtoReflect() protoreflect.Message
- func (x *UserIdAndCarId) Reset()
- func (x *UserIdAndCarId) String() string
- type UserIdAndDeptId
- func (*UserIdAndDeptId) Descriptor() ([]byte, []int)deprecated
- func (x *UserIdAndDeptId) GetDeptId() string
- func (x *UserIdAndDeptId) GetUserId() string
- func (*UserIdAndDeptId) ProtoMessage()
- func (x *UserIdAndDeptId) ProtoReflect() protoreflect.Message
- func (x *UserIdAndDeptId) Reset()
- func (x *UserIdAndDeptId) String() string
- type UserPageQuery
- func (*UserPageQuery) Descriptor() ([]byte, []int)deprecated
- func (x *UserPageQuery) GetPageDataCount() *wrapperspb.BoolValue
- func (x *UserPageQuery) GetPageIndex() int32
- func (x *UserPageQuery) GetPageSize() int32
- func (x *UserPageQuery) GetPhone() *wrapperspb.StringValue
- func (x *UserPageQuery) GetRace() UserPageQuery_Race
- func (x *UserPageQuery) GetUserId() string
- func (*UserPageQuery) ProtoMessage()
- func (x *UserPageQuery) ProtoReflect() protoreflect.Message
- func (x *UserPageQuery) Reset()
- func (x *UserPageQuery) String() string
- type UserPageQuery_Race
- func (UserPageQuery_Race) Descriptor() protoreflect.EnumDescriptor
- func (x UserPageQuery_Race) Enum() *UserPageQuery_Race
- func (UserPageQuery_Race) EnumDescriptor() ([]byte, []int)deprecated
- func (x UserPageQuery_Race) Number() protoreflect.EnumNumber
- func (x UserPageQuery_Race) String() string
- func (UserPageQuery_Race) Type() protoreflect.EnumType
- type UserRemoveCarReq
- func (*UserRemoveCarReq) Descriptor() ([]byte, []int)deprecated
- func (x *UserRemoveCarReq) GetCarId() string
- func (x *UserRemoveCarReq) GetPageIndex() int32
- func (x *UserRemoveCarReq) GetPageSize() int32
- func (x *UserRemoveCarReq) GetUserId() string
- func (*UserRemoveCarReq) ProtoMessage()
- func (x *UserRemoveCarReq) ProtoReflect() protoreflect.Message
- func (x *UserRemoveCarReq) Reset()
- func (x *UserRemoveCarReq) String() string
- type UserServiceClient
- type UserServiceHTTPClient
- type UserServiceHTTPClientImpl
- func (c *UserServiceHTTPClientImpl) AddCar(ctx context.Context, in *Car, opts ...http.CallOption) (*CarId, error)
- func (c *UserServiceHTTPClientImpl) AddCarById(ctx context.Context, in *UserIdAndCarId, opts ...http.CallOption) (*emptypb.Empty, error)
- func (c *UserServiceHTTPClientImpl) Count(ctx context.Context, in *User, opts ...http.CallOption) (*CountNumber, error)
- func (c *UserServiceHTTPClientImpl) Create(ctx context.Context, in *User, opts ...http.CallOption) (*UserId, error)
- func (c *UserServiceHTTPClientImpl) Delete(ctx context.Context, in *UserId, opts ...http.CallOption) (*emptypb.Empty, error)
- func (c *UserServiceHTTPClientImpl) Find(ctx context.Context, in *UserPageQuery, opts ...http.CallOption) (*UserWithCount, error)
- func (c *UserServiceHTTPClientImpl) FindById(ctx context.Context, in *UserId, opts ...http.CallOption) (*User, error)
- func (c *UserServiceHTTPClientImpl) FindCars(ctx context.Context, in *UserFindCarsReq, opts ...http.CallOption) (*UserFindCarsRes, error)
- func (c *UserServiceHTTPClientImpl) FindDepts(ctx context.Context, in *UserFindDeptsReq, opts ...http.CallOption) (*UserFindDeptsRes, error)
- func (c *UserServiceHTTPClientImpl) RemoveCar(ctx context.Context, in *UserRemoveCarReq, opts ...http.CallOption) (*emptypb.Empty, error)
- func (c *UserServiceHTTPClientImpl) Update(ctx context.Context, in *User, opts ...http.CallOption) (*emptypb.Empty, error)
- type UserServiceHTTPServer
- type UserServiceServer
- type UserWithCount
- func (*UserWithCount) Descriptor() ([]byte, []int)deprecated
- func (x *UserWithCount) GetDataCount() *wrapperspb.Int32Value
- func (x *UserWithCount) GetUsers() []*User
- func (*UserWithCount) ProtoMessage()
- func (x *UserWithCount) ProtoReflect() protoreflect.Message
- func (x *UserWithCount) Reset()
- func (x *UserWithCount) String() string
- type User_Race
- type Users
Constants ¶
This section is empty.
Variables ¶
var ( User_Race_name = map[int32]string{ 0: "RACE_UNSPECIFIED", 1: "YELLOW", 2: "WHITE", 3: "BLACK", } User_Race_value = map[string]int32{ "RACE_UNSPECIFIED": 0, "YELLOW": 1, "WHITE": 2, "BLACK": 3, } )
Enum value maps for User_Race.
var ( DeptAddUserReq_Race_name = map[int32]string{ 0: "RACE_UNSPECIFIED", 1: "YELLOW", 2: "WHITE", 3: "BLACK", } DeptAddUserReq_Race_value = map[string]int32{ "RACE_UNSPECIFIED": 0, "YELLOW": 1, "WHITE": 2, "BLACK": 3, } )
Enum value maps for DeptAddUserReq_Race.
var ( UserPageQuery_Race_name = map[int32]string{ 0: "RACE_UNSPECIFIED", 1: "YELLOW", 2: "WHITE", 3: "BLACK", } UserPageQuery_Race_value = map[string]int32{ "RACE_UNSPECIFIED": 0, "YELLOW": 1, "WHITE": 2, "BLACK": 3, } )
Enum value maps for UserPageQuery_Race.
var CarService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "contacts.CarService", HandlerType: (*CarServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _CarService_Create_Handler, }, { MethodName: "Update", Handler: _CarService_Update_Handler, }, { MethodName: "Delete", Handler: _CarService_Delete_Handler, }, { MethodName: "FindById", Handler: _CarService_FindById_Handler, }, { MethodName: "Find", Handler: _CarService_Find_Handler, }, { MethodName: "Count", Handler: _CarService_Count_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/v1/contacts/contacts.proto", }
CarService_ServiceDesc is the grpc.ServiceDesc for CarService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var DeptService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "contacts.DeptService", HandlerType: (*DeptServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _DeptService_Create_Handler, }, { MethodName: "Update", Handler: _DeptService_Update_Handler, }, { MethodName: "Delete", Handler: _DeptService_Delete_Handler, }, { MethodName: "FindById", Handler: _DeptService_FindById_Handler, }, { MethodName: "Find", Handler: _DeptService_Find_Handler, }, { MethodName: "Count", Handler: _DeptService_Count_Handler, }, { MethodName: "AddUser", Handler: _DeptService_AddUser_Handler, }, { MethodName: "AddUserById", Handler: _DeptService_AddUserById_Handler, }, { MethodName: "RemoveUser", Handler: _DeptService_RemoveUser_Handler, }, { MethodName: "FindUsers", Handler: _DeptService_FindUsers_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/v1/contacts/contacts.proto", }
DeptService_ServiceDesc is the grpc.ServiceDesc for DeptService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_v1_contacts_contacts_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "contacts.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _UserService_Create_Handler, }, { MethodName: "Update", Handler: _UserService_Update_Handler, }, { MethodName: "Delete", Handler: _UserService_Delete_Handler, }, { MethodName: "FindById", Handler: _UserService_FindById_Handler, }, { MethodName: "Find", Handler: _UserService_Find_Handler, }, { MethodName: "Count", Handler: _UserService_Count_Handler, }, { MethodName: "AddCar", Handler: _UserService_AddCar_Handler, }, { MethodName: "AddCarById", Handler: _UserService_AddCarById_Handler, }, { MethodName: "RemoveCar", Handler: _UserService_RemoveCar_Handler, }, { MethodName: "FindCars", Handler: _UserService_FindCars_Handler, }, { MethodName: "FindDepts", Handler: _UserService_FindDepts_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/v1/contacts/contacts.proto", }
UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterCarServiceHTTPServer ¶
func RegisterCarServiceHTTPServer(s *http.Server, srv CarServiceHTTPServer)
func RegisterCarServiceServer ¶
func RegisterCarServiceServer(s grpc.ServiceRegistrar, srv CarServiceServer)
func RegisterDeptServiceHTTPServer ¶
func RegisterDeptServiceHTTPServer(s *http.Server, srv DeptServiceHTTPServer)
func RegisterDeptServiceServer ¶
func RegisterDeptServiceServer(s grpc.ServiceRegistrar, srv DeptServiceServer)
func RegisterUserServiceHTTPServer ¶
func RegisterUserServiceHTTPServer(s *http.Server, srv UserServiceHTTPServer)
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type Car ¶
type Car struct { CarId string `protobuf:"bytes,1,opt,name=car_id,proto3" json:"car_id,omitempty"` UserId *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=user_id,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*Car) Descriptor
deprecated
func (*Car) GetUserId ¶
func (x *Car) GetUserId() *wrapperspb.StringValue
func (*Car) ProtoMessage ¶
func (*Car) ProtoMessage()
func (*Car) ProtoReflect ¶
func (x *Car) ProtoReflect() protoreflect.Message
type CarId ¶
type CarId struct { CarId string `protobuf:"bytes,1,opt,name=car_id,proto3" json:"car_id,omitempty"` // contains filtered or unexported fields }
func (*CarId) Descriptor
deprecated
func (*CarId) ProtoMessage ¶
func (*CarId) ProtoMessage()
func (*CarId) ProtoReflect ¶
func (x *CarId) ProtoReflect() protoreflect.Message
type CarIdAndUserId ¶
type CarIdAndUserId struct { CarId string `protobuf:"bytes,1,opt,name=car_id,proto3" json:"car_id,omitempty"` UserId string `protobuf:"bytes,2,opt,name=user_id,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*CarIdAndUserId) Descriptor
deprecated
func (*CarIdAndUserId) Descriptor() ([]byte, []int)
Deprecated: Use CarIdAndUserId.ProtoReflect.Descriptor instead.
func (*CarIdAndUserId) GetCarId ¶
func (x *CarIdAndUserId) GetCarId() string
func (*CarIdAndUserId) GetUserId ¶
func (x *CarIdAndUserId) GetUserId() string
func (*CarIdAndUserId) ProtoMessage ¶
func (*CarIdAndUserId) ProtoMessage()
func (*CarIdAndUserId) ProtoReflect ¶
func (x *CarIdAndUserId) ProtoReflect() protoreflect.Message
func (*CarIdAndUserId) Reset ¶
func (x *CarIdAndUserId) Reset()
func (*CarIdAndUserId) String ¶
func (x *CarIdAndUserId) String() string
type CarPageQuery ¶
type CarPageQuery struct { CarId string `protobuf:"bytes,1,opt,name=car_id,proto3" json:"car_id,omitempty"` UserId *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=user_id,proto3" json:"user_id,omitempty"` PageIndex int32 `protobuf:"varint,3,opt,name=page_index,proto3" json:"page_index,omitempty"` PageSize int32 `protobuf:"varint,4,opt,name=page_size,proto3" json:"page_size,omitempty"` PageDataCount *wrapperspb.BoolValue `protobuf:"bytes,5,opt,name=page_data_count,proto3" json:"page_data_count,omitempty"` // contains filtered or unexported fields }
func (*CarPageQuery) Descriptor
deprecated
func (*CarPageQuery) Descriptor() ([]byte, []int)
Deprecated: Use CarPageQuery.ProtoReflect.Descriptor instead.
func (*CarPageQuery) GetCarId ¶
func (x *CarPageQuery) GetCarId() string
func (*CarPageQuery) GetPageDataCount ¶
func (x *CarPageQuery) GetPageDataCount() *wrapperspb.BoolValue
func (*CarPageQuery) GetPageIndex ¶
func (x *CarPageQuery) GetPageIndex() int32
func (*CarPageQuery) GetPageSize ¶
func (x *CarPageQuery) GetPageSize() int32
func (*CarPageQuery) GetUserId ¶
func (x *CarPageQuery) GetUserId() *wrapperspb.StringValue
func (*CarPageQuery) ProtoMessage ¶
func (*CarPageQuery) ProtoMessage()
func (*CarPageQuery) ProtoReflect ¶
func (x *CarPageQuery) ProtoReflect() protoreflect.Message
func (*CarPageQuery) Reset ¶
func (x *CarPageQuery) Reset()
func (*CarPageQuery) String ¶
func (x *CarPageQuery) String() string
type CarServiceClient ¶
type CarServiceClient interface { Create(ctx context.Context, in *Car, opts ...grpc.CallOption) (*CarId, error) Update(ctx context.Context, in *Car, opts ...grpc.CallOption) (*emptypb.Empty, error) Delete(ctx context.Context, in *CarId, opts ...grpc.CallOption) (*emptypb.Empty, error) FindById(ctx context.Context, in *CarId, opts ...grpc.CallOption) (*Car, error) Find(ctx context.Context, in *CarPageQuery, opts ...grpc.CallOption) (*CarWithCount, error) Count(ctx context.Context, in *Car, opts ...grpc.CallOption) (*CountNumber, error) }
CarServiceClient is the client API for CarService 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.
func NewCarServiceClient ¶
func NewCarServiceClient(cc grpc.ClientConnInterface) CarServiceClient
type CarServiceHTTPClient ¶
type CarServiceHTTPClient interface { Count(ctx context.Context, req *Car, opts ...http.CallOption) (rsp *CountNumber, err error) Create(ctx context.Context, req *Car, opts ...http.CallOption) (rsp *CarId, err error) Delete(ctx context.Context, req *CarId, opts ...http.CallOption) (rsp *emptypb.Empty, err error) Find(ctx context.Context, req *CarPageQuery, opts ...http.CallOption) (rsp *CarWithCount, err error) FindById(ctx context.Context, req *CarId, opts ...http.CallOption) (rsp *Car, err error) Update(ctx context.Context, req *Car, opts ...http.CallOption) (rsp *emptypb.Empty, err error) }
func NewCarServiceHTTPClient ¶
func NewCarServiceHTTPClient(client *http.Client) CarServiceHTTPClient
type CarServiceHTTPClientImpl ¶
type CarServiceHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*CarServiceHTTPClientImpl) Count ¶
func (c *CarServiceHTTPClientImpl) Count(ctx context.Context, in *Car, opts ...http.CallOption) (*CountNumber, error)
func (*CarServiceHTTPClientImpl) Create ¶
func (c *CarServiceHTTPClientImpl) Create(ctx context.Context, in *Car, opts ...http.CallOption) (*CarId, error)
func (*CarServiceHTTPClientImpl) Delete ¶
func (c *CarServiceHTTPClientImpl) Delete(ctx context.Context, in *CarId, opts ...http.CallOption) (*emptypb.Empty, error)
func (*CarServiceHTTPClientImpl) Find ¶
func (c *CarServiceHTTPClientImpl) Find(ctx context.Context, in *CarPageQuery, opts ...http.CallOption) (*CarWithCount, error)
func (*CarServiceHTTPClientImpl) FindById ¶
func (c *CarServiceHTTPClientImpl) FindById(ctx context.Context, in *CarId, opts ...http.CallOption) (*Car, error)
type CarServiceHTTPServer ¶
type CarServiceHTTPServer interface { Count(context.Context, *Car) (*CountNumber, error) Create(context.Context, *Car) (*CarId, error) Delete(context.Context, *CarId) (*emptypb.Empty, error) Find(context.Context, *CarPageQuery) (*CarWithCount, error) FindById(context.Context, *CarId) (*Car, error) Update(context.Context, *Car) (*emptypb.Empty, error) }
type CarServiceServer ¶
type CarServiceServer interface { Create(context.Context, *Car) (*CarId, error) Update(context.Context, *Car) (*emptypb.Empty, error) Delete(context.Context, *CarId) (*emptypb.Empty, error) FindById(context.Context, *CarId) (*Car, error) Find(context.Context, *CarPageQuery) (*CarWithCount, error) Count(context.Context, *Car) (*CountNumber, error) // contains filtered or unexported methods }
CarServiceServer is the server API for CarService service. All implementations must embed UnimplementedCarServiceServer for forward compatibility
type CarWithCount ¶
type CarWithCount struct { DataCount *wrapperspb.Int32Value `protobuf:"bytes,1,opt,name=data_count,proto3" json:"data_count,omitempty"` Cars []*Car `protobuf:"bytes,2,rep,name=Cars,proto3" json:"Cars,omitempty"` // contains filtered or unexported fields }
func (*CarWithCount) Descriptor
deprecated
func (*CarWithCount) Descriptor() ([]byte, []int)
Deprecated: Use CarWithCount.ProtoReflect.Descriptor instead.
func (*CarWithCount) GetCars ¶
func (x *CarWithCount) GetCars() []*Car
func (*CarWithCount) GetDataCount ¶
func (x *CarWithCount) GetDataCount() *wrapperspb.Int32Value
func (*CarWithCount) ProtoMessage ¶
func (*CarWithCount) ProtoMessage()
func (*CarWithCount) ProtoReflect ¶
func (x *CarWithCount) ProtoReflect() protoreflect.Message
func (*CarWithCount) Reset ¶
func (x *CarWithCount) Reset()
func (*CarWithCount) String ¶
func (x *CarWithCount) String() string
type Cars ¶
type Cars struct { DataList []*Car `protobuf:"bytes,1,rep,name=data_list,proto3" json:"data_list,omitempty"` // contains filtered or unexported fields }
func (*Cars) Descriptor
deprecated
func (*Cars) GetDataList ¶
func (*Cars) ProtoMessage ¶
func (*Cars) ProtoMessage()
func (*Cars) ProtoReflect ¶
func (x *Cars) ProtoReflect() protoreflect.Message
type CountNumber ¶
type CountNumber struct { Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*CountNumber) Descriptor
deprecated
func (*CountNumber) Descriptor() ([]byte, []int)
Deprecated: Use CountNumber.ProtoReflect.Descriptor instead.
func (*CountNumber) GetValue ¶
func (x *CountNumber) GetValue() int32
func (*CountNumber) ProtoMessage ¶
func (*CountNumber) ProtoMessage()
func (*CountNumber) ProtoReflect ¶
func (x *CountNumber) ProtoReflect() protoreflect.Message
func (*CountNumber) Reset ¶
func (x *CountNumber) Reset()
func (*CountNumber) String ¶
func (x *CountNumber) String() string
type Dept ¶
type Dept struct { DeptId string `protobuf:"bytes,1,opt,name=dept_id,proto3" json:"dept_id,omitempty"` // contains filtered or unexported fields }
func (*Dept) Descriptor
deprecated
func (*Dept) ProtoMessage ¶
func (*Dept) ProtoMessage()
func (*Dept) ProtoReflect ¶
func (x *Dept) ProtoReflect() protoreflect.Message
type DeptAddUserReq ¶
type DeptAddUserReq struct { UserId string `protobuf:"bytes,1,opt,name=user_id,proto3" json:"user_id,omitempty"` Phone *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=phone,proto3" json:"phone,omitempty"` Race DeptAddUserReq_Race `protobuf:"varint,3,opt,name=race,proto3,enum=contacts.DeptAddUserReq_Race" json:"race,omitempty"` DeptId string `protobuf:"bytes,4,opt,name=dept_id,proto3" json:"dept_id,omitempty"` // contains filtered or unexported fields }
func (*DeptAddUserReq) Descriptor
deprecated
func (*DeptAddUserReq) Descriptor() ([]byte, []int)
Deprecated: Use DeptAddUserReq.ProtoReflect.Descriptor instead.
func (*DeptAddUserReq) GetDeptId ¶
func (x *DeptAddUserReq) GetDeptId() string
func (*DeptAddUserReq) GetPhone ¶
func (x *DeptAddUserReq) GetPhone() *wrapperspb.StringValue
func (*DeptAddUserReq) GetRace ¶
func (x *DeptAddUserReq) GetRace() DeptAddUserReq_Race
func (*DeptAddUserReq) GetUserId ¶
func (x *DeptAddUserReq) GetUserId() string
func (*DeptAddUserReq) ProtoMessage ¶
func (*DeptAddUserReq) ProtoMessage()
func (*DeptAddUserReq) ProtoReflect ¶
func (x *DeptAddUserReq) ProtoReflect() protoreflect.Message
func (*DeptAddUserReq) Reset ¶
func (x *DeptAddUserReq) Reset()
func (*DeptAddUserReq) String ¶
func (x *DeptAddUserReq) String() string
type DeptAddUserReq_Race ¶
type DeptAddUserReq_Race int32
const ( DeptAddUserReq_RACE_UNSPECIFIED DeptAddUserReq_Race = 0 DeptAddUserReq_YELLOW DeptAddUserReq_Race = 1 DeptAddUserReq_WHITE DeptAddUserReq_Race = 2 DeptAddUserReq_BLACK DeptAddUserReq_Race = 3 )
func (DeptAddUserReq_Race) Descriptor ¶
func (DeptAddUserReq_Race) Descriptor() protoreflect.EnumDescriptor
func (DeptAddUserReq_Race) Enum ¶
func (x DeptAddUserReq_Race) Enum() *DeptAddUserReq_Race
func (DeptAddUserReq_Race) EnumDescriptor
deprecated
func (DeptAddUserReq_Race) EnumDescriptor() ([]byte, []int)
Deprecated: Use DeptAddUserReq_Race.Descriptor instead.
func (DeptAddUserReq_Race) Number ¶
func (x DeptAddUserReq_Race) Number() protoreflect.EnumNumber
func (DeptAddUserReq_Race) String ¶
func (x DeptAddUserReq_Race) String() string
func (DeptAddUserReq_Race) Type ¶
func (DeptAddUserReq_Race) Type() protoreflect.EnumType
type DeptFindUsersReq ¶
type DeptFindUsersReq struct { UserId string `protobuf:"bytes,1,opt,name=user_id,proto3" json:"user_id,omitempty"` Phone *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=phone,proto3" json:"phone,omitempty"` PageIndex int32 `protobuf:"varint,3,opt,name=page_index,proto3" json:"page_index,omitempty"` PageSize int32 `protobuf:"varint,4,opt,name=page_size,proto3" json:"page_size,omitempty"` DeptId string `protobuf:"bytes,5,opt,name=dept_id,proto3" json:"dept_id,omitempty"` // contains filtered or unexported fields }
func (*DeptFindUsersReq) Descriptor
deprecated
func (*DeptFindUsersReq) Descriptor() ([]byte, []int)
Deprecated: Use DeptFindUsersReq.ProtoReflect.Descriptor instead.
func (*DeptFindUsersReq) GetDeptId ¶
func (x *DeptFindUsersReq) GetDeptId() string
func (*DeptFindUsersReq) GetPageIndex ¶
func (x *DeptFindUsersReq) GetPageIndex() int32
func (*DeptFindUsersReq) GetPageSize ¶
func (x *DeptFindUsersReq) GetPageSize() int32
func (*DeptFindUsersReq) GetPhone ¶
func (x *DeptFindUsersReq) GetPhone() *wrapperspb.StringValue
func (*DeptFindUsersReq) GetUserId ¶
func (x *DeptFindUsersReq) GetUserId() string
func (*DeptFindUsersReq) ProtoMessage ¶
func (*DeptFindUsersReq) ProtoMessage()
func (*DeptFindUsersReq) ProtoReflect ¶
func (x *DeptFindUsersReq) ProtoReflect() protoreflect.Message
func (*DeptFindUsersReq) Reset ¶
func (x *DeptFindUsersReq) Reset()
func (*DeptFindUsersReq) String ¶
func (x *DeptFindUsersReq) String() string
type DeptFindUsersRes ¶
type DeptFindUsersRes struct { DataCount int32 `protobuf:"varint,1,opt,name=data_count,proto3" json:"data_count,omitempty"` Users []*User `protobuf:"bytes,2,rep,name=Users,proto3" json:"Users,omitempty"` // contains filtered or unexported fields }
func (*DeptFindUsersRes) Descriptor
deprecated
func (*DeptFindUsersRes) Descriptor() ([]byte, []int)
Deprecated: Use DeptFindUsersRes.ProtoReflect.Descriptor instead.
func (*DeptFindUsersRes) GetDataCount ¶
func (x *DeptFindUsersRes) GetDataCount() int32
func (*DeptFindUsersRes) GetUsers ¶
func (x *DeptFindUsersRes) GetUsers() []*User
func (*DeptFindUsersRes) ProtoMessage ¶
func (*DeptFindUsersRes) ProtoMessage()
func (*DeptFindUsersRes) ProtoReflect ¶
func (x *DeptFindUsersRes) ProtoReflect() protoreflect.Message
func (*DeptFindUsersRes) Reset ¶
func (x *DeptFindUsersRes) Reset()
func (*DeptFindUsersRes) String ¶
func (x *DeptFindUsersRes) String() string
type DeptId ¶
type DeptId struct { DeptId string `protobuf:"bytes,1,opt,name=dept_id,proto3" json:"dept_id,omitempty"` // contains filtered or unexported fields }
func (*DeptId) Descriptor
deprecated
func (*DeptId) ProtoMessage ¶
func (*DeptId) ProtoMessage()
func (*DeptId) ProtoReflect ¶
func (x *DeptId) ProtoReflect() protoreflect.Message
type DeptIdAndUserId ¶
type DeptIdAndUserId struct { DeptId string `protobuf:"bytes,1,opt,name=dept_id,proto3" json:"dept_id,omitempty"` UserId string `protobuf:"bytes,2,opt,name=user_id,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*DeptIdAndUserId) Descriptor
deprecated
func (*DeptIdAndUserId) Descriptor() ([]byte, []int)
Deprecated: Use DeptIdAndUserId.ProtoReflect.Descriptor instead.
func (*DeptIdAndUserId) GetDeptId ¶
func (x *DeptIdAndUserId) GetDeptId() string
func (*DeptIdAndUserId) GetUserId ¶
func (x *DeptIdAndUserId) GetUserId() string
func (*DeptIdAndUserId) ProtoMessage ¶
func (*DeptIdAndUserId) ProtoMessage()
func (*DeptIdAndUserId) ProtoReflect ¶
func (x *DeptIdAndUserId) ProtoReflect() protoreflect.Message
func (*DeptIdAndUserId) Reset ¶
func (x *DeptIdAndUserId) Reset()
func (*DeptIdAndUserId) String ¶
func (x *DeptIdAndUserId) String() string
type DeptPageQuery ¶
type DeptPageQuery struct { DeptId string `protobuf:"bytes,1,opt,name=dept_id,proto3" json:"dept_id,omitempty"` PageIndex int32 `protobuf:"varint,2,opt,name=page_index,proto3" json:"page_index,omitempty"` PageSize int32 `protobuf:"varint,3,opt,name=page_size,proto3" json:"page_size,omitempty"` PageDataCount *wrapperspb.BoolValue `protobuf:"bytes,4,opt,name=page_data_count,proto3" json:"page_data_count,omitempty"` // contains filtered or unexported fields }
func (*DeptPageQuery) Descriptor
deprecated
func (*DeptPageQuery) Descriptor() ([]byte, []int)
Deprecated: Use DeptPageQuery.ProtoReflect.Descriptor instead.
func (*DeptPageQuery) GetDeptId ¶
func (x *DeptPageQuery) GetDeptId() string
func (*DeptPageQuery) GetPageDataCount ¶
func (x *DeptPageQuery) GetPageDataCount() *wrapperspb.BoolValue
func (*DeptPageQuery) GetPageIndex ¶
func (x *DeptPageQuery) GetPageIndex() int32
func (*DeptPageQuery) GetPageSize ¶
func (x *DeptPageQuery) GetPageSize() int32
func (*DeptPageQuery) ProtoMessage ¶
func (*DeptPageQuery) ProtoMessage()
func (*DeptPageQuery) ProtoReflect ¶
func (x *DeptPageQuery) ProtoReflect() protoreflect.Message
func (*DeptPageQuery) Reset ¶
func (x *DeptPageQuery) Reset()
func (*DeptPageQuery) String ¶
func (x *DeptPageQuery) String() string
type DeptRemoveUserReq ¶
type DeptRemoveUserReq struct { UserId string `protobuf:"bytes,1,opt,name=user_id,proto3" json:"user_id,omitempty"` Phone *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=phone,proto3" json:"phone,omitempty"` PageIndex int32 `protobuf:"varint,3,opt,name=page_index,proto3" json:"page_index,omitempty"` PageSize int32 `protobuf:"varint,4,opt,name=page_size,proto3" json:"page_size,omitempty"` DeptId string `protobuf:"bytes,5,opt,name=dept_id,proto3" json:"dept_id,omitempty"` // contains filtered or unexported fields }
func (*DeptRemoveUserReq) Descriptor
deprecated
func (*DeptRemoveUserReq) Descriptor() ([]byte, []int)
Deprecated: Use DeptRemoveUserReq.ProtoReflect.Descriptor instead.
func (*DeptRemoveUserReq) GetDeptId ¶
func (x *DeptRemoveUserReq) GetDeptId() string
func (*DeptRemoveUserReq) GetPageIndex ¶
func (x *DeptRemoveUserReq) GetPageIndex() int32
func (*DeptRemoveUserReq) GetPageSize ¶
func (x *DeptRemoveUserReq) GetPageSize() int32
func (*DeptRemoveUserReq) GetPhone ¶
func (x *DeptRemoveUserReq) GetPhone() *wrapperspb.StringValue
func (*DeptRemoveUserReq) GetUserId ¶
func (x *DeptRemoveUserReq) GetUserId() string
func (*DeptRemoveUserReq) ProtoMessage ¶
func (*DeptRemoveUserReq) ProtoMessage()
func (*DeptRemoveUserReq) ProtoReflect ¶
func (x *DeptRemoveUserReq) ProtoReflect() protoreflect.Message
func (*DeptRemoveUserReq) Reset ¶
func (x *DeptRemoveUserReq) Reset()
func (*DeptRemoveUserReq) String ¶
func (x *DeptRemoveUserReq) String() string
type DeptServiceClient ¶
type DeptServiceClient interface { Create(ctx context.Context, in *Dept, opts ...grpc.CallOption) (*DeptId, error) Update(ctx context.Context, in *Dept, opts ...grpc.CallOption) (*emptypb.Empty, error) Delete(ctx context.Context, in *DeptId, opts ...grpc.CallOption) (*emptypb.Empty, error) FindById(ctx context.Context, in *DeptId, opts ...grpc.CallOption) (*Dept, error) Find(ctx context.Context, in *DeptPageQuery, opts ...grpc.CallOption) (*DeptWithCount, error) Count(ctx context.Context, in *Dept, opts ...grpc.CallOption) (*CountNumber, error) AddUser(ctx context.Context, in *DeptAddUserReq, opts ...grpc.CallOption) (*UserId, error) AddUserById(ctx context.Context, in *DeptIdAndUserId, opts ...grpc.CallOption) (*emptypb.Empty, error) RemoveUser(ctx context.Context, in *DeptRemoveUserReq, opts ...grpc.CallOption) (*emptypb.Empty, error) FindUsers(ctx context.Context, in *DeptFindUsersReq, opts ...grpc.CallOption) (*DeptFindUsersRes, error) }
DeptServiceClient is the client API for DeptService 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.
func NewDeptServiceClient ¶
func NewDeptServiceClient(cc grpc.ClientConnInterface) DeptServiceClient
type DeptServiceHTTPClient ¶
type DeptServiceHTTPClient interface { AddUser(ctx context.Context, req *DeptAddUserReq, opts ...http.CallOption) (rsp *UserId, err error) AddUserById(ctx context.Context, req *DeptIdAndUserId, opts ...http.CallOption) (rsp *emptypb.Empty, err error) Count(ctx context.Context, req *Dept, opts ...http.CallOption) (rsp *CountNumber, err error) Create(ctx context.Context, req *Dept, opts ...http.CallOption) (rsp *DeptId, err error) Delete(ctx context.Context, req *DeptId, opts ...http.CallOption) (rsp *emptypb.Empty, err error) Find(ctx context.Context, req *DeptPageQuery, opts ...http.CallOption) (rsp *DeptWithCount, err error) FindById(ctx context.Context, req *DeptId, opts ...http.CallOption) (rsp *Dept, err error) FindUsers(ctx context.Context, req *DeptFindUsersReq, opts ...http.CallOption) (rsp *DeptFindUsersRes, err error) RemoveUser(ctx context.Context, req *DeptRemoveUserReq, opts ...http.CallOption) (rsp *emptypb.Empty, err error) Update(ctx context.Context, req *Dept, opts ...http.CallOption) (rsp *emptypb.Empty, err error) }
func NewDeptServiceHTTPClient ¶
func NewDeptServiceHTTPClient(client *http.Client) DeptServiceHTTPClient
type DeptServiceHTTPClientImpl ¶
type DeptServiceHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*DeptServiceHTTPClientImpl) AddUser ¶
func (c *DeptServiceHTTPClientImpl) AddUser(ctx context.Context, in *DeptAddUserReq, opts ...http.CallOption) (*UserId, error)
func (*DeptServiceHTTPClientImpl) AddUserById ¶
func (c *DeptServiceHTTPClientImpl) AddUserById(ctx context.Context, in *DeptIdAndUserId, opts ...http.CallOption) (*emptypb.Empty, error)
func (*DeptServiceHTTPClientImpl) Count ¶
func (c *DeptServiceHTTPClientImpl) Count(ctx context.Context, in *Dept, opts ...http.CallOption) (*CountNumber, error)
func (*DeptServiceHTTPClientImpl) Create ¶
func (c *DeptServiceHTTPClientImpl) Create(ctx context.Context, in *Dept, opts ...http.CallOption) (*DeptId, error)
func (*DeptServiceHTTPClientImpl) Delete ¶
func (c *DeptServiceHTTPClientImpl) Delete(ctx context.Context, in *DeptId, opts ...http.CallOption) (*emptypb.Empty, error)
func (*DeptServiceHTTPClientImpl) Find ¶
func (c *DeptServiceHTTPClientImpl) Find(ctx context.Context, in *DeptPageQuery, opts ...http.CallOption) (*DeptWithCount, error)
func (*DeptServiceHTTPClientImpl) FindById ¶
func (c *DeptServiceHTTPClientImpl) FindById(ctx context.Context, in *DeptId, opts ...http.CallOption) (*Dept, error)
func (*DeptServiceHTTPClientImpl) FindUsers ¶
func (c *DeptServiceHTTPClientImpl) FindUsers(ctx context.Context, in *DeptFindUsersReq, opts ...http.CallOption) (*DeptFindUsersRes, error)
func (*DeptServiceHTTPClientImpl) RemoveUser ¶
func (c *DeptServiceHTTPClientImpl) RemoveUser(ctx context.Context, in *DeptRemoveUserReq, opts ...http.CallOption) (*emptypb.Empty, error)
type DeptServiceHTTPServer ¶
type DeptServiceHTTPServer interface { AddUser(context.Context, *DeptAddUserReq) (*UserId, error) AddUserById(context.Context, *DeptIdAndUserId) (*emptypb.Empty, error) Count(context.Context, *Dept) (*CountNumber, error) Create(context.Context, *Dept) (*DeptId, error) Delete(context.Context, *DeptId) (*emptypb.Empty, error) Find(context.Context, *DeptPageQuery) (*DeptWithCount, error) FindById(context.Context, *DeptId) (*Dept, error) FindUsers(context.Context, *DeptFindUsersReq) (*DeptFindUsersRes, error) RemoveUser(context.Context, *DeptRemoveUserReq) (*emptypb.Empty, error) Update(context.Context, *Dept) (*emptypb.Empty, error) }
type DeptServiceServer ¶
type DeptServiceServer interface { Create(context.Context, *Dept) (*DeptId, error) Update(context.Context, *Dept) (*emptypb.Empty, error) Delete(context.Context, *DeptId) (*emptypb.Empty, error) FindById(context.Context, *DeptId) (*Dept, error) Find(context.Context, *DeptPageQuery) (*DeptWithCount, error) Count(context.Context, *Dept) (*CountNumber, error) AddUser(context.Context, *DeptAddUserReq) (*UserId, error) AddUserById(context.Context, *DeptIdAndUserId) (*emptypb.Empty, error) RemoveUser(context.Context, *DeptRemoveUserReq) (*emptypb.Empty, error) FindUsers(context.Context, *DeptFindUsersReq) (*DeptFindUsersRes, error) // contains filtered or unexported methods }
DeptServiceServer is the server API for DeptService service. All implementations must embed UnimplementedDeptServiceServer for forward compatibility
type DeptWithCount ¶
type DeptWithCount struct { DataCount *wrapperspb.Int32Value `protobuf:"bytes,1,opt,name=data_count,proto3" json:"data_count,omitempty"` Depts []*Dept `protobuf:"bytes,2,rep,name=Depts,proto3" json:"Depts,omitempty"` // contains filtered or unexported fields }
func (*DeptWithCount) Descriptor
deprecated
func (*DeptWithCount) Descriptor() ([]byte, []int)
Deprecated: Use DeptWithCount.ProtoReflect.Descriptor instead.
func (*DeptWithCount) GetDataCount ¶
func (x *DeptWithCount) GetDataCount() *wrapperspb.Int32Value
func (*DeptWithCount) GetDepts ¶
func (x *DeptWithCount) GetDepts() []*Dept
func (*DeptWithCount) ProtoMessage ¶
func (*DeptWithCount) ProtoMessage()
func (*DeptWithCount) ProtoReflect ¶
func (x *DeptWithCount) ProtoReflect() protoreflect.Message
func (*DeptWithCount) Reset ¶
func (x *DeptWithCount) Reset()
func (*DeptWithCount) String ¶
func (x *DeptWithCount) String() string
type Depts ¶
type Depts struct { DataList []*Dept `protobuf:"bytes,1,rep,name=data_list,proto3" json:"data_list,omitempty"` // contains filtered or unexported fields }
func (*Depts) Descriptor
deprecated
func (*Depts) GetDataList ¶
func (*Depts) ProtoMessage ¶
func (*Depts) ProtoMessage()
func (*Depts) ProtoReflect ¶
func (x *Depts) ProtoReflect() protoreflect.Message
type UnimplementedCarServiceServer ¶
type UnimplementedCarServiceServer struct { }
UnimplementedCarServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedCarServiceServer) Count ¶
func (UnimplementedCarServiceServer) Count(context.Context, *Car) (*CountNumber, error)
func (UnimplementedCarServiceServer) Find ¶
func (UnimplementedCarServiceServer) Find(context.Context, *CarPageQuery) (*CarWithCount, error)
type UnimplementedDeptServiceServer ¶
type UnimplementedDeptServiceServer struct { }
UnimplementedDeptServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedDeptServiceServer) AddUser ¶
func (UnimplementedDeptServiceServer) AddUser(context.Context, *DeptAddUserReq) (*UserId, error)
func (UnimplementedDeptServiceServer) AddUserById ¶
func (UnimplementedDeptServiceServer) AddUserById(context.Context, *DeptIdAndUserId) (*emptypb.Empty, error)
func (UnimplementedDeptServiceServer) Count ¶
func (UnimplementedDeptServiceServer) Count(context.Context, *Dept) (*CountNumber, error)
func (UnimplementedDeptServiceServer) Find ¶
func (UnimplementedDeptServiceServer) Find(context.Context, *DeptPageQuery) (*DeptWithCount, error)
func (UnimplementedDeptServiceServer) FindUsers ¶
func (UnimplementedDeptServiceServer) FindUsers(context.Context, *DeptFindUsersReq) (*DeptFindUsersRes, error)
func (UnimplementedDeptServiceServer) RemoveUser ¶
func (UnimplementedDeptServiceServer) RemoveUser(context.Context, *DeptRemoveUserReq) (*emptypb.Empty, error)
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) AddCarById ¶
func (UnimplementedUserServiceServer) AddCarById(context.Context, *UserIdAndCarId) (*emptypb.Empty, error)
func (UnimplementedUserServiceServer) Count ¶
func (UnimplementedUserServiceServer) Count(context.Context, *User) (*CountNumber, error)
func (UnimplementedUserServiceServer) Find ¶
func (UnimplementedUserServiceServer) Find(context.Context, *UserPageQuery) (*UserWithCount, error)
func (UnimplementedUserServiceServer) FindCars ¶
func (UnimplementedUserServiceServer) FindCars(context.Context, *UserFindCarsReq) (*UserFindCarsRes, error)
func (UnimplementedUserServiceServer) FindDepts ¶
func (UnimplementedUserServiceServer) FindDepts(context.Context, *UserFindDeptsReq) (*UserFindDeptsRes, error)
func (UnimplementedUserServiceServer) RemoveCar ¶
func (UnimplementedUserServiceServer) RemoveCar(context.Context, *UserRemoveCarReq) (*emptypb.Empty, error)
type UnsafeCarServiceServer ¶
type UnsafeCarServiceServer interface {
// contains filtered or unexported methods
}
UnsafeCarServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CarServiceServer will result in compilation errors.
type UnsafeDeptServiceServer ¶
type UnsafeDeptServiceServer interface {
// contains filtered or unexported methods
}
UnsafeDeptServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DeptServiceServer will result in compilation errors.
type UnsafeUserServiceServer ¶
type UnsafeUserServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceServer will result in compilation errors.
type User ¶
type User struct { UserId string `protobuf:"bytes,1,opt,name=user_id,proto3" json:"user_id,omitempty"` Phone *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=phone,proto3" json:"phone,omitempty"` Race User_Race `protobuf:"varint,3,opt,name=race,proto3,enum=contacts.User_Race" json:"race,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetPhone ¶
func (x *User) GetPhone() *wrapperspb.StringValue
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserAddDeptReq ¶
type UserAddDeptReq struct { DeptId string `protobuf:"bytes,1,opt,name=dept_id,proto3" json:"dept_id,omitempty"` UserId string `protobuf:"bytes,2,opt,name=user_id,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*UserAddDeptReq) Descriptor
deprecated
func (*UserAddDeptReq) Descriptor() ([]byte, []int)
Deprecated: Use UserAddDeptReq.ProtoReflect.Descriptor instead.
func (*UserAddDeptReq) GetDeptId ¶
func (x *UserAddDeptReq) GetDeptId() string
func (*UserAddDeptReq) GetUserId ¶
func (x *UserAddDeptReq) GetUserId() string
func (*UserAddDeptReq) ProtoMessage ¶
func (*UserAddDeptReq) ProtoMessage()
func (*UserAddDeptReq) ProtoReflect ¶
func (x *UserAddDeptReq) ProtoReflect() protoreflect.Message
func (*UserAddDeptReq) Reset ¶
func (x *UserAddDeptReq) Reset()
func (*UserAddDeptReq) String ¶
func (x *UserAddDeptReq) String() string
type UserFindCarsReq ¶
type UserFindCarsReq struct { CarId string `protobuf:"bytes,1,opt,name=car_id,proto3" json:"car_id,omitempty"` PageIndex int32 `protobuf:"varint,2,opt,name=page_index,proto3" json:"page_index,omitempty"` PageSize int32 `protobuf:"varint,3,opt,name=page_size,proto3" json:"page_size,omitempty"` UserId string `protobuf:"bytes,4,opt,name=user_id,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*UserFindCarsReq) Descriptor
deprecated
func (*UserFindCarsReq) Descriptor() ([]byte, []int)
Deprecated: Use UserFindCarsReq.ProtoReflect.Descriptor instead.
func (*UserFindCarsReq) GetCarId ¶
func (x *UserFindCarsReq) GetCarId() string
func (*UserFindCarsReq) GetPageIndex ¶
func (x *UserFindCarsReq) GetPageIndex() int32
func (*UserFindCarsReq) GetPageSize ¶
func (x *UserFindCarsReq) GetPageSize() int32
func (*UserFindCarsReq) GetUserId ¶
func (x *UserFindCarsReq) GetUserId() string
func (*UserFindCarsReq) ProtoMessage ¶
func (*UserFindCarsReq) ProtoMessage()
func (*UserFindCarsReq) ProtoReflect ¶
func (x *UserFindCarsReq) ProtoReflect() protoreflect.Message
func (*UserFindCarsReq) Reset ¶
func (x *UserFindCarsReq) Reset()
func (*UserFindCarsReq) String ¶
func (x *UserFindCarsReq) String() string
type UserFindCarsRes ¶
type UserFindCarsRes struct { DataCount int32 `protobuf:"varint,1,opt,name=data_count,proto3" json:"data_count,omitempty"` Cars []*Car `protobuf:"bytes,2,rep,name=Cars,proto3" json:"Cars,omitempty"` // contains filtered or unexported fields }
func (*UserFindCarsRes) Descriptor
deprecated
func (*UserFindCarsRes) Descriptor() ([]byte, []int)
Deprecated: Use UserFindCarsRes.ProtoReflect.Descriptor instead.
func (*UserFindCarsRes) GetCars ¶
func (x *UserFindCarsRes) GetCars() []*Car
func (*UserFindCarsRes) GetDataCount ¶
func (x *UserFindCarsRes) GetDataCount() int32
func (*UserFindCarsRes) ProtoMessage ¶
func (*UserFindCarsRes) ProtoMessage()
func (*UserFindCarsRes) ProtoReflect ¶
func (x *UserFindCarsRes) ProtoReflect() protoreflect.Message
func (*UserFindCarsRes) Reset ¶
func (x *UserFindCarsRes) Reset()
func (*UserFindCarsRes) String ¶
func (x *UserFindCarsRes) String() string
type UserFindDeptsReq ¶
type UserFindDeptsReq struct { DeptId string `protobuf:"bytes,1,opt,name=dept_id,proto3" json:"dept_id,omitempty"` PageIndex int32 `protobuf:"varint,2,opt,name=page_index,proto3" json:"page_index,omitempty"` PageSize int32 `protobuf:"varint,3,opt,name=page_size,proto3" json:"page_size,omitempty"` UserId string `protobuf:"bytes,4,opt,name=user_id,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*UserFindDeptsReq) Descriptor
deprecated
func (*UserFindDeptsReq) Descriptor() ([]byte, []int)
Deprecated: Use UserFindDeptsReq.ProtoReflect.Descriptor instead.
func (*UserFindDeptsReq) GetDeptId ¶
func (x *UserFindDeptsReq) GetDeptId() string
func (*UserFindDeptsReq) GetPageIndex ¶
func (x *UserFindDeptsReq) GetPageIndex() int32
func (*UserFindDeptsReq) GetPageSize ¶
func (x *UserFindDeptsReq) GetPageSize() int32
func (*UserFindDeptsReq) GetUserId ¶
func (x *UserFindDeptsReq) GetUserId() string
func (*UserFindDeptsReq) ProtoMessage ¶
func (*UserFindDeptsReq) ProtoMessage()
func (*UserFindDeptsReq) ProtoReflect ¶
func (x *UserFindDeptsReq) ProtoReflect() protoreflect.Message
func (*UserFindDeptsReq) Reset ¶
func (x *UserFindDeptsReq) Reset()
func (*UserFindDeptsReq) String ¶
func (x *UserFindDeptsReq) String() string
type UserFindDeptsRes ¶
type UserFindDeptsRes struct { DataCount int32 `protobuf:"varint,1,opt,name=data_count,proto3" json:"data_count,omitempty"` Depts []*Dept `protobuf:"bytes,2,rep,name=Depts,proto3" json:"Depts,omitempty"` // contains filtered or unexported fields }
func (*UserFindDeptsRes) Descriptor
deprecated
func (*UserFindDeptsRes) Descriptor() ([]byte, []int)
Deprecated: Use UserFindDeptsRes.ProtoReflect.Descriptor instead.
func (*UserFindDeptsRes) GetDataCount ¶
func (x *UserFindDeptsRes) GetDataCount() int32
func (*UserFindDeptsRes) GetDepts ¶
func (x *UserFindDeptsRes) GetDepts() []*Dept
func (*UserFindDeptsRes) ProtoMessage ¶
func (*UserFindDeptsRes) ProtoMessage()
func (*UserFindDeptsRes) ProtoReflect ¶
func (x *UserFindDeptsRes) ProtoReflect() protoreflect.Message
func (*UserFindDeptsRes) Reset ¶
func (x *UserFindDeptsRes) Reset()
func (*UserFindDeptsRes) String ¶
func (x *UserFindDeptsRes) String() string
type UserId ¶
type UserId struct { UserId string `protobuf:"bytes,1,opt,name=user_id,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*UserId) Descriptor
deprecated
func (*UserId) ProtoMessage ¶
func (*UserId) ProtoMessage()
func (*UserId) ProtoReflect ¶
func (x *UserId) ProtoReflect() protoreflect.Message
type UserIdAndCarId ¶
type UserIdAndCarId struct { UserId string `protobuf:"bytes,1,opt,name=user_id,proto3" json:"user_id,omitempty"` CarId string `protobuf:"bytes,2,opt,name=car_id,proto3" json:"car_id,omitempty"` // contains filtered or unexported fields }
func (*UserIdAndCarId) Descriptor
deprecated
func (*UserIdAndCarId) Descriptor() ([]byte, []int)
Deprecated: Use UserIdAndCarId.ProtoReflect.Descriptor instead.
func (*UserIdAndCarId) GetCarId ¶
func (x *UserIdAndCarId) GetCarId() string
func (*UserIdAndCarId) GetUserId ¶
func (x *UserIdAndCarId) GetUserId() string
func (*UserIdAndCarId) ProtoMessage ¶
func (*UserIdAndCarId) ProtoMessage()
func (*UserIdAndCarId) ProtoReflect ¶
func (x *UserIdAndCarId) ProtoReflect() protoreflect.Message
func (*UserIdAndCarId) Reset ¶
func (x *UserIdAndCarId) Reset()
func (*UserIdAndCarId) String ¶
func (x *UserIdAndCarId) String() string
type UserIdAndDeptId ¶
type UserIdAndDeptId struct { UserId string `protobuf:"bytes,1,opt,name=user_id,proto3" json:"user_id,omitempty"` DeptId string `protobuf:"bytes,2,opt,name=dept_id,proto3" json:"dept_id,omitempty"` // contains filtered or unexported fields }
func (*UserIdAndDeptId) Descriptor
deprecated
func (*UserIdAndDeptId) Descriptor() ([]byte, []int)
Deprecated: Use UserIdAndDeptId.ProtoReflect.Descriptor instead.
func (*UserIdAndDeptId) GetDeptId ¶
func (x *UserIdAndDeptId) GetDeptId() string
func (*UserIdAndDeptId) GetUserId ¶
func (x *UserIdAndDeptId) GetUserId() string
func (*UserIdAndDeptId) ProtoMessage ¶
func (*UserIdAndDeptId) ProtoMessage()
func (*UserIdAndDeptId) ProtoReflect ¶
func (x *UserIdAndDeptId) ProtoReflect() protoreflect.Message
func (*UserIdAndDeptId) Reset ¶
func (x *UserIdAndDeptId) Reset()
func (*UserIdAndDeptId) String ¶
func (x *UserIdAndDeptId) String() string
type UserPageQuery ¶
type UserPageQuery struct { UserId string `protobuf:"bytes,1,opt,name=user_id,proto3" json:"user_id,omitempty"` Phone *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=phone,proto3" json:"phone,omitempty"` Race UserPageQuery_Race `protobuf:"varint,3,opt,name=race,proto3,enum=contacts.UserPageQuery_Race" json:"race,omitempty"` PageIndex int32 `protobuf:"varint,4,opt,name=page_index,proto3" json:"page_index,omitempty"` PageSize int32 `protobuf:"varint,5,opt,name=page_size,proto3" json:"page_size,omitempty"` PageDataCount *wrapperspb.BoolValue `protobuf:"bytes,6,opt,name=page_data_count,proto3" json:"page_data_count,omitempty"` // contains filtered or unexported fields }
func (*UserPageQuery) Descriptor
deprecated
func (*UserPageQuery) Descriptor() ([]byte, []int)
Deprecated: Use UserPageQuery.ProtoReflect.Descriptor instead.
func (*UserPageQuery) GetPageDataCount ¶
func (x *UserPageQuery) GetPageDataCount() *wrapperspb.BoolValue
func (*UserPageQuery) GetPageIndex ¶
func (x *UserPageQuery) GetPageIndex() int32
func (*UserPageQuery) GetPageSize ¶
func (x *UserPageQuery) GetPageSize() int32
func (*UserPageQuery) GetPhone ¶
func (x *UserPageQuery) GetPhone() *wrapperspb.StringValue
func (*UserPageQuery) GetRace ¶
func (x *UserPageQuery) GetRace() UserPageQuery_Race
func (*UserPageQuery) GetUserId ¶
func (x *UserPageQuery) GetUserId() string
func (*UserPageQuery) ProtoMessage ¶
func (*UserPageQuery) ProtoMessage()
func (*UserPageQuery) ProtoReflect ¶
func (x *UserPageQuery) ProtoReflect() protoreflect.Message
func (*UserPageQuery) Reset ¶
func (x *UserPageQuery) Reset()
func (*UserPageQuery) String ¶
func (x *UserPageQuery) String() string
type UserPageQuery_Race ¶
type UserPageQuery_Race int32
const ( UserPageQuery_RACE_UNSPECIFIED UserPageQuery_Race = 0 UserPageQuery_YELLOW UserPageQuery_Race = 1 UserPageQuery_WHITE UserPageQuery_Race = 2 UserPageQuery_BLACK UserPageQuery_Race = 3 )
func (UserPageQuery_Race) Descriptor ¶
func (UserPageQuery_Race) Descriptor() protoreflect.EnumDescriptor
func (UserPageQuery_Race) Enum ¶
func (x UserPageQuery_Race) Enum() *UserPageQuery_Race
func (UserPageQuery_Race) EnumDescriptor
deprecated
func (UserPageQuery_Race) EnumDescriptor() ([]byte, []int)
Deprecated: Use UserPageQuery_Race.Descriptor instead.
func (UserPageQuery_Race) Number ¶
func (x UserPageQuery_Race) Number() protoreflect.EnumNumber
func (UserPageQuery_Race) String ¶
func (x UserPageQuery_Race) String() string
func (UserPageQuery_Race) Type ¶
func (UserPageQuery_Race) Type() protoreflect.EnumType
type UserRemoveCarReq ¶
type UserRemoveCarReq struct { CarId string `protobuf:"bytes,1,opt,name=car_id,proto3" json:"car_id,omitempty"` PageIndex int32 `protobuf:"varint,2,opt,name=page_index,proto3" json:"page_index,omitempty"` PageSize int32 `protobuf:"varint,3,opt,name=page_size,proto3" json:"page_size,omitempty"` UserId string `protobuf:"bytes,4,opt,name=user_id,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*UserRemoveCarReq) Descriptor
deprecated
func (*UserRemoveCarReq) Descriptor() ([]byte, []int)
Deprecated: Use UserRemoveCarReq.ProtoReflect.Descriptor instead.
func (*UserRemoveCarReq) GetCarId ¶
func (x *UserRemoveCarReq) GetCarId() string
func (*UserRemoveCarReq) GetPageIndex ¶
func (x *UserRemoveCarReq) GetPageIndex() int32
func (*UserRemoveCarReq) GetPageSize ¶
func (x *UserRemoveCarReq) GetPageSize() int32
func (*UserRemoveCarReq) GetUserId ¶
func (x *UserRemoveCarReq) GetUserId() string
func (*UserRemoveCarReq) ProtoMessage ¶
func (*UserRemoveCarReq) ProtoMessage()
func (*UserRemoveCarReq) ProtoReflect ¶
func (x *UserRemoveCarReq) ProtoReflect() protoreflect.Message
func (*UserRemoveCarReq) Reset ¶
func (x *UserRemoveCarReq) Reset()
func (*UserRemoveCarReq) String ¶
func (x *UserRemoveCarReq) String() string
type UserServiceClient ¶
type UserServiceClient interface { Create(ctx context.Context, in *User, opts ...grpc.CallOption) (*UserId, error) Update(ctx context.Context, in *User, opts ...grpc.CallOption) (*emptypb.Empty, error) Delete(ctx context.Context, in *UserId, opts ...grpc.CallOption) (*emptypb.Empty, error) FindById(ctx context.Context, in *UserId, opts ...grpc.CallOption) (*User, error) Find(ctx context.Context, in *UserPageQuery, opts ...grpc.CallOption) (*UserWithCount, error) Count(ctx context.Context, in *User, opts ...grpc.CallOption) (*CountNumber, error) AddCar(ctx context.Context, in *Car, opts ...grpc.CallOption) (*CarId, error) AddCarById(ctx context.Context, in *UserIdAndCarId, opts ...grpc.CallOption) (*emptypb.Empty, error) RemoveCar(ctx context.Context, in *UserRemoveCarReq, opts ...grpc.CallOption) (*emptypb.Empty, error) FindCars(ctx context.Context, in *UserFindCarsReq, opts ...grpc.CallOption) (*UserFindCarsRes, error) FindDepts(ctx context.Context, in *UserFindDeptsReq, opts ...grpc.CallOption) (*UserFindDeptsRes, error) }
UserServiceClient is the client API for UserService 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.
func NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceHTTPClient ¶
type UserServiceHTTPClient interface { AddCar(ctx context.Context, req *Car, opts ...http.CallOption) (rsp *CarId, err error) AddCarById(ctx context.Context, req *UserIdAndCarId, opts ...http.CallOption) (rsp *emptypb.Empty, err error) Count(ctx context.Context, req *User, opts ...http.CallOption) (rsp *CountNumber, err error) Create(ctx context.Context, req *User, opts ...http.CallOption) (rsp *UserId, err error) Delete(ctx context.Context, req *UserId, opts ...http.CallOption) (rsp *emptypb.Empty, err error) Find(ctx context.Context, req *UserPageQuery, opts ...http.CallOption) (rsp *UserWithCount, err error) FindById(ctx context.Context, req *UserId, opts ...http.CallOption) (rsp *User, err error) FindCars(ctx context.Context, req *UserFindCarsReq, opts ...http.CallOption) (rsp *UserFindCarsRes, err error) FindDepts(ctx context.Context, req *UserFindDeptsReq, opts ...http.CallOption) (rsp *UserFindDeptsRes, err error) RemoveCar(ctx context.Context, req *UserRemoveCarReq, opts ...http.CallOption) (rsp *emptypb.Empty, err error) Update(ctx context.Context, req *User, opts ...http.CallOption) (rsp *emptypb.Empty, err error) }
func NewUserServiceHTTPClient ¶
func NewUserServiceHTTPClient(client *http.Client) UserServiceHTTPClient
type UserServiceHTTPClientImpl ¶
type UserServiceHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*UserServiceHTTPClientImpl) AddCar ¶
func (c *UserServiceHTTPClientImpl) AddCar(ctx context.Context, in *Car, opts ...http.CallOption) (*CarId, error)
func (*UserServiceHTTPClientImpl) AddCarById ¶
func (c *UserServiceHTTPClientImpl) AddCarById(ctx context.Context, in *UserIdAndCarId, opts ...http.CallOption) (*emptypb.Empty, error)
func (*UserServiceHTTPClientImpl) Count ¶
func (c *UserServiceHTTPClientImpl) Count(ctx context.Context, in *User, opts ...http.CallOption) (*CountNumber, error)
func (*UserServiceHTTPClientImpl) Create ¶
func (c *UserServiceHTTPClientImpl) Create(ctx context.Context, in *User, opts ...http.CallOption) (*UserId, error)
func (*UserServiceHTTPClientImpl) Delete ¶
func (c *UserServiceHTTPClientImpl) Delete(ctx context.Context, in *UserId, opts ...http.CallOption) (*emptypb.Empty, error)
func (*UserServiceHTTPClientImpl) Find ¶
func (c *UserServiceHTTPClientImpl) Find(ctx context.Context, in *UserPageQuery, opts ...http.CallOption) (*UserWithCount, error)
func (*UserServiceHTTPClientImpl) FindById ¶
func (c *UserServiceHTTPClientImpl) FindById(ctx context.Context, in *UserId, opts ...http.CallOption) (*User, error)
func (*UserServiceHTTPClientImpl) FindCars ¶
func (c *UserServiceHTTPClientImpl) FindCars(ctx context.Context, in *UserFindCarsReq, opts ...http.CallOption) (*UserFindCarsRes, error)
func (*UserServiceHTTPClientImpl) FindDepts ¶
func (c *UserServiceHTTPClientImpl) FindDepts(ctx context.Context, in *UserFindDeptsReq, opts ...http.CallOption) (*UserFindDeptsRes, error)
func (*UserServiceHTTPClientImpl) RemoveCar ¶
func (c *UserServiceHTTPClientImpl) RemoveCar(ctx context.Context, in *UserRemoveCarReq, opts ...http.CallOption) (*emptypb.Empty, error)
type UserServiceHTTPServer ¶
type UserServiceHTTPServer interface { AddCar(context.Context, *Car) (*CarId, error) AddCarById(context.Context, *UserIdAndCarId) (*emptypb.Empty, error) Count(context.Context, *User) (*CountNumber, error) Create(context.Context, *User) (*UserId, error) Delete(context.Context, *UserId) (*emptypb.Empty, error) Find(context.Context, *UserPageQuery) (*UserWithCount, error) FindById(context.Context, *UserId) (*User, error) FindCars(context.Context, *UserFindCarsReq) (*UserFindCarsRes, error) FindDepts(context.Context, *UserFindDeptsReq) (*UserFindDeptsRes, error) RemoveCar(context.Context, *UserRemoveCarReq) (*emptypb.Empty, error) Update(context.Context, *User) (*emptypb.Empty, error) }
type UserServiceServer ¶
type UserServiceServer interface { Create(context.Context, *User) (*UserId, error) Update(context.Context, *User) (*emptypb.Empty, error) Delete(context.Context, *UserId) (*emptypb.Empty, error) FindById(context.Context, *UserId) (*User, error) Find(context.Context, *UserPageQuery) (*UserWithCount, error) Count(context.Context, *User) (*CountNumber, error) AddCar(context.Context, *Car) (*CarId, error) AddCarById(context.Context, *UserIdAndCarId) (*emptypb.Empty, error) RemoveCar(context.Context, *UserRemoveCarReq) (*emptypb.Empty, error) FindCars(context.Context, *UserFindCarsReq) (*UserFindCarsRes, error) FindDepts(context.Context, *UserFindDeptsReq) (*UserFindDeptsRes, error) // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility
type UserWithCount ¶
type UserWithCount struct { DataCount *wrapperspb.Int32Value `protobuf:"bytes,1,opt,name=data_count,proto3" json:"data_count,omitempty"` Users []*User `protobuf:"bytes,2,rep,name=Users,proto3" json:"Users,omitempty"` // contains filtered or unexported fields }
func (*UserWithCount) Descriptor
deprecated
func (*UserWithCount) Descriptor() ([]byte, []int)
Deprecated: Use UserWithCount.ProtoReflect.Descriptor instead.
func (*UserWithCount) GetDataCount ¶
func (x *UserWithCount) GetDataCount() *wrapperspb.Int32Value
func (*UserWithCount) GetUsers ¶
func (x *UserWithCount) GetUsers() []*User
func (*UserWithCount) ProtoMessage ¶
func (*UserWithCount) ProtoMessage()
func (*UserWithCount) ProtoReflect ¶
func (x *UserWithCount) ProtoReflect() protoreflect.Message
func (*UserWithCount) Reset ¶
func (x *UserWithCount) Reset()
func (*UserWithCount) String ¶
func (x *UserWithCount) String() string
type User_Race ¶
type User_Race int32
func (User_Race) Descriptor ¶
func (User_Race) Descriptor() protoreflect.EnumDescriptor
func (User_Race) EnumDescriptor
deprecated
func (User_Race) Number ¶
func (x User_Race) Number() protoreflect.EnumNumber
func (User_Race) Type ¶
func (User_Race) Type() protoreflect.EnumType
type Users ¶
type Users struct { DataList []*User `protobuf:"bytes,1,rep,name=data_list,proto3" json:"data_list,omitempty"` // contains filtered or unexported fields }
func (*Users) Descriptor
deprecated
func (*Users) GetDataList ¶
func (*Users) ProtoMessage ¶
func (*Users) ProtoMessage()
func (*Users) ProtoReflect ¶
func (x *Users) ProtoReflect() protoreflect.Message