Documentation ¶
Overview ¶
Package protos is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterPersonServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterPersonServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PersonServiceClient) error
- func RegisterPersonServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterPersonServiceServer(s *grpc.Server, srv PersonServiceServer)
- type ListPersonRequest
- func (*ListPersonRequest) Descriptor() ([]byte, []int)
- func (*ListPersonRequest) ProtoMessage()
- func (m *ListPersonRequest) Reset()
- func (m *ListPersonRequest) String() string
- func (m *ListPersonRequest) XXX_DiscardUnknown()
- func (m *ListPersonRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListPersonRequest) XXX_Merge(src proto.Message)
- func (m *ListPersonRequest) XXX_Size() int
- func (m *ListPersonRequest) XXX_Unmarshal(b []byte) error
- type ListPersonResponse
- func (*ListPersonResponse) Descriptor() ([]byte, []int)
- func (m *ListPersonResponse) GetPerson() []*Person
- func (*ListPersonResponse) ProtoMessage()
- func (m *ListPersonResponse) Reset()
- func (m *ListPersonResponse) String() string
- func (m *ListPersonResponse) XXX_DiscardUnknown()
- func (m *ListPersonResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListPersonResponse) XXX_Merge(src proto.Message)
- func (m *ListPersonResponse) XXX_Size() int
- func (m *ListPersonResponse) XXX_Unmarshal(b []byte) error
- type Person
- func (*Person) Descriptor() ([]byte, []int)
- func (m *Person) GetAddress() string
- func (m *Person) GetId() string
- func (m *Person) GetName() string
- func (m *Person) GetPassword() string
- func (m *Person) GetUsername() string
- func (*Person) ProtoMessage()
- func (m *Person) Reset()
- func (m *Person) String() string
- func (m *Person) XXX_DiscardUnknown()
- func (m *Person) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Person) XXX_Merge(src proto.Message)
- func (m *Person) XXX_Size() int
- func (m *Person) XXX_Unmarshal(b []byte) error
- type PersonServiceClient
- type PersonServiceServer
- type UnimplementedPersonServiceServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterPersonServiceHandler ¶
func RegisterPersonServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterPersonServiceHandler registers the http handlers for service PersonService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterPersonServiceHandlerClient ¶
func RegisterPersonServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PersonServiceClient) error
RegisterPersonServiceHandlerClient registers the http handlers for service PersonService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PersonServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PersonServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "PersonServiceClient" to call the correct interceptors.
func RegisterPersonServiceHandlerFromEndpoint ¶
func RegisterPersonServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterPersonServiceHandlerFromEndpoint is same as RegisterPersonServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterPersonServiceServer ¶
func RegisterPersonServiceServer(s *grpc.Server, srv PersonServiceServer)
Types ¶
type ListPersonRequest ¶
type ListPersonRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ListPersonRequest) Descriptor ¶
func (*ListPersonRequest) Descriptor() ([]byte, []int)
func (*ListPersonRequest) ProtoMessage ¶
func (*ListPersonRequest) ProtoMessage()
func (*ListPersonRequest) Reset ¶
func (m *ListPersonRequest) Reset()
func (*ListPersonRequest) String ¶
func (m *ListPersonRequest) String() string
func (*ListPersonRequest) XXX_DiscardUnknown ¶
func (m *ListPersonRequest) XXX_DiscardUnknown()
func (*ListPersonRequest) XXX_Marshal ¶
func (m *ListPersonRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListPersonRequest) XXX_Merge ¶
func (m *ListPersonRequest) XXX_Merge(src proto.Message)
func (*ListPersonRequest) XXX_Size ¶
func (m *ListPersonRequest) XXX_Size() int
func (*ListPersonRequest) XXX_Unmarshal ¶
func (m *ListPersonRequest) XXX_Unmarshal(b []byte) error
type ListPersonResponse ¶
type ListPersonResponse struct { Person []*Person `protobuf:"bytes,1,rep,name=person,proto3" json:"person,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ListPersonResponse) Descriptor ¶
func (*ListPersonResponse) Descriptor() ([]byte, []int)
func (*ListPersonResponse) GetPerson ¶
func (m *ListPersonResponse) GetPerson() []*Person
func (*ListPersonResponse) ProtoMessage ¶
func (*ListPersonResponse) ProtoMessage()
func (*ListPersonResponse) Reset ¶
func (m *ListPersonResponse) Reset()
func (*ListPersonResponse) String ¶
func (m *ListPersonResponse) String() string
func (*ListPersonResponse) XXX_DiscardUnknown ¶
func (m *ListPersonResponse) XXX_DiscardUnknown()
func (*ListPersonResponse) XXX_Marshal ¶
func (m *ListPersonResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListPersonResponse) XXX_Merge ¶
func (m *ListPersonResponse) XXX_Merge(src proto.Message)
func (*ListPersonResponse) XXX_Size ¶
func (m *ListPersonResponse) XXX_Size() int
func (*ListPersonResponse) XXX_Unmarshal ¶
func (m *ListPersonResponse) XXX_Unmarshal(b []byte) error
type Person ¶
type Person struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` Username string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Person) Descriptor ¶
func (*Person) GetAddress ¶
func (*Person) GetPassword ¶
func (*Person) GetUsername ¶
func (*Person) ProtoMessage ¶
func (*Person) ProtoMessage()
func (*Person) XXX_DiscardUnknown ¶
func (m *Person) XXX_DiscardUnknown()
func (*Person) XXX_Marshal ¶
func (*Person) XXX_Unmarshal ¶
type PersonServiceClient ¶
type PersonServiceClient interface {
ListPeople(ctx context.Context, in *ListPersonRequest, opts ...grpc.CallOption) (*ListPersonResponse, error)
}
PersonServiceClient is the client API for PersonService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewPersonServiceClient ¶
func NewPersonServiceClient(cc *grpc.ClientConn) PersonServiceClient
type PersonServiceServer ¶
type PersonServiceServer interface {
ListPeople(context.Context, *ListPersonRequest) (*ListPersonResponse, error)
}
PersonServiceServer is the server API for PersonService service.
type UnimplementedPersonServiceServer ¶
type UnimplementedPersonServiceServer struct { }
UnimplementedPersonServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedPersonServiceServer) ListPeople ¶
func (*UnimplementedPersonServiceServer) ListPeople(ctx context.Context, req *ListPersonRequest) (*ListPersonResponse, error)