facepb

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: 0BSD Imports: 16 Imported by: 0

Documentation

Overview

Package facepb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_proto_face_face_proto protoreflect.FileDescriptor

Functions

func RegisterFaceHandler

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

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

func RegisterFaceHandlerClient

func RegisterFaceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FaceClient) error

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

func RegisterFaceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FaceServer) error

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) Descriptor() ([]byte, []int)

Deprecated: Use FaceRect.ProtoReflect.Descriptor instead.

func (*FaceRect) GetBottom added in v1.0.2

func (x *FaceRect) GetBottom() int32

func (*FaceRect) GetLeft added in v1.0.2

func (x *FaceRect) GetLeft() int32

func (*FaceRect) GetRight added in v1.0.2

func (x *FaceRect) GetRight() int32

func (*FaceRect) GetTop added in v1.0.2

func (x *FaceRect) GetTop() int32

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

func (*FaceRect) Reset added in v1.0.2

func (x *FaceRect) Reset()

func (*FaceRect) String added in v1.0.2

func (x *FaceRect) String() string

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

Jump to

Keyboard shortcuts

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