commandv1

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DeviceCommandService_IssueCommand_FullMethodName = "/device.command.v1.DeviceCommandService/IssueCommand"
)

Variables

View Source
var DeviceCommandService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "device.command.v1.DeviceCommandService",
	HandlerType: (*DeviceCommandServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "IssueCommand",
			Handler:    _DeviceCommandService_IssueCommand_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "device/command/v1/device_command.proto",
}

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

View Source
var File_device_command_v1_device_command_proto protoreflect.FileDescriptor

Functions

func RegisterDeviceCommandServiceServer

func RegisterDeviceCommandServiceServer(s grpc.ServiceRegistrar, srv DeviceCommandServiceServer)

Types

type DeviceCommandServiceClient

type DeviceCommandServiceClient interface {
	// IssueCommand pushes a command to a device and returns an acknowledgement.
	IssueCommand(ctx context.Context, in *IssueCommandRequest, opts ...grpc.CallOption) (*IssueCommandResponse, error)
}

DeviceCommandServiceClient is the client API for DeviceCommandService 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.

DeviceCommandService is served by the iotdevice devicecell.

type DeviceCommandServiceServer

type DeviceCommandServiceServer interface {
	// IssueCommand pushes a command to a device and returns an acknowledgement.
	IssueCommand(context.Context, *IssueCommandRequest) (*IssueCommandResponse, error)
	// contains filtered or unexported methods
}

DeviceCommandServiceServer is the server API for DeviceCommandService service. All implementations must embed UnimplementedDeviceCommandServiceServer for forward compatibility.

DeviceCommandService is served by the iotdevice devicecell.

type IssueCommandRequest

type IssueCommandRequest struct {

	// device_id is the target device (canonical id).
	DeviceId string `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
	// command_type is the command verb, e.g. "lock" or "reboot".
	CommandType string `protobuf:"bytes,2,opt,name=command_type,json=commandType,proto3" json:"command_type,omitempty"`
	// payload is the opaque command body (command-type specific).
	Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func (*IssueCommandRequest) Descriptor deprecated

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

Deprecated: Use IssueCommandRequest.ProtoReflect.Descriptor instead.

func (*IssueCommandRequest) GetCommandType

func (x *IssueCommandRequest) GetCommandType() string

func (*IssueCommandRequest) GetDeviceId

func (x *IssueCommandRequest) GetDeviceId() string

func (*IssueCommandRequest) GetPayload

func (x *IssueCommandRequest) GetPayload() []byte

func (*IssueCommandRequest) ProtoMessage

func (*IssueCommandRequest) ProtoMessage()

func (*IssueCommandRequest) ProtoReflect

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

func (*IssueCommandRequest) Reset

func (x *IssueCommandRequest) Reset()

func (*IssueCommandRequest) String

func (x *IssueCommandRequest) String() string

type IssueCommandResponse

type IssueCommandResponse struct {

	// ack_id is the server-minted acknowledgement id for this command.
	AckId string `protobuf:"bytes,1,opt,name=ack_id,json=ackId,proto3" json:"ack_id,omitempty"`
	// acknowledged_at_unix_nano is the server acknowledgement time, unix nanos.
	AcknowledgedAtUnixNano int64 `` /* 132-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*IssueCommandResponse) Descriptor deprecated

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

Deprecated: Use IssueCommandResponse.ProtoReflect.Descriptor instead.

func (*IssueCommandResponse) GetAckId

func (x *IssueCommandResponse) GetAckId() string

func (*IssueCommandResponse) GetAcknowledgedAtUnixNano

func (x *IssueCommandResponse) GetAcknowledgedAtUnixNano() int64

func (*IssueCommandResponse) ProtoMessage

func (*IssueCommandResponse) ProtoMessage()

func (*IssueCommandResponse) ProtoReflect

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

func (*IssueCommandResponse) Reset

func (x *IssueCommandResponse) Reset()

func (*IssueCommandResponse) String

func (x *IssueCommandResponse) String() string

type UnimplementedDeviceCommandServiceServer

type UnimplementedDeviceCommandServiceServer struct{}

UnimplementedDeviceCommandServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedDeviceCommandServiceServer) IssueCommand

type UnsafeDeviceCommandServiceServer

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

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

Jump to

Keyboard shortcuts

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