user

package
v0.0.25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserService_Create_FullMethodName              = "/user.UserService/Create"
	UserService_FindByEmail_FullMethodName         = "/user.UserService/FindByEmail"
	UserService_FindByRefreshToken_FullMethodName  = "/user.UserService/FindByRefreshToken"
	UserService_Upsert_FullMethodName              = "/user.UserService/Upsert"
	UserService_AddRefreshToken_FullMethodName     = "/user.UserService/AddRefreshToken"
	UserService_SetNullRefreshToken_FullMethodName = "/user.UserService/SetNullRefreshToken"
)

Variables

View Source
var File_proto_user_service_proto protoreflect.FileDescriptor
View Source
var File_proto_user_type_login_google_proto protoreflect.FileDescriptor
View Source
var File_proto_user_type_register_request_proto protoreflect.FileDescriptor
View Source
var File_proto_user_type_token_proto protoreflect.FileDescriptor
View Source
var File_proto_user_type_user_proto protoreflect.FileDescriptor
View Source
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "user.UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _UserService_Create_Handler,
		},
		{
			MethodName: "FindByEmail",
			Handler:    _UserService_FindByEmail_Handler,
		},
		{
			MethodName: "FindByRefreshToken",
			Handler:    _UserService_FindByRefreshToken_Handler,
		},
		{
			MethodName: "Upsert",
			Handler:    _UserService_Upsert_Handler,
		},
		{
			MethodName: "AddRefreshToken",
			Handler:    _UserService_AddRefreshToken_Handler,
		},
		{
			MethodName: "SetNullRefreshToken",
			Handler:    _UserService_SetNullRefreshToken_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 AddRefreshToken added in v0.0.16

type AddRefreshToken struct {
	Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*AddRefreshToken) Descriptor deprecated added in v0.0.16

func (*AddRefreshToken) Descriptor() ([]byte, []int)

Deprecated: Use AddRefreshToken.ProtoReflect.Descriptor instead.

func (*AddRefreshToken) GetEmail added in v0.0.16

func (x *AddRefreshToken) GetEmail() string

func (*AddRefreshToken) GetToken added in v0.0.16

func (x *AddRefreshToken) GetToken() string

func (*AddRefreshToken) ProtoMessage added in v0.0.16

func (*AddRefreshToken) ProtoMessage()

func (*AddRefreshToken) ProtoReflect added in v0.0.16

func (x *AddRefreshToken) ProtoReflect() protoreflect.Message

func (*AddRefreshToken) Reset added in v0.0.16

func (x *AddRefreshToken) Reset()

func (*AddRefreshToken) String added in v0.0.16

func (x *AddRefreshToken) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Email.ProtoReflect.Descriptor instead.

func (*Email) GetEmail

func (x *Email) GetEmail() string

func (*Email) ProtoMessage

func (*Email) ProtoMessage()

func (*Email) ProtoReflect

func (x *Email) ProtoReflect() protoreflect.Message

func (*Email) Reset

func (x *Email) Reset()

func (*Email) String

func (x *Email) String() string

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 {
	UserId       string `protobuf:"bytes,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"`
	PhotoProfile string `protobuf:"bytes,4,opt,name=photo_profile,proto3" json:"photo_profile,omitempty"`
	RefreshToken string `protobuf:"bytes,5,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) GetUserId added in v0.0.10

func (x *LoginWithGoogleRequest) GetUserId() 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 RefreshToken added in v0.0.13

type RefreshToken struct {
	Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*RefreshToken) Descriptor deprecated added in v0.0.13

func (*RefreshToken) Descriptor() ([]byte, []int)

Deprecated: Use RefreshToken.ProtoReflect.Descriptor instead.

func (*RefreshToken) GetToken added in v0.0.13

func (x *RefreshToken) GetToken() string

func (*RefreshToken) ProtoMessage added in v0.0.13

func (*RefreshToken) ProtoMessage()

func (*RefreshToken) ProtoReflect added in v0.0.13

func (x *RefreshToken) ProtoReflect() protoreflect.Message

func (*RefreshToken) Reset added in v0.0.13

func (x *RefreshToken) Reset()

func (*RefreshToken) String added in v0.0.13

func (x *RefreshToken) String() string

type RegisterRequest

type RegisterRequest struct {
	UserId   string `protobuf:"bytes,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"`
	Password string `protobuf:"bytes,4,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) GetUserId added in v0.0.10

func (x *RegisterRequest) GetUserId() 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) AddRefreshToken added in v0.0.13

func (UnimplementedUserServiceServer) Create

func (UnimplementedUserServiceServer) FindByEmail

func (UnimplementedUserServiceServer) FindByRefreshToken added in v0.0.15

func (UnimplementedUserServiceServer) SetNullRefreshToken added in v0.0.16

func (UnimplementedUserServiceServer) Upsert added in v0.0.11

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"`
	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) Descriptor() ([]byte, []int)

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetCreatedAt

func (x *User) GetCreatedAt() *timestamppb.Timestamp

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetFullName

func (x *User) GetFullName() string

func (*User) GetPassword

func (x *User) GetPassword() string

func (*User) GetPhotoProfile

func (x *User) GetPhotoProfile() string

func (*User) GetRefreshToken

func (x *User) GetRefreshToken() string

func (*User) GetRole

func (x *User) GetRole() string

func (*User) GetUpdatedAt

func (x *User) GetUpdatedAt() *timestamppb.Timestamp

func (*User) GetUserId

func (x *User) GetUserId() string

func (*User) GetWhatsapp

func (x *User) GetWhatsapp() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

func (x *User) ProtoReflect() protoreflect.Message

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

type UserServiceClient

type UserServiceClient interface {
	Create(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	FindByEmail(ctx context.Context, in *Email, opts ...grpc.CallOption) (*FindUserResponse, error)
	FindByRefreshToken(ctx context.Context, in *RefreshToken, opts ...grpc.CallOption) (*FindUserResponse, error)
	Upsert(ctx context.Context, in *LoginWithGoogleRequest, opts ...grpc.CallOption) (*User, error)
	AddRefreshToken(ctx context.Context, in *AddRefreshToken, opts ...grpc.CallOption) (*emptypb.Empty, error)
	SetNullRefreshToken(ctx context.Context, in *RefreshToken, 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.

type UserServiceServer

type UserServiceServer interface {
	Create(context.Context, *RegisterRequest) (*emptypb.Empty, error)
	FindByEmail(context.Context, *Email) (*FindUserResponse, error)
	FindByRefreshToken(context.Context, *RefreshToken) (*FindUserResponse, error)
	Upsert(context.Context, *LoginWithGoogleRequest) (*User, error)
	AddRefreshToken(context.Context, *AddRefreshToken) (*emptypb.Empty, error)
	SetNullRefreshToken(context.Context, *RefreshToken) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL