Documentation ¶
Overview ¶
Package auth is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterAuthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthServiceClient) error
- func RegisterAuthServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServiceServer) error
- func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
- type AuthServiceClient
- type AuthServiceServer
- type LoginAnonymousUserRequest
- func (*LoginAnonymousUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginAnonymousUserRequest) GetId() string
- func (*LoginAnonymousUserRequest) ProtoMessage()
- func (x *LoginAnonymousUserRequest) ProtoReflect() protoreflect.Message
- func (x *LoginAnonymousUserRequest) Reset()
- func (x *LoginAnonymousUserRequest) String() string
- type LoginAnonymousUserResponse
- func (*LoginAnonymousUserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *LoginAnonymousUserResponse) GetRefreshToken() string
- func (x *LoginAnonymousUserResponse) GetToken() string
- func (*LoginAnonymousUserResponse) ProtoMessage()
- func (x *LoginAnonymousUserResponse) ProtoReflect() protoreflect.Message
- func (x *LoginAnonymousUserResponse) Reset()
- func (x *LoginAnonymousUserResponse) String() string
- type UnimplementedAuthServiceServer
- type UnsafeAuthServiceServer
Constants ¶
const (
AuthService_LoginAnonymousUser_FullMethodName = "/knowdateapp.user.v1.auth.AuthService/LoginAnonymousUser"
)
Variables ¶
var AuthService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "knowdateapp.user.v1.auth.AuthService", HandlerType: (*AuthServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "LoginAnonymousUser", Handler: _AuthService_LoginAnonymousUser_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/v1/auth/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_api_v1_auth_auth_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuthServiceHandler ¶
func RegisterAuthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterAuthServiceHandler registers the http handlers for service AuthService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterAuthServiceHandlerClient ¶
func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthServiceClient) error
RegisterAuthServiceHandlerClient registers the http handlers for service AuthService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AuthServiceClient" to call the correct interceptors.
func RegisterAuthServiceHandlerFromEndpoint ¶
func RegisterAuthServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterAuthServiceHandlerFromEndpoint is same as RegisterAuthServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAuthServiceHandlerServer ¶
func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServiceServer) error
RegisterAuthServiceHandlerServer registers the http handlers for service AuthService to "mux". UnaryRPC :call AuthServiceServer 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 RegisterAuthServiceHandlerFromEndpoint instead.
func RegisterAuthServiceServer ¶
func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
Types ¶
type AuthServiceClient ¶
type AuthServiceClient interface {
LoginAnonymousUser(ctx context.Context, in *LoginAnonymousUserRequest, opts ...grpc.CallOption) (*LoginAnonymousUserResponse, 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 { LoginAnonymousUser(context.Context, *LoginAnonymousUserRequest) (*LoginAnonymousUserResponse, error) // contains filtered or unexported methods }
AuthServiceServer is the server API for AuthService service. All implementations must embed UnimplementedAuthServiceServer for forward compatibility
type LoginAnonymousUserRequest ¶
type LoginAnonymousUserRequest struct { // TODO: Make the handler more secure. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*LoginAnonymousUserRequest) Descriptor
deprecated
func (*LoginAnonymousUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginAnonymousUserRequest.ProtoReflect.Descriptor instead.
func (*LoginAnonymousUserRequest) GetId ¶
func (x *LoginAnonymousUserRequest) GetId() string
func (*LoginAnonymousUserRequest) ProtoMessage ¶
func (*LoginAnonymousUserRequest) ProtoMessage()
func (*LoginAnonymousUserRequest) ProtoReflect ¶
func (x *LoginAnonymousUserRequest) ProtoReflect() protoreflect.Message
func (*LoginAnonymousUserRequest) Reset ¶
func (x *LoginAnonymousUserRequest) Reset()
func (*LoginAnonymousUserRequest) String ¶
func (x *LoginAnonymousUserRequest) String() string
type LoginAnonymousUserResponse ¶
type LoginAnonymousUserResponse struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` RefreshToken string `protobuf:"bytes,2,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` // contains filtered or unexported fields }
func (*LoginAnonymousUserResponse) Descriptor
deprecated
func (*LoginAnonymousUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use LoginAnonymousUserResponse.ProtoReflect.Descriptor instead.
func (*LoginAnonymousUserResponse) GetRefreshToken ¶
func (x *LoginAnonymousUserResponse) GetRefreshToken() string
func (*LoginAnonymousUserResponse) GetToken ¶
func (x *LoginAnonymousUserResponse) GetToken() string
func (*LoginAnonymousUserResponse) ProtoMessage ¶
func (*LoginAnonymousUserResponse) ProtoMessage()
func (*LoginAnonymousUserResponse) ProtoReflect ¶
func (x *LoginAnonymousUserResponse) ProtoReflect() protoreflect.Message
func (*LoginAnonymousUserResponse) Reset ¶
func (x *LoginAnonymousUserResponse) Reset()
func (*LoginAnonymousUserResponse) String ¶
func (x *LoginAnonymousUserResponse) String() string
type UnimplementedAuthServiceServer ¶
type UnimplementedAuthServiceServer struct { }
UnimplementedAuthServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedAuthServiceServer) LoginAnonymousUser ¶
func (UnimplementedAuthServiceServer) LoginAnonymousUser(context.Context, *LoginAnonymousUserRequest) (*LoginAnonymousUserResponse, 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.