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";
|
2024-08-08 10:40:22 +07:00
|
|
|
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) {}
|
2024-08-08 10:40:22 +07:00
|
|
|
|
|
|
|
// 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
|
|
|
}
|