Documentation ¶
Index ¶
- Variables
- func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
- type AuthServiceClient
- type AuthServiceServer
- type RefreshTokensRequest
- func (*RefreshTokensRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RefreshTokensRequest) GetIp() string
- func (x *RefreshTokensRequest) GetRefreshToken() string
- func (*RefreshTokensRequest) ProtoMessage()
- func (x *RefreshTokensRequest) ProtoReflect() protoreflect.Message
- func (x *RefreshTokensRequest) Reset()
- func (x *RefreshTokensRequest) String() string
- type RefreshTokensResponse
- func (*RefreshTokensResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RefreshTokensResponse) GetAccessToken() string
- func (x *RefreshTokensResponse) GetRefreshToken() string
- func (*RefreshTokensResponse) ProtoMessage()
- func (x *RefreshTokensResponse) ProtoReflect() protoreflect.Message
- func (x *RefreshTokensResponse) Reset()
- func (x *RefreshTokensResponse) String() string
- type SignInRequest
- func (*SignInRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SignInRequest) GetIp() string
- func (x *SignInRequest) GetPassword() string
- func (x *SignInRequest) GetUsername() string
- func (*SignInRequest) ProtoMessage()
- func (x *SignInRequest) ProtoReflect() protoreflect.Message
- func (x *SignInRequest) Reset()
- func (x *SignInRequest) String() string
- type SignInResponse
- func (*SignInResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SignInResponse) GetAccessToken() string
- func (x *SignInResponse) GetRefreshToken() string
- func (*SignInResponse) ProtoMessage()
- func (x *SignInResponse) ProtoReflect() protoreflect.Message
- func (x *SignInResponse) Reset()
- func (x *SignInResponse) String() string
- type SignUpRequest
- func (*SignUpRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SignUpRequest) GetBirthday() *timestamppb.Timestamp
- func (x *SignUpRequest) GetEmail() string
- func (x *SignUpRequest) GetName() string
- func (x *SignUpRequest) GetPassword() string
- func (x *SignUpRequest) GetSex() int32
- func (x *SignUpRequest) GetUsername() string
- func (*SignUpRequest) ProtoMessage()
- func (x *SignUpRequest) ProtoReflect() protoreflect.Message
- func (x *SignUpRequest) Reset()
- func (x *SignUpRequest) String() string
- type UnimplementedAuthServiceServer
- func (UnimplementedAuthServiceServer) GetCode(context.Context, *types.ID) (*types.Status, error)
- func (UnimplementedAuthServiceServer) RefreshTokens(context.Context, *RefreshTokensRequest) (*RefreshTokensResponse, error)
- func (UnimplementedAuthServiceServer) SignIn(context.Context, *SignInRequest) (*SignInResponse, error)
- func (UnimplementedAuthServiceServer) SignUp(context.Context, *SignUpRequest) (*types.ID, error)
- func (UnimplementedAuthServiceServer) Verify(context.Context, *VerifyRequest) (*types.Status, error)
- type UnsafeAuthServiceServer
- type VerifyRequest
- func (*VerifyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *VerifyRequest) GetCode() uint64
- func (x *VerifyRequest) GetId() uint64
- func (*VerifyRequest) ProtoMessage()
- func (x *VerifyRequest) ProtoReflect() protoreflect.Message
- func (x *VerifyRequest) Reset()
- func (x *VerifyRequest) String() string
Constants ¶
This section is empty.
Variables ¶
var AuthService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "durudex.auth.AuthService", HandlerType: (*AuthServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SignUp", Handler: _AuthService_SignUp_Handler, }, { MethodName: "SignIn", Handler: _AuthService_SignIn_Handler, }, { MethodName: "Verify", Handler: _AuthService_Verify_Handler, }, { MethodName: "GetCode", Handler: _AuthService_GetCode_Handler, }, { MethodName: "RefreshTokens", Handler: _AuthService_RefreshTokens_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "internal/delivery/grpc/pb/auth.proto", }
AuthService_ServiceDesc is the grpc.ServiceDesc for AuthService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_internal_delivery_grpc_pb_auth_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuthServiceServer ¶
func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
Types ¶
type AuthServiceClient ¶
type AuthServiceClient interface { SignUp(ctx context.Context, in *SignUpRequest, opts ...grpc.CallOption) (*types.ID, error) SignIn(ctx context.Context, in *SignInRequest, opts ...grpc.CallOption) (*SignInResponse, error) Verify(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*types.Status, error) GetCode(ctx context.Context, in *types.ID, opts ...grpc.CallOption) (*types.Status, error) RefreshTokens(ctx context.Context, in *RefreshTokensRequest, opts ...grpc.CallOption) (*RefreshTokensResponse, error) }
AuthServiceClient is the client API for AuthService 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 NewAuthServiceClient ¶
func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient
type AuthServiceServer ¶
type AuthServiceServer interface { SignUp(context.Context, *SignUpRequest) (*types.ID, error) SignIn(context.Context, *SignInRequest) (*SignInResponse, error) Verify(context.Context, *VerifyRequest) (*types.Status, error) GetCode(context.Context, *types.ID) (*types.Status, error) RefreshTokens(context.Context, *RefreshTokensRequest) (*RefreshTokensResponse, error) // contains filtered or unexported methods }
AuthServiceServer is the server API for AuthService service. All implementations must embed UnimplementedAuthServiceServer for forward compatibility
type RefreshTokensRequest ¶
type RefreshTokensRequest struct { RefreshToken string `protobuf:"bytes,1,opt,name=refreshToken,proto3" json:"refreshToken,omitempty"` Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"` // contains filtered or unexported fields }
func (*RefreshTokensRequest) Descriptor
deprecated
func (*RefreshTokensRequest) Descriptor() ([]byte, []int)
Deprecated: Use RefreshTokensRequest.ProtoReflect.Descriptor instead.
func (*RefreshTokensRequest) GetIp ¶
func (x *RefreshTokensRequest) GetIp() string
func (*RefreshTokensRequest) GetRefreshToken ¶
func (x *RefreshTokensRequest) GetRefreshToken() string
func (*RefreshTokensRequest) ProtoMessage ¶
func (*RefreshTokensRequest) ProtoMessage()
func (*RefreshTokensRequest) ProtoReflect ¶
func (x *RefreshTokensRequest) ProtoReflect() protoreflect.Message
func (*RefreshTokensRequest) Reset ¶
func (x *RefreshTokensRequest) Reset()
func (*RefreshTokensRequest) String ¶
func (x *RefreshTokensRequest) String() string
type RefreshTokensResponse ¶
type RefreshTokensResponse struct { AccessToken string `protobuf:"bytes,1,opt,name=accessToken,proto3" json:"accessToken,omitempty"` RefreshToken string `protobuf:"bytes,2,opt,name=refreshToken,proto3" json:"refreshToken,omitempty"` // contains filtered or unexported fields }
func (*RefreshTokensResponse) Descriptor
deprecated
func (*RefreshTokensResponse) Descriptor() ([]byte, []int)
Deprecated: Use RefreshTokensResponse.ProtoReflect.Descriptor instead.
func (*RefreshTokensResponse) GetAccessToken ¶
func (x *RefreshTokensResponse) GetAccessToken() string
func (*RefreshTokensResponse) GetRefreshToken ¶
func (x *RefreshTokensResponse) GetRefreshToken() string
func (*RefreshTokensResponse) ProtoMessage ¶
func (*RefreshTokensResponse) ProtoMessage()
func (*RefreshTokensResponse) ProtoReflect ¶
func (x *RefreshTokensResponse) ProtoReflect() protoreflect.Message
func (*RefreshTokensResponse) Reset ¶
func (x *RefreshTokensResponse) Reset()
func (*RefreshTokensResponse) String ¶
func (x *RefreshTokensResponse) String() string
type SignInRequest ¶
type SignInRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` Ip string `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"` // contains filtered or unexported fields }
func (*SignInRequest) Descriptor
deprecated
func (*SignInRequest) Descriptor() ([]byte, []int)
Deprecated: Use SignInRequest.ProtoReflect.Descriptor instead.
func (*SignInRequest) GetIp ¶
func (x *SignInRequest) GetIp() string
func (*SignInRequest) GetPassword ¶
func (x *SignInRequest) GetPassword() string
func (*SignInRequest) GetUsername ¶
func (x *SignInRequest) GetUsername() string
func (*SignInRequest) ProtoMessage ¶
func (*SignInRequest) ProtoMessage()
func (*SignInRequest) ProtoReflect ¶
func (x *SignInRequest) ProtoReflect() protoreflect.Message
func (*SignInRequest) Reset ¶
func (x *SignInRequest) Reset()
func (*SignInRequest) String ¶
func (x *SignInRequest) String() string
type SignInResponse ¶
type SignInResponse struct { AccessToken string `protobuf:"bytes,1,opt,name=accessToken,proto3" json:"accessToken,omitempty"` RefreshToken string `protobuf:"bytes,2,opt,name=refreshToken,proto3" json:"refreshToken,omitempty"` // contains filtered or unexported fields }
func (*SignInResponse) Descriptor
deprecated
func (*SignInResponse) Descriptor() ([]byte, []int)
Deprecated: Use SignInResponse.ProtoReflect.Descriptor instead.
func (*SignInResponse) GetAccessToken ¶
func (x *SignInResponse) GetAccessToken() string
func (*SignInResponse) GetRefreshToken ¶
func (x *SignInResponse) GetRefreshToken() string
func (*SignInResponse) ProtoMessage ¶
func (*SignInResponse) ProtoMessage()
func (*SignInResponse) ProtoReflect ¶
func (x *SignInResponse) ProtoReflect() protoreflect.Message
func (*SignInResponse) Reset ¶
func (x *SignInResponse) Reset()
func (*SignInResponse) String ¶
func (x *SignInResponse) String() string
type SignUpRequest ¶
type SignUpRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` Birthday *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=birthday,proto3" json:"birthday,omitempty"` Sex int32 `protobuf:"varint,6,opt,name=sex,proto3" json:"sex,omitempty"` // contains filtered or unexported fields }
func (*SignUpRequest) Descriptor
deprecated
func (*SignUpRequest) Descriptor() ([]byte, []int)
Deprecated: Use SignUpRequest.ProtoReflect.Descriptor instead.
func (*SignUpRequest) GetBirthday ¶
func (x *SignUpRequest) GetBirthday() *timestamppb.Timestamp
func (*SignUpRequest) GetEmail ¶
func (x *SignUpRequest) GetEmail() string
func (*SignUpRequest) GetName ¶
func (x *SignUpRequest) GetName() string
func (*SignUpRequest) GetPassword ¶
func (x *SignUpRequest) GetPassword() string
func (*SignUpRequest) GetSex ¶
func (x *SignUpRequest) GetSex() int32
func (*SignUpRequest) GetUsername ¶
func (x *SignUpRequest) GetUsername() string
func (*SignUpRequest) ProtoMessage ¶
func (*SignUpRequest) ProtoMessage()
func (*SignUpRequest) ProtoReflect ¶
func (x *SignUpRequest) ProtoReflect() protoreflect.Message
func (*SignUpRequest) Reset ¶
func (x *SignUpRequest) Reset()
func (*SignUpRequest) String ¶
func (x *SignUpRequest) String() string
type UnimplementedAuthServiceServer ¶
type UnimplementedAuthServiceServer struct { }
UnimplementedAuthServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedAuthServiceServer) RefreshTokens ¶
func (UnimplementedAuthServiceServer) RefreshTokens(context.Context, *RefreshTokensRequest) (*RefreshTokensResponse, error)
func (UnimplementedAuthServiceServer) SignIn ¶
func (UnimplementedAuthServiceServer) SignIn(context.Context, *SignInRequest) (*SignInResponse, error)
func (UnimplementedAuthServiceServer) SignUp ¶
func (UnimplementedAuthServiceServer) SignUp(context.Context, *SignUpRequest) (*types.ID, error)
func (UnimplementedAuthServiceServer) Verify ¶
func (UnimplementedAuthServiceServer) Verify(context.Context, *VerifyRequest) (*types.Status, error)
type UnsafeAuthServiceServer ¶
type UnsafeAuthServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAuthServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthServiceServer will result in compilation errors.
type VerifyRequest ¶
type VerifyRequest struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Code uint64 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"` // contains filtered or unexported fields }
func (*VerifyRequest) Descriptor
deprecated
func (*VerifyRequest) Descriptor() ([]byte, []int)
Deprecated: Use VerifyRequest.ProtoReflect.Descriptor instead.
func (*VerifyRequest) GetCode ¶
func (x *VerifyRequest) GetCode() uint64
func (*VerifyRequest) GetId ¶
func (x *VerifyRequest) GetId() uint64
func (*VerifyRequest) ProtoMessage ¶
func (*VerifyRequest) ProtoMessage()
func (*VerifyRequest) ProtoReflect ¶
func (x *VerifyRequest) ProtoReflect() protoreflect.Message
func (*VerifyRequest) Reset ¶
func (x *VerifyRequest) Reset()
func (*VerifyRequest) String ¶
func (x *VerifyRequest) String() string