Bluemage/schemas/proto/device/v1/device.proto

33 lines
971 B
Protocol Buffer
Raw Normal View History

2024-08-04 23:16:05 +07:00
syntax = "proto3";
package device.v1;
2024-08-07 22:38:10 +07:00
import "device/v1/create.proto";
2024-08-07 15:38:52 +07:00
import "device/v1/get.proto";
2024-08-07 22:38:10 +07:00
import "device/v1/list.proto";
import "device/v1/update.proto";
2024-08-04 23:16:05 +07:00
option go_package = "github.com/tigorlazuardi/bluemage/go/gen/proto/device/v1";
service DeviceService {
2024-08-05 23:06:32 +07:00
// GetDevice fetches a device by its slug.
//
// If the device is not found, an error will be returned.
rpc GetDevice(GetDeviceRequest) returns (GetDeviceResponse) {}
2024-08-07 15:38:52 +07:00
// ListDevices gets list of devices.
//
// Returns empty array if no matching query found.
//
// Only returns error if there's an internal error.
rpc ListDevices(ListDevicesRequest) returns (ListDevicesResponse) {}
2024-08-04 23:16:05 +07:00
// CreateDevice creates a new device.
rpc CreateDevice(CreateDeviceRequest) returns (CreateDeviceResponse) {}
// UpdateDevice updates a device.
//
// Only fields that are set in the request will be updated.
rpc UpdateDevice(UpdateDeviceRequest) returns (UpdateDeviceResponse) {}
2024-08-04 23:16:05 +07:00
}