Documentation ¶
Overview ¶
Package profile is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterProfileHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterProfileHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProfileClient) error
- func RegisterProfileHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterProfileHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProfileServer) error
- func RegisterProfileServer(s *grpc.Server, srv ProfileServer)
- type Passport
- func (*Passport) Descriptor() ([]byte, []int)deprecated
- func (x *Passport) GetAddress() string
- func (x *Passport) GetBirthdate() *timestamppb.Timestamp
- func (x *Passport) GetBirthplace() string
- func (x *Passport) GetFirstName() string
- func (x *Passport) GetIssuedAt() *timestamppb.Timestamp
- func (x *Passport) GetIssuedBy() string
- func (x *Passport) GetLastName() string
- func (x *Passport) GetMiddleName() string
- func (x *Passport) GetNumber() string
- func (x *Passport) GetSeries() string
- func (*Passport) ProtoMessage()
- func (x *Passport) ProtoReflect() protoreflect.Message
- func (x *Passport) Reset()
- func (x *Passport) String() string
- type ProfileClient
- type ProfileServer
- type SetAuthenticationCodeRequest
- func (*SetAuthenticationCodeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetAuthenticationCodeRequest) GetCode() string
- func (x *SetAuthenticationCodeRequest) GetUserID() int64
- func (*SetAuthenticationCodeRequest) ProtoMessage()
- func (x *SetAuthenticationCodeRequest) ProtoReflect() protoreflect.Message
- func (x *SetAuthenticationCodeRequest) Reset()
- func (x *SetAuthenticationCodeRequest) String() string
- type SignInRequest
- func (*SignInRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SignInRequest) GetEmail() string
- func (x *SignInRequest) GetPassword() string
- func (*SignInRequest) ProtoMessage()
- func (x *SignInRequest) ProtoReflect() protoreflect.Message
- func (x *SignInRequest) Reset()
- func (x *SignInRequest) String() string
- type SignUpRequest
- func (*SignUpRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SignUpRequest) GetEmail() string
- func (x *SignUpRequest) GetPassport() *Passport
- func (x *SignUpRequest) GetPassword() string
- func (*SignUpRequest) ProtoMessage()
- func (x *SignUpRequest) ProtoReflect() protoreflect.Message
- func (x *SignUpRequest) Reset()
- func (x *SignUpRequest) String() string
- type SignUpResponse
- type SubmitCodeRequest
- func (*SubmitCodeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SubmitCodeRequest) GetCode() string
- func (x *SubmitCodeRequest) GetEmail() string
- func (x *SubmitCodeRequest) GetPassword() string
- func (*SubmitCodeRequest) ProtoMessage()
- func (x *SubmitCodeRequest) ProtoReflect() protoreflect.Message
- func (x *SubmitCodeRequest) Reset()
- func (x *SubmitCodeRequest) String() string
- type SubmitCodeResponse
- func (*SubmitCodeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SubmitCodeResponse) GetToken() string
- func (*SubmitCodeResponse) ProtoMessage()
- func (x *SubmitCodeResponse) ProtoReflect() protoreflect.Message
- func (x *SubmitCodeResponse) Reset()
- func (x *SubmitCodeResponse) String() string
- type UnimplementedProfileServer
- func (*UnimplementedProfileServer) GetPassport(context.Context, *emptypb.Empty) (*Passport, error)
- func (*UnimplementedProfileServer) SetAuthenticationCode(context.Context, *SetAuthenticationCodeRequest) (*emptypb.Empty, error)
- func (*UnimplementedProfileServer) SignIn(context.Context, *SignInRequest) (*emptypb.Empty, error)
- func (*UnimplementedProfileServer) SignUp(context.Context, *SignUpRequest) (*SignUpResponse, error)
- func (*UnimplementedProfileServer) SubmitCode(context.Context, *SubmitCodeRequest) (*SubmitCodeResponse, error)
Constants ¶
This section is empty.
Variables ¶
var File_api_profile_profile_proto protoreflect.FileDescriptor
Functions ¶
func RegisterProfileHandler ¶
func RegisterProfileHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterProfileHandler registers the http handlers for service Profile to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterProfileHandlerClient ¶
func RegisterProfileHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProfileClient) error
RegisterProfileHandlerClient registers the http handlers for service Profile to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ProfileClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ProfileClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ProfileClient" to call the correct interceptors.
func RegisterProfileHandlerFromEndpoint ¶
func RegisterProfileHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterProfileHandlerFromEndpoint is same as RegisterProfileHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterProfileHandlerServer ¶
func RegisterProfileHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProfileServer) error
RegisterProfileHandlerServer registers the http handlers for service Profile to "mux". UnaryRPC :call ProfileServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterProfileHandlerFromEndpoint instead.
func RegisterProfileServer ¶
func RegisterProfileServer(s *grpc.Server, srv ProfileServer)
Types ¶
type Passport ¶
type Passport struct { Series string `protobuf:"bytes,1,opt,name=series,proto3" json:"series,omitempty"` Number string `protobuf:"bytes,2,opt,name=number,proto3" json:"number,omitempty"` FirstName string `protobuf:"bytes,3,opt,name=firstName,proto3" json:"firstName,omitempty"` MiddleName string `protobuf:"bytes,4,opt,name=middleName,proto3" json:"middleName,omitempty"` LastName string `protobuf:"bytes,5,opt,name=lastName,proto3" json:"lastName,omitempty"` IssuedBy string `protobuf:"bytes,6,opt,name=issuedBy,proto3" json:"issuedBy,omitempty"` IssuedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=issuedAt,proto3" json:"issuedAt,omitempty"` Address string `protobuf:"bytes,8,opt,name=address,proto3" json:"address,omitempty"` Birthplace string `protobuf:"bytes,9,opt,name=birthplace,proto3" json:"birthplace,omitempty"` Birthdate *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=birthdate,proto3" json:"birthdate,omitempty"` // contains filtered or unexported fields }
func (*Passport) Descriptor
deprecated
func (*Passport) GetAddress ¶
func (*Passport) GetBirthdate ¶
func (x *Passport) GetBirthdate() *timestamppb.Timestamp
func (*Passport) GetBirthplace ¶
func (*Passport) GetFirstName ¶
func (*Passport) GetIssuedAt ¶
func (x *Passport) GetIssuedAt() *timestamppb.Timestamp
func (*Passport) GetIssuedBy ¶
func (*Passport) GetLastName ¶
func (*Passport) GetMiddleName ¶
func (*Passport) ProtoMessage ¶
func (*Passport) ProtoMessage()
func (*Passport) ProtoReflect ¶
func (x *Passport) ProtoReflect() protoreflect.Message
type ProfileClient ¶
type ProfileClient interface { SignIn(ctx context.Context, in *SignInRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) SignUp(ctx context.Context, in *SignUpRequest, opts ...grpc.CallOption) (*SignUpResponse, error) SubmitCode(ctx context.Context, in *SubmitCodeRequest, opts ...grpc.CallOption) (*SubmitCodeResponse, error) GetPassport(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Passport, error) SetAuthenticationCode(ctx context.Context, in *SetAuthenticationCodeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) }
ProfileClient is the client API for Profile service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewProfileClient ¶
func NewProfileClient(cc grpc.ClientConnInterface) ProfileClient
type ProfileServer ¶
type ProfileServer interface { SignIn(context.Context, *SignInRequest) (*emptypb.Empty, error) SignUp(context.Context, *SignUpRequest) (*SignUpResponse, error) SubmitCode(context.Context, *SubmitCodeRequest) (*SubmitCodeResponse, error) GetPassport(context.Context, *emptypb.Empty) (*Passport, error) SetAuthenticationCode(context.Context, *SetAuthenticationCodeRequest) (*emptypb.Empty, error) }
ProfileServer is the server API for Profile service.
type SetAuthenticationCodeRequest ¶
type SetAuthenticationCodeRequest struct { Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` UserID int64 `protobuf:"varint,2,opt,name=userID,proto3" json:"userID,omitempty"` // contains filtered or unexported fields }
func (*SetAuthenticationCodeRequest) Descriptor
deprecated
func (*SetAuthenticationCodeRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetAuthenticationCodeRequest.ProtoReflect.Descriptor instead.
func (*SetAuthenticationCodeRequest) GetCode ¶
func (x *SetAuthenticationCodeRequest) GetCode() string
func (*SetAuthenticationCodeRequest) GetUserID ¶
func (x *SetAuthenticationCodeRequest) GetUserID() int64
func (*SetAuthenticationCodeRequest) ProtoMessage ¶
func (*SetAuthenticationCodeRequest) ProtoMessage()
func (*SetAuthenticationCodeRequest) ProtoReflect ¶
func (x *SetAuthenticationCodeRequest) ProtoReflect() protoreflect.Message
func (*SetAuthenticationCodeRequest) Reset ¶
func (x *SetAuthenticationCodeRequest) Reset()
func (*SetAuthenticationCodeRequest) String ¶
func (x *SetAuthenticationCodeRequest) String() string
type SignInRequest ¶
type SignInRequest struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*SignInRequest) Descriptor
deprecated
func (*SignInRequest) Descriptor() ([]byte, []int)
Deprecated: Use SignInRequest.ProtoReflect.Descriptor instead.
func (*SignInRequest) GetEmail ¶
func (x *SignInRequest) GetEmail() string
func (*SignInRequest) GetPassword ¶
func (x *SignInRequest) GetPassword() 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 SignUpRequest ¶
type SignUpRequest struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` Passport *Passport `protobuf:"bytes,3,opt,name=passport,proto3" json:"passport,omitempty"` // contains filtered or unexported fields }
func (*SignUpRequest) Descriptor
deprecated
func (*SignUpRequest) Descriptor() ([]byte, []int)
Deprecated: Use SignUpRequest.ProtoReflect.Descriptor instead.
func (*SignUpRequest) GetEmail ¶
func (x *SignUpRequest) GetEmail() string
func (*SignUpRequest) GetPassport ¶
func (x *SignUpRequest) GetPassport() *Passport
func (*SignUpRequest) GetPassword ¶
func (x *SignUpRequest) GetPassword() 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 SignUpResponse ¶
type SignUpResponse struct { UserID int64 `protobuf:"varint,1,opt,name=userID,proto3" json:"userID,omitempty"` // contains filtered or unexported fields }
func (*SignUpResponse) Descriptor
deprecated
func (*SignUpResponse) Descriptor() ([]byte, []int)
Deprecated: Use SignUpResponse.ProtoReflect.Descriptor instead.
func (*SignUpResponse) GetUserID ¶
func (x *SignUpResponse) GetUserID() int64
func (*SignUpResponse) ProtoMessage ¶
func (*SignUpResponse) ProtoMessage()
func (*SignUpResponse) ProtoReflect ¶
func (x *SignUpResponse) ProtoReflect() protoreflect.Message
func (*SignUpResponse) Reset ¶
func (x *SignUpResponse) Reset()
func (*SignUpResponse) String ¶
func (x *SignUpResponse) String() string
type SubmitCodeRequest ¶
type SubmitCodeRequest struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` // contains filtered or unexported fields }
func (*SubmitCodeRequest) Descriptor
deprecated
func (*SubmitCodeRequest) Descriptor() ([]byte, []int)
Deprecated: Use SubmitCodeRequest.ProtoReflect.Descriptor instead.
func (*SubmitCodeRequest) GetCode ¶
func (x *SubmitCodeRequest) GetCode() string
func (*SubmitCodeRequest) GetEmail ¶
func (x *SubmitCodeRequest) GetEmail() string
func (*SubmitCodeRequest) GetPassword ¶
func (x *SubmitCodeRequest) GetPassword() string
func (*SubmitCodeRequest) ProtoMessage ¶
func (*SubmitCodeRequest) ProtoMessage()
func (*SubmitCodeRequest) ProtoReflect ¶
func (x *SubmitCodeRequest) ProtoReflect() protoreflect.Message
func (*SubmitCodeRequest) Reset ¶
func (x *SubmitCodeRequest) Reset()
func (*SubmitCodeRequest) String ¶
func (x *SubmitCodeRequest) String() string
type SubmitCodeResponse ¶
type SubmitCodeResponse struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*SubmitCodeResponse) Descriptor
deprecated
func (*SubmitCodeResponse) Descriptor() ([]byte, []int)
Deprecated: Use SubmitCodeResponse.ProtoReflect.Descriptor instead.
func (*SubmitCodeResponse) GetToken ¶
func (x *SubmitCodeResponse) GetToken() string
func (*SubmitCodeResponse) ProtoMessage ¶
func (*SubmitCodeResponse) ProtoMessage()
func (*SubmitCodeResponse) ProtoReflect ¶
func (x *SubmitCodeResponse) ProtoReflect() protoreflect.Message
func (*SubmitCodeResponse) Reset ¶
func (x *SubmitCodeResponse) Reset()
func (*SubmitCodeResponse) String ¶
func (x *SubmitCodeResponse) String() string
type UnimplementedProfileServer ¶
type UnimplementedProfileServer struct { }
UnimplementedProfileServer can be embedded to have forward compatible implementations.
func (*UnimplementedProfileServer) GetPassport ¶
func (*UnimplementedProfileServer) SetAuthenticationCode ¶
func (*UnimplementedProfileServer) SetAuthenticationCode(context.Context, *SetAuthenticationCodeRequest) (*emptypb.Empty, error)
func (*UnimplementedProfileServer) SignIn ¶
func (*UnimplementedProfileServer) SignIn(context.Context, *SignInRequest) (*emptypb.Empty, error)
func (*UnimplementedProfileServer) SignUp ¶
func (*UnimplementedProfileServer) SignUp(context.Context, *SignUpRequest) (*SignUpResponse, error)
func (*UnimplementedProfileServer) SubmitCode ¶
func (*UnimplementedProfileServer) SubmitCode(context.Context, *SubmitCodeRequest) (*SubmitCodeResponse, error)