Documentation ¶
Overview ¶
Package hasher is a generated protocol buffer package.
It is generated from these files:
hasher.proto
It has these top-level messages:
HashRequest HashResponse
Package hasher is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterHasherHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterHasherHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterHasherServer(s *grpc.Server, srv HasherServer)
- type HashRequest
- type HashResponse
- type HasherClient
- type HasherServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterHasherHandler ¶
RegisterHasherHandler registers the http handlers for service Hasher to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterHasherHandlerFromEndpoint ¶
func RegisterHasherHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterHasherHandlerFromEndpoint is same as RegisterHasherHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterHasherServer ¶
func RegisterHasherServer(s *grpc.Server, srv HasherServer)
Types ¶
type HashRequest ¶
type HashRequest struct {
Message string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"`
}
func (*HashRequest) Descriptor ¶
func (*HashRequest) Descriptor() ([]byte, []int)
func (*HashRequest) ProtoMessage ¶
func (*HashRequest) ProtoMessage()
func (*HashRequest) Reset ¶
func (m *HashRequest) Reset()
func (*HashRequest) String ¶
func (m *HashRequest) String() string
type HashResponse ¶
type HashResponse struct {
HashedMessage string `protobuf:"bytes,1,opt,name=hashedMessage" json:"hashedMessage,omitempty"`
}
func (*HashResponse) Descriptor ¶
func (*HashResponse) Descriptor() ([]byte, []int)
func (*HashResponse) ProtoMessage ¶
func (*HashResponse) ProtoMessage()
func (*HashResponse) Reset ¶
func (m *HashResponse) Reset()
func (*HashResponse) String ¶
func (m *HashResponse) String() string
type HasherClient ¶
type HasherClient interface {
Hash(ctx context.Context, in *HashRequest, opts ...grpc.CallOption) (*HashResponse, error)
}
func NewHasherClient ¶
func NewHasherClient(cc *grpc.ClientConn) HasherClient
type HasherServer ¶
type HasherServer interface {
Hash(context.Context, *HashRequest) (*HashResponse, error)
}
Click to show internal directories.
Click to hide internal directories.