Documentation ¶
Index ¶
- Variables
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type Empty
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) CreateUser(context.Context, *UserCreation) (*UserCreationResponse, error)
- func (UnimplementedUserServiceServer) DeleteUser(context.Context, *UserId) (*Empty, error)
- func (UnimplementedUserServiceServer) GetUserById(context.Context, *UserId) (*User, error)
- func (UnimplementedUserServiceServer) GetUsers(*UserFilter, UserService_GetUsersServer) error
- func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UserUpdate) (*Empty, error)
- type UnsafeUserServiceServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetCountry() string
- func (x *User) GetCreatedAt() string
- func (x *User) GetEmail() string
- func (x *User) GetFirstName() string
- func (x *User) GetId() string
- func (x *User) GetLastName() string
- func (x *User) GetNickname() string
- func (x *User) GetUpdatedAt() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserCreation
- func (*UserCreation) Descriptor() ([]byte, []int)deprecated
- func (x *UserCreation) GetCountry() string
- func (x *UserCreation) GetEmail() string
- func (x *UserCreation) GetFirstName() string
- func (x *UserCreation) GetLastName() string
- func (x *UserCreation) GetNickname() string
- func (x *UserCreation) GetPassword() string
- func (*UserCreation) ProtoMessage()
- func (x *UserCreation) ProtoReflect() protoreflect.Message
- func (x *UserCreation) Reset()
- func (x *UserCreation) String() string
- type UserCreationResponse
- func (*UserCreationResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UserCreationResponse) GetId() string
- func (*UserCreationResponse) ProtoMessage()
- func (x *UserCreationResponse) ProtoReflect() protoreflect.Message
- func (x *UserCreationResponse) Reset()
- func (x *UserCreationResponse) String() string
- type UserFilter
- func (*UserFilter) Descriptor() ([]byte, []int)deprecated
- func (x *UserFilter) GetCountry() string
- func (x *UserFilter) GetEmail() string
- func (x *UserFilter) GetFirstName() string
- func (x *UserFilter) GetLastName() string
- func (x *UserFilter) GetLimit() int32
- func (x *UserFilter) GetNickname() string
- func (x *UserFilter) GetOffset() int32
- func (*UserFilter) ProtoMessage()
- func (x *UserFilter) ProtoReflect() protoreflect.Message
- func (x *UserFilter) Reset()
- func (x *UserFilter) String() string
- type UserId
- type UserServiceClient
- type UserServiceServer
- type UserService_GetUsersClient
- type UserService_GetUsersServer
- type UserUpdate
- func (*UserUpdate) Descriptor() ([]byte, []int)deprecated
- func (x *UserUpdate) GetCountry() string
- func (x *UserUpdate) GetEmail() string
- func (x *UserUpdate) GetFirstName() string
- func (x *UserUpdate) GetId() string
- func (x *UserUpdate) GetLastName() string
- func (x *UserUpdate) GetNickname() string
- func (x *UserUpdate) GetPassword() string
- func (*UserUpdate) ProtoMessage()
- func (x *UserUpdate) ProtoReflect() protoreflect.Message
- func (x *UserUpdate) Reset()
- func (x *UserUpdate) String() string
Constants ¶
This section is empty.
Variables ¶
var File_proto_users_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "userservice.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateUser", Handler: _UserService_CreateUser_Handler, }, { MethodName: "GetUserById", Handler: _UserService_GetUserById_Handler, }, { MethodName: "UpdateUser", Handler: _UserService_UpdateUser_Handler, }, { MethodName: "DeleteUser", Handler: _UserService_DeleteUser_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "GetUsers", Handler: _UserService_GetUsers_Handler, ServerStreams: true, }, }, Metadata: "proto/users.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 RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) CreateUser ¶
func (UnimplementedUserServiceServer) CreateUser(context.Context, *UserCreation) (*UserCreationResponse, error)
func (UnimplementedUserServiceServer) DeleteUser ¶
func (UnimplementedUserServiceServer) GetUserById ¶
func (UnimplementedUserServiceServer) GetUsers ¶
func (UnimplementedUserServiceServer) GetUsers(*UserFilter, UserService_GetUsersServer) error
func (UnimplementedUserServiceServer) UpdateUser ¶
func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UserUpdate) (*Empty, error)
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 { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` FirstName string `protobuf:"bytes,2,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"` LastName string `protobuf:"bytes,3,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"` Nickname string `protobuf:"bytes,4,opt,name=nickname,proto3" json:"nickname,omitempty"` Email string `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"` Country string `protobuf:"bytes,6,opt,name=country,proto3" json:"country,omitempty"` CreatedAt string `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt string `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetCountry ¶
func (*User) GetCreatedAt ¶
func (*User) GetFirstName ¶
func (*User) GetLastName ¶
func (*User) GetNickname ¶
func (*User) GetUpdatedAt ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserCreation ¶
type UserCreation struct { FirstName string `protobuf:"bytes,1,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"` LastName string `protobuf:"bytes,2,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"` Nickname string `protobuf:"bytes,3,opt,name=nickname,proto3" json:"nickname,omitempty"` Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` Email string `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"` Country string `protobuf:"bytes,6,opt,name=country,proto3" json:"country,omitempty"` // contains filtered or unexported fields }
func (*UserCreation) Descriptor
deprecated
func (*UserCreation) Descriptor() ([]byte, []int)
Deprecated: Use UserCreation.ProtoReflect.Descriptor instead.
func (*UserCreation) GetCountry ¶
func (x *UserCreation) GetCountry() string
func (*UserCreation) GetEmail ¶
func (x *UserCreation) GetEmail() string
func (*UserCreation) GetFirstName ¶
func (x *UserCreation) GetFirstName() string
func (*UserCreation) GetLastName ¶
func (x *UserCreation) GetLastName() string
func (*UserCreation) GetNickname ¶
func (x *UserCreation) GetNickname() string
func (*UserCreation) GetPassword ¶
func (x *UserCreation) GetPassword() string
func (*UserCreation) ProtoMessage ¶
func (*UserCreation) ProtoMessage()
func (*UserCreation) ProtoReflect ¶
func (x *UserCreation) ProtoReflect() protoreflect.Message
func (*UserCreation) Reset ¶
func (x *UserCreation) Reset()
func (*UserCreation) String ¶
func (x *UserCreation) String() string
type UserCreationResponse ¶
type UserCreationResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*UserCreationResponse) Descriptor
deprecated
func (*UserCreationResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserCreationResponse.ProtoReflect.Descriptor instead.
func (*UserCreationResponse) GetId ¶
func (x *UserCreationResponse) GetId() string
func (*UserCreationResponse) ProtoMessage ¶
func (*UserCreationResponse) ProtoMessage()
func (*UserCreationResponse) ProtoReflect ¶
func (x *UserCreationResponse) ProtoReflect() protoreflect.Message
func (*UserCreationResponse) Reset ¶
func (x *UserCreationResponse) Reset()
func (*UserCreationResponse) String ¶
func (x *UserCreationResponse) String() string
type UserFilter ¶
type UserFilter struct { FirstName string `protobuf:"bytes,1,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"` LastName string `protobuf:"bytes,2,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"` Nickname string `protobuf:"bytes,3,opt,name=nickname,proto3" json:"nickname,omitempty"` Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` Country string `protobuf:"bytes,5,opt,name=country,proto3" json:"country,omitempty"` Offset int32 `protobuf:"varint,6,opt,name=offset,proto3" json:"offset,omitempty"` Limit int32 `protobuf:"varint,7,opt,name=limit,proto3" json:"limit,omitempty"` // contains filtered or unexported fields }
func (*UserFilter) Descriptor
deprecated
func (*UserFilter) Descriptor() ([]byte, []int)
Deprecated: Use UserFilter.ProtoReflect.Descriptor instead.
func (*UserFilter) GetCountry ¶
func (x *UserFilter) GetCountry() string
func (*UserFilter) GetEmail ¶
func (x *UserFilter) GetEmail() string
func (*UserFilter) GetFirstName ¶
func (x *UserFilter) GetFirstName() string
func (*UserFilter) GetLastName ¶
func (x *UserFilter) GetLastName() string
func (*UserFilter) GetLimit ¶
func (x *UserFilter) GetLimit() int32
func (*UserFilter) GetNickname ¶
func (x *UserFilter) GetNickname() string
func (*UserFilter) GetOffset ¶
func (x *UserFilter) GetOffset() int32
func (*UserFilter) ProtoMessage ¶
func (*UserFilter) ProtoMessage()
func (*UserFilter) ProtoReflect ¶
func (x *UserFilter) ProtoReflect() protoreflect.Message
func (*UserFilter) Reset ¶
func (x *UserFilter) Reset()
func (*UserFilter) String ¶
func (x *UserFilter) String() string
type UserId ¶
type UserId struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"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 UserServiceClient ¶
type UserServiceClient interface { CreateUser(ctx context.Context, in *UserCreation, opts ...grpc.CallOption) (*UserCreationResponse, error) GetUsers(ctx context.Context, in *UserFilter, opts ...grpc.CallOption) (UserService_GetUsersClient, error) GetUserById(ctx context.Context, in *UserId, opts ...grpc.CallOption) (*User, error) UpdateUser(ctx context.Context, in *UserUpdate, opts ...grpc.CallOption) (*Empty, error) DeleteUser(ctx context.Context, in *UserId, opts ...grpc.CallOption) (*Empty, 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 UserServiceServer ¶
type UserServiceServer interface { CreateUser(context.Context, *UserCreation) (*UserCreationResponse, error) GetUsers(*UserFilter, UserService_GetUsersServer) error GetUserById(context.Context, *UserId) (*User, error) UpdateUser(context.Context, *UserUpdate) (*Empty, error) DeleteUser(context.Context, *UserId) (*Empty, error) // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility
type UserService_GetUsersClient ¶
type UserService_GetUsersClient interface { Recv() (*User, error) grpc.ClientStream }
type UserService_GetUsersServer ¶
type UserService_GetUsersServer interface { Send(*User) error grpc.ServerStream }
type UserUpdate ¶
type UserUpdate struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` FirstName string `protobuf:"bytes,2,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"` LastName string `protobuf:"bytes,3,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"` Nickname string `protobuf:"bytes,4,opt,name=nickname,proto3" json:"nickname,omitempty"` Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"` Email string `protobuf:"bytes,6,opt,name=email,proto3" json:"email,omitempty"` Country string `protobuf:"bytes,7,opt,name=country,proto3" json:"country,omitempty"` // contains filtered or unexported fields }
func (*UserUpdate) Descriptor
deprecated
func (*UserUpdate) Descriptor() ([]byte, []int)
Deprecated: Use UserUpdate.ProtoReflect.Descriptor instead.
func (*UserUpdate) GetCountry ¶
func (x *UserUpdate) GetCountry() string
func (*UserUpdate) GetEmail ¶
func (x *UserUpdate) GetEmail() string
func (*UserUpdate) GetFirstName ¶
func (x *UserUpdate) GetFirstName() string
func (*UserUpdate) GetId ¶
func (x *UserUpdate) GetId() string
func (*UserUpdate) GetLastName ¶
func (x *UserUpdate) GetLastName() string
func (*UserUpdate) GetNickname ¶
func (x *UserUpdate) GetNickname() string
func (*UserUpdate) GetPassword ¶
func (x *UserUpdate) GetPassword() string
func (*UserUpdate) ProtoMessage ¶
func (*UserUpdate) ProtoMessage()
func (*UserUpdate) ProtoReflect ¶
func (x *UserUpdate) ProtoReflect() protoreflect.Message
func (*UserUpdate) Reset ¶
func (x *UserUpdate) Reset()
func (*UserUpdate) String ¶
func (x *UserUpdate) String() string