Documentation
¶
Index ¶
- Variables
- func RegisterPiCamServer(s grpc.ServiceRegistrar, srv PiCamServer)
- type Client
- type Config
- type PiCamClient
- type PiCamServer
- type Request
- func (*Request) Descriptor() ([]byte, []int)deprecated
- func (x *Request) GetFilename() string
- func (x *Request) GetIdentifier() string
- func (x *Request) GetImage() []byte
- func (*Request) ProtoMessage()
- func (x *Request) ProtoReflect() protoreflect.Message
- func (x *Request) Reset()
- func (x *Request) String() string
- type Response
- type UnimplementedPiCamServer
- type UnsafePiCamServer
Constants ¶
This section is empty.
Variables ¶
var File_picam_proto protoreflect.FileDescriptor
var PiCam_ServiceDesc = grpc.ServiceDesc{ ServiceName: "picam.proto.PiCam", HandlerType: (*PiCamServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SendImage", Handler: _PiCam_SendImage_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "picam.proto", }
PiCam_ServiceDesc is the grpc.ServiceDesc for PiCam service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPiCamServer ¶
func RegisterPiCamServer(s grpc.ServiceRegistrar, srv PiCamServer)
Types ¶
type Client ¶
type Client struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Store string `protobuf:"bytes,2,opt,name=store,proto3" json:"store,omitempty"`
// contains filtered or unexported fields
}
Client defines the unique mapping between client identifier and storage location on server for image files.
func (*Client) Descriptor
deprecated
func (*Client) ProtoMessage ¶
func (*Client) ProtoMessage()
func (*Client) ProtoReflect ¶
func (x *Client) ProtoReflect() protoreflect.Message
type Config ¶
type Config struct {
Port int32 `protobuf:"varint,1,opt,name=port,proto3" json:"port,omitempty"`
Client []*Client `protobuf:"bytes,2,rep,name=client,proto3" json:"client,omitempty"`
// contains filtered or unexported fields
}
Config defines the server side configuration.
func (*Config) Descriptor
deprecated
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
type PiCamClient ¶
type PiCamClient interface {
// SendImage, sends an image from the client to the server.
SendImage(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}
PiCamClient is the client API for PiCam service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewPiCamClient ¶
func NewPiCamClient(cc grpc.ClientConnInterface) PiCamClient
type PiCamServer ¶
type PiCamServer interface {
// SendImage, sends an image from the client to the server.
SendImage(context.Context, *Request) (*Response, error)
// contains filtered or unexported methods
}
PiCamServer is the server API for PiCam service. All implementations must embed UnimplementedPiCamServer for forward compatibility
type Request ¶
type Request struct {
Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
Image []byte `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"`
Filename string `protobuf:"bytes,3,opt,name=filename,proto3" json:"filename,omitempty"`
// contains filtered or unexported fields
}
Request contains the image, and identifier.
func (*Request) Descriptor
deprecated
func (*Request) GetFilename ¶
func (*Request) GetIdentifier ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct {
Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
// contains filtered or unexported fields
}
Response returns only an error if one occurred.
func (*Response) Descriptor
deprecated
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type UnimplementedPiCamServer ¶
type UnimplementedPiCamServer struct {
}
UnimplementedPiCamServer must be embedded to have forward compatible implementations.
type UnsafePiCamServer ¶
type UnsafePiCamServer interface {
// contains filtered or unexported methods
}
UnsafePiCamServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PiCamServer will result in compilation errors.