Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type CreateRequest
- func (*CreateRequest) Descriptor() ([]byte, []int)deprecated
- func (m *CreateRequest) GetData() isCreateRequest_Data
- func (x *CreateRequest) GetLoginWithGoogle() *LoginWithGoogleRequest
- func (x *CreateRequest) GetRegister() *RegisterRequest
- func (*CreateRequest) ProtoMessage()
- func (x *CreateRequest) ProtoReflect() protoreflect.Message
- func (x *CreateRequest) Reset()
- func (x *CreateRequest) String() string
- type CreateRequest_LoginWithGoogle
- type CreateRequest_Register
- type Email
- type FindUserResponse
- type LoginWithGoogleRequest
- func (*LoginWithGoogleRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginWithGoogleRequest) GetEmail() string
- func (x *LoginWithGoogleRequest) GetFullName() string
- func (x *LoginWithGoogleRequest) GetPhotoProfile() string
- func (x *LoginWithGoogleRequest) GetRefreshToken() string
- func (*LoginWithGoogleRequest) ProtoMessage()
- func (x *LoginWithGoogleRequest) ProtoReflect() protoreflect.Message
- func (x *LoginWithGoogleRequest) Reset()
- func (x *LoginWithGoogleRequest) String() string
- type RegisterRequest
- func (*RegisterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterRequest) GetEmail() string
- func (x *RegisterRequest) GetFullName() string
- func (x *RegisterRequest) GetPassword() string
- func (*RegisterRequest) ProtoMessage()
- func (x *RegisterRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterRequest) Reset()
- func (x *RegisterRequest) String() string
- type UnimplementedUserServiceServer
- type UnsafeUserServiceServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetCreatedAt() *timestamppb.Timestamp
- func (x *User) GetEmail() string
- func (x *User) GetFullName() string
- func (x *User) GetPassword() string
- func (x *User) GetPhotoProfile() string
- func (x *User) GetRefreshToken() string
- func (x *User) GetRole() string
- func (x *User) GetUpdatedAt() *timestamppb.Timestamp
- func (x *User) GetUserId() uint32
- func (x *User) GetWhatsapp() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserServiceClient
- type UserServiceServer
Constants ¶
const ( UserService_FindByEmail_FullMethodName = "/user.UserService/FindByEmail" UserService_Create_FullMethodName = "/user.UserService/Create" )
Variables ¶
var File_proto_user_service_proto protoreflect.FileDescriptor
var File_proto_user_type_login_google_proto protoreflect.FileDescriptor
var File_proto_user_type_register_request_proto protoreflect.FileDescriptor
var File_proto_user_type_user_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "user.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "FindByEmail", Handler: _UserService_FindByEmail_Handler, }, { MethodName: "Create", Handler: _UserService_Create_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/user/service.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 CreateRequest ¶
type CreateRequest struct { // Types that are assignable to Data: // // *CreateRequest_Register // *CreateRequest_LoginWithGoogle Data isCreateRequest_Data `protobuf_oneof:"data"` // contains filtered or unexported fields }
func (*CreateRequest) Descriptor
deprecated
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
func (*CreateRequest) GetData ¶
func (m *CreateRequest) GetData() isCreateRequest_Data
func (*CreateRequest) GetLoginWithGoogle ¶
func (x *CreateRequest) GetLoginWithGoogle() *LoginWithGoogleRequest
func (*CreateRequest) GetRegister ¶
func (x *CreateRequest) GetRegister() *RegisterRequest
func (*CreateRequest) ProtoMessage ¶
func (*CreateRequest) ProtoMessage()
func (*CreateRequest) ProtoReflect ¶
func (x *CreateRequest) ProtoReflect() protoreflect.Message
func (*CreateRequest) Reset ¶
func (x *CreateRequest) Reset()
func (*CreateRequest) String ¶
func (x *CreateRequest) String() string
type CreateRequest_LoginWithGoogle ¶
type CreateRequest_LoginWithGoogle struct {
LoginWithGoogle *LoginWithGoogleRequest `protobuf:"bytes,2,opt,name=loginWithGoogle,proto3,oneof"`
}
type CreateRequest_Register ¶
type CreateRequest_Register struct {
Register *RegisterRequest `protobuf:"bytes,1,opt,name=Register,proto3,oneof"`
}
type Email ¶
type Email struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func (*Email) Descriptor
deprecated
func (*Email) ProtoMessage ¶
func (*Email) ProtoMessage()
func (*Email) ProtoReflect ¶
func (x *Email) ProtoReflect() protoreflect.Message
type FindUserResponse ¶
type FindUserResponse struct { Data *User `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*FindUserResponse) Descriptor
deprecated
func (*FindUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use FindUserResponse.ProtoReflect.Descriptor instead.
func (*FindUserResponse) GetData ¶
func (x *FindUserResponse) GetData() *User
func (*FindUserResponse) ProtoMessage ¶
func (*FindUserResponse) ProtoMessage()
func (*FindUserResponse) ProtoReflect ¶
func (x *FindUserResponse) ProtoReflect() protoreflect.Message
func (*FindUserResponse) Reset ¶
func (x *FindUserResponse) Reset()
func (*FindUserResponse) String ¶
func (x *FindUserResponse) String() string
type LoginWithGoogleRequest ¶ added in v0.0.9
type LoginWithGoogleRequest struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` FullName string `protobuf:"bytes,2,opt,name=full_name,proto3" json:"full_name,omitempty"` PhotoProfile string `protobuf:"bytes,3,opt,name=photo_profile,proto3" json:"photo_profile,omitempty"` RefreshToken string `protobuf:"bytes,4,opt,name=refresh_token,proto3" json:"refresh_token,omitempty"` // contains filtered or unexported fields }
func (*LoginWithGoogleRequest) Descriptor
deprecated
added in
v0.0.9
func (*LoginWithGoogleRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginWithGoogleRequest.ProtoReflect.Descriptor instead.
func (*LoginWithGoogleRequest) GetEmail ¶ added in v0.0.9
func (x *LoginWithGoogleRequest) GetEmail() string
func (*LoginWithGoogleRequest) GetFullName ¶ added in v0.0.9
func (x *LoginWithGoogleRequest) GetFullName() string
func (*LoginWithGoogleRequest) GetPhotoProfile ¶ added in v0.0.9
func (x *LoginWithGoogleRequest) GetPhotoProfile() string
func (*LoginWithGoogleRequest) GetRefreshToken ¶ added in v0.0.9
func (x *LoginWithGoogleRequest) GetRefreshToken() string
func (*LoginWithGoogleRequest) ProtoMessage ¶ added in v0.0.9
func (*LoginWithGoogleRequest) ProtoMessage()
func (*LoginWithGoogleRequest) ProtoReflect ¶ added in v0.0.9
func (x *LoginWithGoogleRequest) ProtoReflect() protoreflect.Message
func (*LoginWithGoogleRequest) Reset ¶ added in v0.0.9
func (x *LoginWithGoogleRequest) Reset()
func (*LoginWithGoogleRequest) String ¶ added in v0.0.9
func (x *LoginWithGoogleRequest) String() string
type RegisterRequest ¶
type RegisterRequest struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` FullName string `protobuf:"bytes,2,opt,name=full_name,proto3" json:"full_name,omitempty"` Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*RegisterRequest) Descriptor
deprecated
func (*RegisterRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.
func (*RegisterRequest) GetEmail ¶
func (x *RegisterRequest) GetEmail() string
func (*RegisterRequest) GetFullName ¶
func (x *RegisterRequest) GetFullName() string
func (*RegisterRequest) GetPassword ¶
func (x *RegisterRequest) GetPassword() string
func (*RegisterRequest) ProtoMessage ¶
func (*RegisterRequest) ProtoMessage()
func (*RegisterRequest) ProtoReflect ¶
func (x *RegisterRequest) ProtoReflect() protoreflect.Message
func (*RegisterRequest) Reset ¶
func (x *RegisterRequest) Reset()
func (*RegisterRequest) String ¶
func (x *RegisterRequest) String() string
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) Create ¶
func (UnimplementedUserServiceServer) Create(context.Context, *CreateRequest) (*emptypb.Empty, error)
func (UnimplementedUserServiceServer) FindByEmail ¶
func (UnimplementedUserServiceServer) FindByEmail(context.Context, *Email) (*FindUserResponse, 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 { UserId uint32 `protobuf:"varint,1,opt,name=user_id,proto3" json:"user_id,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` FullName string `protobuf:"bytes,3,opt,name=full_name,proto3" json:"full_name,omitempty"` Whatsapp string `protobuf:"bytes,4,opt,name=whatsapp,proto3" json:"whatsapp,omitempty"` PhotoProfile string `protobuf:"bytes,5,opt,name=photo_profile,proto3" json:"photo_profile,omitempty"` Password string `protobuf:"bytes,6,opt,name=password,proto3" json:"password,omitempty"` RefreshToken string `protobuf:"bytes,7,opt,name=refresh_token,proto3" json:"refresh_token,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_at,proto3" json:"created_at,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=updated_at,proto3" json:"updated_at,omitempty"` Role string `protobuf:"bytes,10,opt,name=role,proto3" json:"role,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetCreatedAt ¶
func (x *User) GetCreatedAt() *timestamppb.Timestamp
func (*User) GetFullName ¶
func (*User) GetPassword ¶
func (*User) GetPhotoProfile ¶
func (*User) GetRefreshToken ¶
func (*User) GetUpdatedAt ¶
func (x *User) GetUpdatedAt() *timestamppb.Timestamp
func (*User) GetWhatsapp ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserServiceClient ¶
type UserServiceClient interface { FindByEmail(ctx context.Context, in *Email, opts ...grpc.CallOption) (*FindUserResponse, error) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*emptypb.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 { FindByEmail(context.Context, *Email) (*FindUserResponse, error) Create(context.Context, *CreateRequest) (*emptypb.Empty, error) // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility