Documentation ¶
Index ¶
- Variables
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type AuthUser
- func (*AuthUser) Descriptor() ([]byte, []int)deprecated
- func (x *AuthUser) GetAccessToken() string
- func (x *AuthUser) GetEmail() string
- func (x *AuthUser) GetFirstname() string
- func (x *AuthUser) GetId() string
- func (x *AuthUser) GetLastname() string
- func (x *AuthUser) GetPhoneNumber() string
- func (*AuthUser) ProtoMessage()
- func (x *AuthUser) ProtoReflect() protoreflect.Message
- func (x *AuthUser) Reset()
- func (x *AuthUser) String() string
- type ChatMessage
- type NoParams
- type Params
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) Chat(UserService_ChatServer) error
- func (UnimplementedUserServiceServer) CreateUser(context.Context, *UserParams) (*AuthUser, error)
- func (UnimplementedUserServiceServer) DeleteUser(context.Context, *UserId) (*User, error)
- func (UnimplementedUserServiceServer) FetchUsers(*NoParams, UserService_FetchUsersServer) error
- func (UnimplementedUserServiceServer) FindUser(context.Context, *UserId) (*User, error)
- func (UnimplementedUserServiceServer) FindUsers(context.Context, *NoParams) (*Users, error)
- func (UnimplementedUserServiceServer) VerifyUsers(UserService_VerifyUsersServer) error
- type UnsafeUserServiceServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetEmail() string
- func (x *User) GetFirstname() string
- func (x *User) GetId() string
- func (x *User) GetLastname() string
- func (x *User) GetPhoneNumber() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserId
- type UserParams
- func (*UserParams) Descriptor() ([]byte, []int)deprecated
- func (x *UserParams) GetEmail() string
- func (x *UserParams) GetFirstname() string
- func (x *UserParams) GetLastname() string
- func (x *UserParams) GetPassword() string
- func (x *UserParams) GetPhoneNumber() string
- func (*UserParams) ProtoMessage()
- func (x *UserParams) ProtoReflect() protoreflect.Message
- func (x *UserParams) Reset()
- func (x *UserParams) String() string
- type UserServiceClient
- type UserServiceServer
- type UserService_ChatClient
- type UserService_ChatServer
- type UserService_FetchUsersClient
- type UserService_FetchUsersServer
- type UserService_VerifyUsersClient
- type UserService_VerifyUsersServer
- type Users
- type VerificationResponse
- func (*VerificationResponse) Descriptor() ([]byte, []int)deprecated
- func (x *VerificationResponse) GetMessage() string
- func (*VerificationResponse) ProtoMessage()
- func (x *VerificationResponse) ProtoReflect() protoreflect.Message
- func (x *VerificationResponse) Reset()
- func (x *VerificationResponse) String() string
Constants ¶
This section is empty.
Variables ¶
var File_proto_user_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "user_service.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateUser", Handler: _UserService_CreateUser_Handler, }, { MethodName: "FindUsers", Handler: _UserService_FindUsers_Handler, }, { MethodName: "FindUser", Handler: _UserService_FindUser_Handler, }, { MethodName: "DeleteUser", Handler: _UserService_DeleteUser_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "FetchUsers", Handler: _UserService_FetchUsers_Handler, ServerStreams: true, }, { StreamName: "VerifyUsers", Handler: _UserService_VerifyUsers_Handler, ClientStreams: true, }, { StreamName: "Chat", Handler: _UserService_Chat_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "proto/user.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 AuthUser ¶
type AuthUser struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Firstname string `protobuf:"bytes,2,opt,name=firstname,proto3" json:"firstname,omitempty"` Lastname string `protobuf:"bytes,3,opt,name=lastname,proto3" json:"lastname,omitempty"` PhoneNumber *string `protobuf:"bytes,4,opt,name=phoneNumber,proto3,oneof" json:"phoneNumber,omitempty"` Email string `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"` AccessToken string `protobuf:"bytes,6,opt,name=accessToken,proto3" json:"accessToken,omitempty"` // contains filtered or unexported fields }
func (*AuthUser) Descriptor
deprecated
func (*AuthUser) GetAccessToken ¶
func (*AuthUser) GetFirstname ¶
func (*AuthUser) GetLastname ¶
func (*AuthUser) GetPhoneNumber ¶
func (*AuthUser) ProtoMessage ¶
func (*AuthUser) ProtoMessage()
func (*AuthUser) ProtoReflect ¶
func (x *AuthUser) ProtoReflect() protoreflect.Message
type ChatMessage ¶
type ChatMessage struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*ChatMessage) Descriptor
deprecated
func (*ChatMessage) Descriptor() ([]byte, []int)
Deprecated: Use ChatMessage.ProtoReflect.Descriptor instead.
func (*ChatMessage) GetMessage ¶
func (x *ChatMessage) GetMessage() string
func (*ChatMessage) ProtoMessage ¶
func (*ChatMessage) ProtoMessage()
func (*ChatMessage) ProtoReflect ¶
func (x *ChatMessage) ProtoReflect() protoreflect.Message
func (*ChatMessage) Reset ¶
func (x *ChatMessage) Reset()
func (*ChatMessage) String ¶
func (x *ChatMessage) String() string
type NoParams ¶
type NoParams struct {
// contains filtered or unexported fields
}
func (*NoParams) Descriptor
deprecated
func (*NoParams) ProtoMessage ¶
func (*NoParams) ProtoMessage()
func (*NoParams) ProtoReflect ¶
func (x *NoParams) ProtoReflect() protoreflect.Message
type Params ¶
type Params struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*Params) Descriptor
deprecated
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) ProtoReflect ¶
func (x *Params) ProtoReflect() protoreflect.Message
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) Chat ¶
func (UnimplementedUserServiceServer) Chat(UserService_ChatServer) error
func (UnimplementedUserServiceServer) CreateUser ¶
func (UnimplementedUserServiceServer) CreateUser(context.Context, *UserParams) (*AuthUser, error)
func (UnimplementedUserServiceServer) DeleteUser ¶
func (UnimplementedUserServiceServer) FetchUsers ¶
func (UnimplementedUserServiceServer) FetchUsers(*NoParams, UserService_FetchUsersServer) error
func (UnimplementedUserServiceServer) VerifyUsers ¶
func (UnimplementedUserServiceServer) VerifyUsers(UserService_VerifyUsersServer) 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=firstname,proto3" json:"firstname,omitempty"` Lastname string `protobuf:"bytes,3,opt,name=lastname,proto3" json:"lastname,omitempty"` PhoneNumber *string `protobuf:"bytes,4,opt,name=phoneNumber,proto3,oneof" json:"phoneNumber,omitempty"` Email string `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetFirstname ¶
func (*User) GetLastname ¶
func (*User) GetPhoneNumber ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
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 UserParams ¶
type UserParams struct { Firstname string `protobuf:"bytes,1,opt,name=firstname,proto3" json:"firstname,omitempty"` Lastname string `protobuf:"bytes,2,opt,name=lastname,proto3" json:"lastname,omitempty"` PhoneNumber *string `protobuf:"bytes,3,opt,name=phoneNumber,proto3,oneof" json:"phoneNumber,omitempty"` Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*UserParams) Descriptor
deprecated
func (*UserParams) Descriptor() ([]byte, []int)
Deprecated: Use UserParams.ProtoReflect.Descriptor instead.
func (*UserParams) GetEmail ¶
func (x *UserParams) GetEmail() string
func (*UserParams) GetFirstname ¶
func (x *UserParams) GetFirstname() string
func (*UserParams) GetLastname ¶
func (x *UserParams) GetLastname() string
func (*UserParams) GetPassword ¶
func (x *UserParams) GetPassword() string
func (*UserParams) GetPhoneNumber ¶
func (x *UserParams) GetPhoneNumber() string
func (*UserParams) ProtoMessage ¶
func (*UserParams) ProtoMessage()
func (*UserParams) ProtoReflect ¶
func (x *UserParams) ProtoReflect() protoreflect.Message
func (*UserParams) Reset ¶
func (x *UserParams) Reset()
func (*UserParams) String ¶
func (x *UserParams) String() string
type UserServiceClient ¶
type UserServiceClient interface { CreateUser(ctx context.Context, in *UserParams, opts ...grpc.CallOption) (*AuthUser, error) FindUsers(ctx context.Context, in *NoParams, opts ...grpc.CallOption) (*Users, error) FetchUsers(ctx context.Context, in *NoParams, opts ...grpc.CallOption) (UserService_FetchUsersClient, error) VerifyUsers(ctx context.Context, opts ...grpc.CallOption) (UserService_VerifyUsersClient, error) FindUser(ctx context.Context, in *UserId, opts ...grpc.CallOption) (*User, error) DeleteUser(ctx context.Context, in *UserId, opts ...grpc.CallOption) (*User, error) Chat(ctx context.Context, opts ...grpc.CallOption) (UserService_ChatClient, error) }
UserServiceClient is the client API for UserService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.golang.ir/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface { CreateUser(context.Context, *UserParams) (*AuthUser, error) FindUsers(context.Context, *NoParams) (*Users, error) FetchUsers(*NoParams, UserService_FetchUsersServer) error VerifyUsers(UserService_VerifyUsersServer) error FindUser(context.Context, *UserId) (*User, error) DeleteUser(context.Context, *UserId) (*User, error) Chat(UserService_ChatServer) error // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility
type UserService_ChatClient ¶
type UserService_ChatClient interface { Send(*ChatMessage) error Recv() (*ChatMessage, error) grpc.ClientStream }
type UserService_ChatServer ¶
type UserService_ChatServer interface { Send(*ChatMessage) error Recv() (*ChatMessage, error) grpc.ServerStream }
type UserService_FetchUsersClient ¶
type UserService_FetchUsersClient interface { Recv() (*User, error) grpc.ClientStream }
type UserService_FetchUsersServer ¶
type UserService_FetchUsersServer interface { Send(*User) error grpc.ServerStream }
type UserService_VerifyUsersClient ¶
type UserService_VerifyUsersClient interface { Send(*Params) error CloseAndRecv() (*VerificationResponse, error) grpc.ClientStream }
type UserService_VerifyUsersServer ¶
type UserService_VerifyUsersServer interface { SendAndClose(*VerificationResponse) error Recv() (*Params, error) grpc.ServerStream }
type Users ¶
type Users struct { Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` // contains filtered or unexported fields }
func (*Users) Descriptor
deprecated
func (*Users) ProtoMessage ¶
func (*Users) ProtoMessage()
func (*Users) ProtoReflect ¶
func (x *Users) ProtoReflect() protoreflect.Message
type VerificationResponse ¶
type VerificationResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*VerificationResponse) Descriptor
deprecated
func (*VerificationResponse) Descriptor() ([]byte, []int)
Deprecated: Use VerificationResponse.ProtoReflect.Descriptor instead.
func (*VerificationResponse) GetMessage ¶
func (x *VerificationResponse) GetMessage() string
func (*VerificationResponse) ProtoMessage ¶
func (*VerificationResponse) ProtoMessage()
func (*VerificationResponse) ProtoReflect ¶
func (x *VerificationResponse) ProtoReflect() protoreflect.Message
func (*VerificationResponse) Reset ¶
func (x *VerificationResponse) Reset()
func (*VerificationResponse) String ¶
func (x *VerificationResponse) String() string