passport

package
v0.0.0-...-9362bef Latest Latest
Warning

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

Go to latest
Published: May 1, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package passport is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_proto_passport_proto protoreflect.FileDescriptor

Functions

func RegisterPassportHandler

func RegisterPassportHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterPassportHandler registers the http handlers for service Passport to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterPassportHandlerClient

func RegisterPassportHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PassportClient) error

RegisterPassportHandlerClient registers the http handlers for service Passport to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PassportClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PassportClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "PassportClient" to call the correct interceptors.

func RegisterPassportHandlerFromEndpoint

func RegisterPassportHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterPassportHandlerFromEndpoint is same as RegisterPassportHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterPassportHandlerServer

func RegisterPassportHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PassportServer) error

RegisterPassportHandlerServer registers the http handlers for service Passport to "mux". UnaryRPC :call PassportServer 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 RegisterPassportHandlerFromEndpoint instead.

func RegisterPassportServer

func RegisterPassportServer(s *grpc.Server, srv PassportServer)

Types

type LoginReply

type LoginReply struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginReply) Descriptor deprecated

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

Deprecated: Use LoginReply.ProtoReflect.Descriptor instead.

func (*LoginReply) GetMessage

func (x *LoginReply) GetMessage() string

func (*LoginReply) ProtoMessage

func (*LoginReply) ProtoMessage()

func (*LoginReply) ProtoReflect

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

func (*LoginReply) Reset

func (x *LoginReply) Reset()

func (*LoginReply) String

func (x *LoginReply) String() string

type LoginRequest

type LoginRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginRequest) Descriptor deprecated

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

Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.

func (*LoginRequest) GetName

func (x *LoginRequest) GetName() string

func (*LoginRequest) ProtoMessage

func (*LoginRequest) ProtoMessage()

func (*LoginRequest) ProtoReflect

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

func (*LoginRequest) Reset

func (x *LoginRequest) Reset()

func (*LoginRequest) String

func (x *LoginRequest) String() string

type PassportClient

type PassportClient interface {
	Login(ctx context.Context, opts ...grpc.CallOption) (Passport_LoginClient, error)
}

PassportClient is the client API for Passport service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewPassportClient

func NewPassportClient(cc grpc.ClientConnInterface) PassportClient

type PassportServer

type PassportServer interface {
	Login(Passport_LoginServer) error
}

PassportServer is the server API for Passport service.

type Passport_LoginClient

type Passport_LoginClient interface {
	Send(*LoginRequest) error
	Recv() (*LoginReply, error)
	grpc.ClientStream
}

type Passport_LoginServer

type Passport_LoginServer interface {
	Send(*LoginReply) error
	Recv() (*LoginRequest, error)
	grpc.ServerStream
}

type UnimplementedPassportServer

type UnimplementedPassportServer struct {
}

UnimplementedPassportServer can be embedded to have forward compatible implementations.

func (*UnimplementedPassportServer) Login

Jump to

Keyboard shortcuts

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