messages

package
v0.0.0-...-0ef0b1c Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_messages_messages_proto protoreflect.FileDescriptor
View Source
var IoT_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "messages.IoT",
	HandlerType: (*IoTServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SendWaterSoilLevel",
			Handler:    _IoT_SendWaterSoilLevel_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "messages/messages.proto",
}

IoT_ServiceDesc is the grpc.ServiceDesc for IoT service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterIoTServer

func RegisterIoTServer(s grpc.ServiceRegistrar, srv IoTServer)

Types

type IoTClient

type IoTClient interface {
	// Sends water soil level
	SendWaterSoilLevel(ctx context.Context, in *WaterSoilMetrics, opts ...grpc.CallOption) (*MetricsReply, error)
}

IoTClient is the client API for IoT 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 NewIoTClient

func NewIoTClient(cc grpc.ClientConnInterface) IoTClient

type IoTServer

type IoTServer interface {
	// Sends water soil level
	SendWaterSoilLevel(context.Context, *WaterSoilMetrics) (*MetricsReply, error)
	// contains filtered or unexported methods
}

IoTServer is the server API for IoT service. All implementations must embed UnimplementedIoTServer for forward compatibility

type MetricsReply

type MetricsReply struct {
	MessageId  string `protobuf:"bytes,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
	Timestamp  int64  `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	StatusCode int32  `protobuf:"varint,3,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
	// contains filtered or unexported fields
}

The response message containing the greetings

func (*MetricsReply) Descriptor deprecated

func (*MetricsReply) Descriptor() ([]byte, []int)

Deprecated: Use MetricsReply.ProtoReflect.Descriptor instead.

func (*MetricsReply) GetMessageId

func (x *MetricsReply) GetMessageId() string

func (*MetricsReply) GetStatusCode

func (x *MetricsReply) GetStatusCode() int32

func (*MetricsReply) GetTimestamp

func (x *MetricsReply) GetTimestamp() int64

func (*MetricsReply) ProtoMessage

func (*MetricsReply) ProtoMessage()

func (*MetricsReply) ProtoReflect

func (x *MetricsReply) ProtoReflect() protoreflect.Message

func (*MetricsReply) Reset

func (x *MetricsReply) Reset()

func (*MetricsReply) String

func (x *MetricsReply) String() string

type UnimplementedIoTServer

type UnimplementedIoTServer struct {
}

UnimplementedIoTServer must be embedded to have forward compatible implementations.

func (UnimplementedIoTServer) SendWaterSoilLevel

type UnsafeIoTServer

type UnsafeIoTServer interface {
	// contains filtered or unexported methods
}

UnsafeIoTServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to IoTServer will result in compilation errors.

type WaterSoilMetrics

type WaterSoilMetrics struct {
	DeviceId      string  `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
	MessageId     string  `protobuf:"bytes,2,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
	MoistureLevel float32 `protobuf:"fixed32,3,opt,name=moisture_level,json=moistureLevel,proto3" json:"moisture_level,omitempty"`
	// contains filtered or unexported fields
}

The request message containing the user's name.

func (*WaterSoilMetrics) Descriptor deprecated

func (*WaterSoilMetrics) Descriptor() ([]byte, []int)

Deprecated: Use WaterSoilMetrics.ProtoReflect.Descriptor instead.

func (*WaterSoilMetrics) GetDeviceId

func (x *WaterSoilMetrics) GetDeviceId() string

func (*WaterSoilMetrics) GetMessageId

func (x *WaterSoilMetrics) GetMessageId() string

func (*WaterSoilMetrics) GetMoistureLevel

func (x *WaterSoilMetrics) GetMoistureLevel() float32

func (*WaterSoilMetrics) ProtoMessage

func (*WaterSoilMetrics) ProtoMessage()

func (*WaterSoilMetrics) ProtoReflect

func (x *WaterSoilMetrics) ProtoReflect() protoreflect.Message

func (*WaterSoilMetrics) Reset

func (x *WaterSoilMetrics) Reset()

func (*WaterSoilMetrics) String

func (x *WaterSoilMetrics) String() string

Jump to

Keyboard shortcuts

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