Documentation ¶
Overview ¶
Package facepb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterFaceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterFaceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FaceClient) error
- func RegisterFaceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterFaceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FaceServer) error
- func RegisterFaceServer(s *grpc.Server, srv FaceServer)
- type FaceClient
- type FaceRect
- func (*FaceRect) Descriptor() ([]byte, []int)deprecated
- func (x *FaceRect) GetBottom() int32
- func (x *FaceRect) GetLeft() int32
- func (x *FaceRect) GetRight() int32
- func (x *FaceRect) GetTop() int32
- func (*FaceRect) ProtoMessage()
- func (x *FaceRect) ProtoReflect() protoreflect.Message
- func (x *FaceRect) Reset()
- func (x *FaceRect) String() string
- type FaceServer
- type Face_OnFaceDetectClient
- type Face_OnFaceDetectServer
- type OnFaceDetectRequest
- func (*OnFaceDetectRequest) Descriptor() ([]byte, []int)deprecated
- func (x *OnFaceDetectRequest) GetWithImg() bool
- func (*OnFaceDetectRequest) ProtoMessage()
- func (x *OnFaceDetectRequest) ProtoReflect() protoreflect.Message
- func (x *OnFaceDetectRequest) Reset()
- func (x *OnFaceDetectRequest) String() string
- type OnFaceDetectResponse
- func (*OnFaceDetectResponse) Descriptor() ([]byte, []int)deprecated
- func (x *OnFaceDetectResponse) GetFaceRects() []*FaceRect
- func (x *OnFaceDetectResponse) GetImg() []byte
- func (*OnFaceDetectResponse) ProtoMessage()
- func (x *OnFaceDetectResponse) ProtoReflect() protoreflect.Message
- func (x *OnFaceDetectResponse) Reset()
- func (x *OnFaceDetectResponse) String() string
- type UnimplementedFaceServer
Constants ¶
This section is empty.
Variables ¶
var File_proto_face_face_proto protoreflect.FileDescriptor
Functions ¶
func RegisterFaceHandler ¶
RegisterFaceHandler registers the http handlers for service Face to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterFaceHandlerClient ¶
RegisterFaceHandlerClient registers the http handlers for service Face to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "FaceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "FaceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "FaceClient" to call the correct interceptors.
func RegisterFaceHandlerFromEndpoint ¶
func RegisterFaceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterFaceHandlerFromEndpoint is same as RegisterFaceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterFaceHandlerServer ¶
RegisterFaceHandlerServer registers the http handlers for service Face to "mux". UnaryRPC :call FaceServer 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 RegisterFaceHandlerFromEndpoint instead.
func RegisterFaceServer ¶
func RegisterFaceServer(s *grpc.Server, srv FaceServer)
Types ¶
type FaceClient ¶
type FaceClient interface {
OnFaceDetect(ctx context.Context, in *OnFaceDetectRequest, opts ...grpc.CallOption) (Face_OnFaceDetectClient, error)
}
FaceClient is the client API for Face service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewFaceClient ¶
func NewFaceClient(cc grpc.ClientConnInterface) FaceClient
type FaceRect ¶ added in v1.0.2
type FaceRect struct { Left int32 `protobuf:"varint,1,opt,name=left,proto3" json:"left,omitempty"` Top int32 `protobuf:"varint,2,opt,name=top,proto3" json:"top,omitempty"` Right int32 `protobuf:"varint,3,opt,name=right,proto3" json:"right,omitempty"` Bottom int32 `protobuf:"varint,4,opt,name=bottom,proto3" json:"bottom,omitempty"` // contains filtered or unexported fields }
func (*FaceRect) Descriptor
deprecated
added in
v1.0.2
func (*FaceRect) ProtoMessage ¶ added in v1.0.2
func (*FaceRect) ProtoMessage()
func (*FaceRect) ProtoReflect ¶ added in v1.0.3
func (x *FaceRect) ProtoReflect() protoreflect.Message
type FaceServer ¶
type FaceServer interface {
OnFaceDetect(*OnFaceDetectRequest, Face_OnFaceDetectServer) error
}
FaceServer is the server API for Face service.
type Face_OnFaceDetectClient ¶
type Face_OnFaceDetectClient interface { Recv() (*OnFaceDetectResponse, error) grpc.ClientStream }
type Face_OnFaceDetectServer ¶
type Face_OnFaceDetectServer interface { Send(*OnFaceDetectResponse) error grpc.ServerStream }
type OnFaceDetectRequest ¶
type OnFaceDetectRequest struct { WithImg bool `protobuf:"varint,1,opt,name=with_img,json=withImg,proto3" json:"with_img,omitempty"` //是否返回图像数据 // contains filtered or unexported fields }
func (*OnFaceDetectRequest) Descriptor
deprecated
func (*OnFaceDetectRequest) Descriptor() ([]byte, []int)
Deprecated: Use OnFaceDetectRequest.ProtoReflect.Descriptor instead.
func (*OnFaceDetectRequest) GetWithImg ¶ added in v1.0.2
func (x *OnFaceDetectRequest) GetWithImg() bool
func (*OnFaceDetectRequest) ProtoMessage ¶
func (*OnFaceDetectRequest) ProtoMessage()
func (*OnFaceDetectRequest) ProtoReflect ¶ added in v1.0.3
func (x *OnFaceDetectRequest) ProtoReflect() protoreflect.Message
func (*OnFaceDetectRequest) Reset ¶
func (x *OnFaceDetectRequest) Reset()
func (*OnFaceDetectRequest) String ¶
func (x *OnFaceDetectRequest) String() string
type OnFaceDetectResponse ¶
type OnFaceDetectResponse struct { FaceRects []*FaceRect `protobuf:"bytes,1,rep,name=face_rects,json=faceRects,proto3" json:"face_rects,omitempty"` //人脸框数据 Img []byte `protobuf:"bytes,2,opt,name=img,proto3" json:"img,omitempty"` //jpeg图片的base64 // contains filtered or unexported fields }
func (*OnFaceDetectResponse) Descriptor
deprecated
func (*OnFaceDetectResponse) Descriptor() ([]byte, []int)
Deprecated: Use OnFaceDetectResponse.ProtoReflect.Descriptor instead.
func (*OnFaceDetectResponse) GetFaceRects ¶ added in v1.0.2
func (x *OnFaceDetectResponse) GetFaceRects() []*FaceRect
func (*OnFaceDetectResponse) GetImg ¶
func (x *OnFaceDetectResponse) GetImg() []byte
func (*OnFaceDetectResponse) ProtoMessage ¶
func (*OnFaceDetectResponse) ProtoMessage()
func (*OnFaceDetectResponse) ProtoReflect ¶ added in v1.0.3
func (x *OnFaceDetectResponse) ProtoReflect() protoreflect.Message
func (*OnFaceDetectResponse) Reset ¶
func (x *OnFaceDetectResponse) Reset()
func (*OnFaceDetectResponse) String ¶
func (x *OnFaceDetectResponse) String() string
type UnimplementedFaceServer ¶
type UnimplementedFaceServer struct { }
UnimplementedFaceServer can be embedded to have forward compatible implementations.
func (*UnimplementedFaceServer) OnFaceDetect ¶
func (*UnimplementedFaceServer) OnFaceDetect(*OnFaceDetectRequest, Face_OnFaceDetectServer) error