feat(core): sync plugin_registry proto with canonical (DenyDevice, GetDeviceStatus)

This commit is contained in:
Alex Dunmow 2026-06-03 10:57:07 +08:00
parent 46e3389045
commit dae3aa918a
3 changed files with 357 additions and 71 deletions

View File

@ -78,6 +78,12 @@ const (
// PluginAuthServiceApproveDeviceProcedure is the fully-qualified name of the PluginAuthService's // PluginAuthServiceApproveDeviceProcedure is the fully-qualified name of the PluginAuthService's
// ApproveDevice RPC. // ApproveDevice RPC.
PluginAuthServiceApproveDeviceProcedure = "/orchestrator.v1.PluginAuthService/ApproveDevice" PluginAuthServiceApproveDeviceProcedure = "/orchestrator.v1.PluginAuthService/ApproveDevice"
// PluginAuthServiceDenyDeviceProcedure is the fully-qualified name of the PluginAuthService's
// DenyDevice RPC.
PluginAuthServiceDenyDeviceProcedure = "/orchestrator.v1.PluginAuthService/DenyDevice"
// PluginAuthServiceGetDeviceStatusProcedure is the fully-qualified name of the PluginAuthService's
// GetDeviceStatus RPC.
PluginAuthServiceGetDeviceStatusProcedure = "/orchestrator.v1.PluginAuthService/GetDeviceStatus"
// PluginAuthServiceWhoamiProcedure is the fully-qualified name of the PluginAuthService's Whoami // PluginAuthServiceWhoamiProcedure is the fully-qualified name of the PluginAuthService's Whoami
// RPC. // RPC.
PluginAuthServiceWhoamiProcedure = "/orchestrator.v1.PluginAuthService/Whoami" PluginAuthServiceWhoamiProcedure = "/orchestrator.v1.PluginAuthService/Whoami"
@ -482,6 +488,8 @@ type PluginAuthServiceClient interface {
StartDevice(context.Context, *connect.Request[v1.StartDeviceRequest]) (*connect.Response[v1.StartDeviceResponse], error) StartDevice(context.Context, *connect.Request[v1.StartDeviceRequest]) (*connect.Response[v1.StartDeviceResponse], error)
PollDevice(context.Context, *connect.Request[v1.PollDeviceRequest]) (*connect.Response[v1.PollDeviceResponse], error) PollDevice(context.Context, *connect.Request[v1.PollDeviceRequest]) (*connect.Response[v1.PollDeviceResponse], error)
ApproveDevice(context.Context, *connect.Request[v1.ApproveDeviceRequest]) (*connect.Response[v1.ApproveDeviceResponse], error) ApproveDevice(context.Context, *connect.Request[v1.ApproveDeviceRequest]) (*connect.Response[v1.ApproveDeviceResponse], error)
DenyDevice(context.Context, *connect.Request[v1.DenyDeviceRequest]) (*connect.Response[v1.DenyDeviceResponse], error)
GetDeviceStatus(context.Context, *connect.Request[v1.GetDeviceStatusRequest]) (*connect.Response[v1.GetDeviceStatusResponse], error)
Whoami(context.Context, *connect.Request[v1.WhoamiRequest]) (*connect.Response[v1.WhoamiResponse], error) Whoami(context.Context, *connect.Request[v1.WhoamiRequest]) (*connect.Response[v1.WhoamiResponse], error)
} }
@ -514,6 +522,18 @@ func NewPluginAuthServiceClient(httpClient connect.HTTPClient, baseURL string, o
connect.WithSchema(pluginAuthServiceMethods.ByName("ApproveDevice")), connect.WithSchema(pluginAuthServiceMethods.ByName("ApproveDevice")),
connect.WithClientOptions(opts...), connect.WithClientOptions(opts...),
), ),
denyDevice: connect.NewClient[v1.DenyDeviceRequest, v1.DenyDeviceResponse](
httpClient,
baseURL+PluginAuthServiceDenyDeviceProcedure,
connect.WithSchema(pluginAuthServiceMethods.ByName("DenyDevice")),
connect.WithClientOptions(opts...),
),
getDeviceStatus: connect.NewClient[v1.GetDeviceStatusRequest, v1.GetDeviceStatusResponse](
httpClient,
baseURL+PluginAuthServiceGetDeviceStatusProcedure,
connect.WithSchema(pluginAuthServiceMethods.ByName("GetDeviceStatus")),
connect.WithClientOptions(opts...),
),
whoami: connect.NewClient[v1.WhoamiRequest, v1.WhoamiResponse]( whoami: connect.NewClient[v1.WhoamiRequest, v1.WhoamiResponse](
httpClient, httpClient,
baseURL+PluginAuthServiceWhoamiProcedure, baseURL+PluginAuthServiceWhoamiProcedure,
@ -528,6 +548,8 @@ type pluginAuthServiceClient struct {
startDevice *connect.Client[v1.StartDeviceRequest, v1.StartDeviceResponse] startDevice *connect.Client[v1.StartDeviceRequest, v1.StartDeviceResponse]
pollDevice *connect.Client[v1.PollDeviceRequest, v1.PollDeviceResponse] pollDevice *connect.Client[v1.PollDeviceRequest, v1.PollDeviceResponse]
approveDevice *connect.Client[v1.ApproveDeviceRequest, v1.ApproveDeviceResponse] approveDevice *connect.Client[v1.ApproveDeviceRequest, v1.ApproveDeviceResponse]
denyDevice *connect.Client[v1.DenyDeviceRequest, v1.DenyDeviceResponse]
getDeviceStatus *connect.Client[v1.GetDeviceStatusRequest, v1.GetDeviceStatusResponse]
whoami *connect.Client[v1.WhoamiRequest, v1.WhoamiResponse] whoami *connect.Client[v1.WhoamiRequest, v1.WhoamiResponse]
} }
@ -546,6 +568,16 @@ func (c *pluginAuthServiceClient) ApproveDevice(ctx context.Context, req *connec
return c.approveDevice.CallUnary(ctx, req) return c.approveDevice.CallUnary(ctx, req)
} }
// DenyDevice calls orchestrator.v1.PluginAuthService.DenyDevice.
func (c *pluginAuthServiceClient) DenyDevice(ctx context.Context, req *connect.Request[v1.DenyDeviceRequest]) (*connect.Response[v1.DenyDeviceResponse], error) {
return c.denyDevice.CallUnary(ctx, req)
}
// GetDeviceStatus calls orchestrator.v1.PluginAuthService.GetDeviceStatus.
func (c *pluginAuthServiceClient) GetDeviceStatus(ctx context.Context, req *connect.Request[v1.GetDeviceStatusRequest]) (*connect.Response[v1.GetDeviceStatusResponse], error) {
return c.getDeviceStatus.CallUnary(ctx, req)
}
// Whoami calls orchestrator.v1.PluginAuthService.Whoami. // Whoami calls orchestrator.v1.PluginAuthService.Whoami.
func (c *pluginAuthServiceClient) Whoami(ctx context.Context, req *connect.Request[v1.WhoamiRequest]) (*connect.Response[v1.WhoamiResponse], error) { func (c *pluginAuthServiceClient) Whoami(ctx context.Context, req *connect.Request[v1.WhoamiRequest]) (*connect.Response[v1.WhoamiResponse], error) {
return c.whoami.CallUnary(ctx, req) return c.whoami.CallUnary(ctx, req)
@ -556,6 +588,8 @@ type PluginAuthServiceHandler interface {
StartDevice(context.Context, *connect.Request[v1.StartDeviceRequest]) (*connect.Response[v1.StartDeviceResponse], error) StartDevice(context.Context, *connect.Request[v1.StartDeviceRequest]) (*connect.Response[v1.StartDeviceResponse], error)
PollDevice(context.Context, *connect.Request[v1.PollDeviceRequest]) (*connect.Response[v1.PollDeviceResponse], error) PollDevice(context.Context, *connect.Request[v1.PollDeviceRequest]) (*connect.Response[v1.PollDeviceResponse], error)
ApproveDevice(context.Context, *connect.Request[v1.ApproveDeviceRequest]) (*connect.Response[v1.ApproveDeviceResponse], error) ApproveDevice(context.Context, *connect.Request[v1.ApproveDeviceRequest]) (*connect.Response[v1.ApproveDeviceResponse], error)
DenyDevice(context.Context, *connect.Request[v1.DenyDeviceRequest]) (*connect.Response[v1.DenyDeviceResponse], error)
GetDeviceStatus(context.Context, *connect.Request[v1.GetDeviceStatusRequest]) (*connect.Response[v1.GetDeviceStatusResponse], error)
Whoami(context.Context, *connect.Request[v1.WhoamiRequest]) (*connect.Response[v1.WhoamiResponse], error) Whoami(context.Context, *connect.Request[v1.WhoamiRequest]) (*connect.Response[v1.WhoamiResponse], error)
} }
@ -584,6 +618,18 @@ func NewPluginAuthServiceHandler(svc PluginAuthServiceHandler, opts ...connect.H
connect.WithSchema(pluginAuthServiceMethods.ByName("ApproveDevice")), connect.WithSchema(pluginAuthServiceMethods.ByName("ApproveDevice")),
connect.WithHandlerOptions(opts...), connect.WithHandlerOptions(opts...),
) )
pluginAuthServiceDenyDeviceHandler := connect.NewUnaryHandler(
PluginAuthServiceDenyDeviceProcedure,
svc.DenyDevice,
connect.WithSchema(pluginAuthServiceMethods.ByName("DenyDevice")),
connect.WithHandlerOptions(opts...),
)
pluginAuthServiceGetDeviceStatusHandler := connect.NewUnaryHandler(
PluginAuthServiceGetDeviceStatusProcedure,
svc.GetDeviceStatus,
connect.WithSchema(pluginAuthServiceMethods.ByName("GetDeviceStatus")),
connect.WithHandlerOptions(opts...),
)
pluginAuthServiceWhoamiHandler := connect.NewUnaryHandler( pluginAuthServiceWhoamiHandler := connect.NewUnaryHandler(
PluginAuthServiceWhoamiProcedure, PluginAuthServiceWhoamiProcedure,
svc.Whoami, svc.Whoami,
@ -598,6 +644,10 @@ func NewPluginAuthServiceHandler(svc PluginAuthServiceHandler, opts ...connect.H
pluginAuthServicePollDeviceHandler.ServeHTTP(w, r) pluginAuthServicePollDeviceHandler.ServeHTTP(w, r)
case PluginAuthServiceApproveDeviceProcedure: case PluginAuthServiceApproveDeviceProcedure:
pluginAuthServiceApproveDeviceHandler.ServeHTTP(w, r) pluginAuthServiceApproveDeviceHandler.ServeHTTP(w, r)
case PluginAuthServiceDenyDeviceProcedure:
pluginAuthServiceDenyDeviceHandler.ServeHTTP(w, r)
case PluginAuthServiceGetDeviceStatusProcedure:
pluginAuthServiceGetDeviceStatusHandler.ServeHTTP(w, r)
case PluginAuthServiceWhoamiProcedure: case PluginAuthServiceWhoamiProcedure:
pluginAuthServiceWhoamiHandler.ServeHTTP(w, r) pluginAuthServiceWhoamiHandler.ServeHTTP(w, r)
default: default:
@ -621,6 +671,14 @@ func (UnimplementedPluginAuthServiceHandler) ApproveDevice(context.Context, *con
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("orchestrator.v1.PluginAuthService.ApproveDevice is not implemented")) return nil, connect.NewError(connect.CodeUnimplemented, errors.New("orchestrator.v1.PluginAuthService.ApproveDevice is not implemented"))
} }
func (UnimplementedPluginAuthServiceHandler) DenyDevice(context.Context, *connect.Request[v1.DenyDeviceRequest]) (*connect.Response[v1.DenyDeviceResponse], error) {
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("orchestrator.v1.PluginAuthService.DenyDevice is not implemented"))
}
func (UnimplementedPluginAuthServiceHandler) GetDeviceStatus(context.Context, *connect.Request[v1.GetDeviceStatusRequest]) (*connect.Response[v1.GetDeviceStatusResponse], error) {
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("orchestrator.v1.PluginAuthService.GetDeviceStatus is not implemented"))
}
func (UnimplementedPluginAuthServiceHandler) Whoami(context.Context, *connect.Request[v1.WhoamiRequest]) (*connect.Response[v1.WhoamiResponse], error) { func (UnimplementedPluginAuthServiceHandler) Whoami(context.Context, *connect.Request[v1.WhoamiRequest]) (*connect.Response[v1.WhoamiResponse], error) {
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("orchestrator.v1.PluginAuthService.Whoami is not implemented")) return nil, connect.NewError(connect.CodeUnimplemented, errors.New("orchestrator.v1.PluginAuthService.Whoami is not implemented"))
} }

View File

@ -1890,6 +1890,198 @@ func (*ApproveDeviceResponse) Descriptor() ([]byte, []int) {
return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{30} return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{30}
} }
type DenyDeviceRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
UserCode string `protobuf:"bytes,1,opt,name=user_code,json=userCode,proto3" json:"user_code,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *DenyDeviceRequest) Reset() {
*x = DenyDeviceRequest{}
mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *DenyDeviceRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DenyDeviceRequest) ProtoMessage() {}
func (x *DenyDeviceRequest) ProtoReflect() protoreflect.Message {
mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[31]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DenyDeviceRequest.ProtoReflect.Descriptor instead.
func (*DenyDeviceRequest) Descriptor() ([]byte, []int) {
return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{31}
}
func (x *DenyDeviceRequest) GetUserCode() string {
if x != nil {
return x.UserCode
}
return ""
}
type DenyDeviceResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *DenyDeviceResponse) Reset() {
*x = DenyDeviceResponse{}
mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[32]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *DenyDeviceResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DenyDeviceResponse) ProtoMessage() {}
func (x *DenyDeviceResponse) ProtoReflect() protoreflect.Message {
mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[32]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DenyDeviceResponse.ProtoReflect.Descriptor instead.
func (*DenyDeviceResponse) Descriptor() ([]byte, []int) {
return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{32}
}
type GetDeviceStatusRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
UserCode string `protobuf:"bytes,1,opt,name=user_code,json=userCode,proto3" json:"user_code,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetDeviceStatusRequest) Reset() {
*x = GetDeviceStatusRequest{}
mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[33]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetDeviceStatusRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetDeviceStatusRequest) ProtoMessage() {}
func (x *GetDeviceStatusRequest) ProtoReflect() protoreflect.Message {
mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[33]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetDeviceStatusRequest.ProtoReflect.Descriptor instead.
func (*GetDeviceStatusRequest) Descriptor() ([]byte, []int) {
return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{33}
}
func (x *GetDeviceStatusRequest) GetUserCode() string {
if x != nil {
return x.UserCode
}
return ""
}
type GetDeviceStatusResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"`
Authorized bool `protobuf:"varint,2,opt,name=authorized,proto3" json:"authorized,omitempty"`
Denied bool `protobuf:"varint,3,opt,name=denied,proto3" json:"denied,omitempty"`
ClientId string `protobuf:"bytes,4,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetDeviceStatusResponse) Reset() {
*x = GetDeviceStatusResponse{}
mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[34]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetDeviceStatusResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetDeviceStatusResponse) ProtoMessage() {}
func (x *GetDeviceStatusResponse) ProtoReflect() protoreflect.Message {
mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[34]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetDeviceStatusResponse.ProtoReflect.Descriptor instead.
func (*GetDeviceStatusResponse) Descriptor() ([]byte, []int) {
return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{34}
}
func (x *GetDeviceStatusResponse) GetValid() bool {
if x != nil {
return x.Valid
}
return false
}
func (x *GetDeviceStatusResponse) GetAuthorized() bool {
if x != nil {
return x.Authorized
}
return false
}
func (x *GetDeviceStatusResponse) GetDenied() bool {
if x != nil {
return x.Denied
}
return false
}
func (x *GetDeviceStatusResponse) GetClientId() string {
if x != nil {
return x.ClientId
}
return ""
}
type WhoamiRequest struct { type WhoamiRequest struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
@ -1898,7 +2090,7 @@ type WhoamiRequest struct {
func (x *WhoamiRequest) Reset() { func (x *WhoamiRequest) Reset() {
*x = WhoamiRequest{} *x = WhoamiRequest{}
mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[31] mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[35]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -1910,7 +2102,7 @@ func (x *WhoamiRequest) String() string {
func (*WhoamiRequest) ProtoMessage() {} func (*WhoamiRequest) ProtoMessage() {}
func (x *WhoamiRequest) ProtoReflect() protoreflect.Message { func (x *WhoamiRequest) ProtoReflect() protoreflect.Message {
mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[31] mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[35]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -1923,7 +2115,7 @@ func (x *WhoamiRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use WhoamiRequest.ProtoReflect.Descriptor instead. // Deprecated: Use WhoamiRequest.ProtoReflect.Descriptor instead.
func (*WhoamiRequest) Descriptor() ([]byte, []int) { func (*WhoamiRequest) Descriptor() ([]byte, []int) {
return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{31} return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{35}
} }
type WhoamiResponse struct { type WhoamiResponse struct {
@ -1937,7 +2129,7 @@ type WhoamiResponse struct {
func (x *WhoamiResponse) Reset() { func (x *WhoamiResponse) Reset() {
*x = WhoamiResponse{} *x = WhoamiResponse{}
mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[32] mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[36]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -1949,7 +2141,7 @@ func (x *WhoamiResponse) String() string {
func (*WhoamiResponse) ProtoMessage() {} func (*WhoamiResponse) ProtoMessage() {}
func (x *WhoamiResponse) ProtoReflect() protoreflect.Message { func (x *WhoamiResponse) ProtoReflect() protoreflect.Message {
mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[32] mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[36]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -1962,7 +2154,7 @@ func (x *WhoamiResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use WhoamiResponse.ProtoReflect.Descriptor instead. // Deprecated: Use WhoamiResponse.ProtoReflect.Descriptor instead.
func (*WhoamiResponse) Descriptor() ([]byte, []int) { func (*WhoamiResponse) Descriptor() ([]byte, []int) {
return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{32} return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{36}
} }
func (x *WhoamiResponse) GetUserId() string { func (x *WhoamiResponse) GetUserId() string {
@ -2149,7 +2341,19 @@ const file_orchestrator_v1_plugin_registry_proto_rawDesc = "" +
"\x06status\x18\x02 \x01(\tR\x06status\"3\n" + "\x06status\x18\x02 \x01(\tR\x06status\"3\n" +
"\x14ApproveDeviceRequest\x12\x1b\n" + "\x14ApproveDeviceRequest\x12\x1b\n" +
"\tuser_code\x18\x01 \x01(\tR\buserCode\"\x17\n" + "\tuser_code\x18\x01 \x01(\tR\buserCode\"\x17\n" +
"\x15ApproveDeviceResponse\"\x0f\n" + "\x15ApproveDeviceResponse\"0\n" +
"\x11DenyDeviceRequest\x12\x1b\n" +
"\tuser_code\x18\x01 \x01(\tR\buserCode\"\x14\n" +
"\x12DenyDeviceResponse\"5\n" +
"\x16GetDeviceStatusRequest\x12\x1b\n" +
"\tuser_code\x18\x01 \x01(\tR\buserCode\"\x84\x01\n" +
"\x17GetDeviceStatusResponse\x12\x14\n" +
"\x05valid\x18\x01 \x01(\bR\x05valid\x12\x1e\n" +
"\n" +
"authorized\x18\x02 \x01(\bR\n" +
"authorized\x12\x16\n" +
"\x06denied\x18\x03 \x01(\bR\x06denied\x12\x1b\n" +
"\tclient_id\x18\x04 \x01(\tR\bclientId\"\x0f\n" +
"\rWhoamiRequest\"b\n" + "\rWhoamiRequest\"b\n" +
"\x0eWhoamiResponse\x12\x17\n" + "\x0eWhoamiResponse\x12\x17\n" +
"\auser_id\x18\x01 \x01(\tR\x06userId\x12\x14\n" + "\auser_id\x18\x01 \x01(\tR\x06userId\x12\x14\n" +
@ -2168,12 +2372,15 @@ const file_orchestrator_v1_plugin_registry_proto_rawDesc = "" +
"\x0eResolveInstall\x12&.orchestrator.v1.ResolveInstallRequest\x1a'.orchestrator.v1.ResolveInstallResponse\x12a\n" + "\x0eResolveInstall\x12&.orchestrator.v1.ResolveInstallRequest\x1a'.orchestrator.v1.ResolveInstallResponse\x12a\n" +
"\x0eListCategories\x12&.orchestrator.v1.ListCategoriesRequest\x1a'.orchestrator.v1.ListCategoriesResponse2y\n" + "\x0eListCategories\x12&.orchestrator.v1.ListCategoriesRequest\x1a'.orchestrator.v1.ListCategoriesResponse2y\n" +
"\x14PluginPublishService\x12a\n" + "\x14PluginPublishService\x12a\n" +
"\x0ePublishVersion\x12&.orchestrator.v1.PublishVersionRequest\x1a'.orchestrator.v1.PublishVersionResponse2\xef\x02\n" + "\x0ePublishVersion\x12&.orchestrator.v1.PublishVersionRequest\x1a'.orchestrator.v1.PublishVersionResponse2\xac\x04\n" +
"\x11PluginAuthService\x12X\n" + "\x11PluginAuthService\x12X\n" +
"\vStartDevice\x12#.orchestrator.v1.StartDeviceRequest\x1a$.orchestrator.v1.StartDeviceResponse\x12U\n" + "\vStartDevice\x12#.orchestrator.v1.StartDeviceRequest\x1a$.orchestrator.v1.StartDeviceResponse\x12U\n" +
"\n" + "\n" +
"PollDevice\x12\".orchestrator.v1.PollDeviceRequest\x1a#.orchestrator.v1.PollDeviceResponse\x12^\n" + "PollDevice\x12\".orchestrator.v1.PollDeviceRequest\x1a#.orchestrator.v1.PollDeviceResponse\x12^\n" +
"\rApproveDevice\x12%.orchestrator.v1.ApproveDeviceRequest\x1a&.orchestrator.v1.ApproveDeviceResponse\x12I\n" + "\rApproveDevice\x12%.orchestrator.v1.ApproveDeviceRequest\x1a&.orchestrator.v1.ApproveDeviceResponse\x12U\n" +
"\n" +
"DenyDevice\x12\".orchestrator.v1.DenyDeviceRequest\x1a#.orchestrator.v1.DenyDeviceResponse\x12d\n" +
"\x0fGetDeviceStatus\x12'.orchestrator.v1.GetDeviceStatusRequest\x1a(.orchestrator.v1.GetDeviceStatusResponse\x12I\n" +
"\x06Whoami\x12\x1e.orchestrator.v1.WhoamiRequest\x1a\x1f.orchestrator.v1.WhoamiResponseB\xd6\x01\n" + "\x06Whoami\x12\x1e.orchestrator.v1.WhoamiRequest\x1a\x1f.orchestrator.v1.WhoamiResponseB\xd6\x01\n" +
"\x13com.orchestrator.v1B\x13PluginRegistryProtoP\x01ZMgit.dev.alexdunmow.com/block/core/internal/api/orchestrator/v1;orchestratorv1\xa2\x02\x03OXX\xaa\x02\x0fOrchestrator.V1\xca\x02\x0fOrchestrator\\V1\xe2\x02\x1bOrchestrator\\V1\\GPBMetadata\xea\x02\x10Orchestrator::V1b\x06proto3" "\x13com.orchestrator.v1B\x13PluginRegistryProtoP\x01ZMgit.dev.alexdunmow.com/block/core/internal/api/orchestrator/v1;orchestratorv1\xa2\x02\x03OXX\xaa\x02\x0fOrchestrator.V1\xca\x02\x0fOrchestrator\\V1\xe2\x02\x1bOrchestrator\\V1\\GPBMetadata\xea\x02\x10Orchestrator::V1b\x06proto3"
@ -2189,7 +2396,7 @@ func file_orchestrator_v1_plugin_registry_proto_rawDescGZIP() []byte {
return file_orchestrator_v1_plugin_registry_proto_rawDescData return file_orchestrator_v1_plugin_registry_proto_rawDescData
} }
var file_orchestrator_v1_plugin_registry_proto_msgTypes = make([]protoimpl.MessageInfo, 34) var file_orchestrator_v1_plugin_registry_proto_msgTypes = make([]protoimpl.MessageInfo, 38)
var file_orchestrator_v1_plugin_registry_proto_goTypes = []any{ var file_orchestrator_v1_plugin_registry_proto_goTypes = []any{
(*Scope)(nil), // 0: orchestrator.v1.Scope (*Scope)(nil), // 0: orchestrator.v1.Scope
(*Plugin)(nil), // 1: orchestrator.v1.Plugin (*Plugin)(nil), // 1: orchestrator.v1.Plugin
@ -2222,15 +2429,19 @@ var file_orchestrator_v1_plugin_registry_proto_goTypes = []any{
(*PollDeviceResponse)(nil), // 28: orchestrator.v1.PollDeviceResponse (*PollDeviceResponse)(nil), // 28: orchestrator.v1.PollDeviceResponse
(*ApproveDeviceRequest)(nil), // 29: orchestrator.v1.ApproveDeviceRequest (*ApproveDeviceRequest)(nil), // 29: orchestrator.v1.ApproveDeviceRequest
(*ApproveDeviceResponse)(nil), // 30: orchestrator.v1.ApproveDeviceResponse (*ApproveDeviceResponse)(nil), // 30: orchestrator.v1.ApproveDeviceResponse
(*WhoamiRequest)(nil), // 31: orchestrator.v1.WhoamiRequest (*DenyDeviceRequest)(nil), // 31: orchestrator.v1.DenyDeviceRequest
(*WhoamiResponse)(nil), // 32: orchestrator.v1.WhoamiResponse (*DenyDeviceResponse)(nil), // 32: orchestrator.v1.DenyDeviceResponse
nil, // 33: orchestrator.v1.GetPluginResponse.ChannelsEntry (*GetDeviceStatusRequest)(nil), // 33: orchestrator.v1.GetDeviceStatusRequest
(*timestamppb.Timestamp)(nil), // 34: google.protobuf.Timestamp (*GetDeviceStatusResponse)(nil), // 34: orchestrator.v1.GetDeviceStatusResponse
(*WhoamiRequest)(nil), // 35: orchestrator.v1.WhoamiRequest
(*WhoamiResponse)(nil), // 36: orchestrator.v1.WhoamiResponse
nil, // 37: orchestrator.v1.GetPluginResponse.ChannelsEntry
(*timestamppb.Timestamp)(nil), // 38: google.protobuf.Timestamp
} }
var file_orchestrator_v1_plugin_registry_proto_depIdxs = []int32{ var file_orchestrator_v1_plugin_registry_proto_depIdxs = []int32{
34, // 0: orchestrator.v1.Scope.created_at:type_name -> google.protobuf.Timestamp 38, // 0: orchestrator.v1.Scope.created_at:type_name -> google.protobuf.Timestamp
34, // 1: orchestrator.v1.Plugin.updated_at:type_name -> google.protobuf.Timestamp 38, // 1: orchestrator.v1.Plugin.updated_at:type_name -> google.protobuf.Timestamp
34, // 2: orchestrator.v1.Version.published_at:type_name -> google.protobuf.Timestamp 38, // 2: orchestrator.v1.Version.published_at:type_name -> google.protobuf.Timestamp
0, // 3: orchestrator.v1.CreateScopeResponse.scope:type_name -> orchestrator.v1.Scope 0, // 3: orchestrator.v1.CreateScopeResponse.scope:type_name -> orchestrator.v1.Scope
0, // 4: orchestrator.v1.ListMyScopesResponse.scopes:type_name -> orchestrator.v1.Scope 0, // 4: orchestrator.v1.ListMyScopesResponse.scopes:type_name -> orchestrator.v1.Scope
0, // 5: orchestrator.v1.GetScopeResponse.scope:type_name -> orchestrator.v1.Scope 0, // 5: orchestrator.v1.GetScopeResponse.scope:type_name -> orchestrator.v1.Scope
@ -2238,7 +2449,7 @@ var file_orchestrator_v1_plugin_registry_proto_depIdxs = []int32{
1, // 7: orchestrator.v1.CreatePluginResponse.plugin:type_name -> orchestrator.v1.Plugin 1, // 7: orchestrator.v1.CreatePluginResponse.plugin:type_name -> orchestrator.v1.Plugin
1, // 8: orchestrator.v1.GetPluginResponse.plugin:type_name -> orchestrator.v1.Plugin 1, // 8: orchestrator.v1.GetPluginResponse.plugin:type_name -> orchestrator.v1.Plugin
3, // 9: orchestrator.v1.GetPluginResponse.versions:type_name -> orchestrator.v1.Version 3, // 9: orchestrator.v1.GetPluginResponse.versions:type_name -> orchestrator.v1.Version
33, // 10: orchestrator.v1.GetPluginResponse.channels:type_name -> orchestrator.v1.GetPluginResponse.ChannelsEntry 37, // 10: orchestrator.v1.GetPluginResponse.channels:type_name -> orchestrator.v1.GetPluginResponse.ChannelsEntry
1, // 11: orchestrator.v1.ListPluginsResponse.plugins:type_name -> orchestrator.v1.Plugin 1, // 11: orchestrator.v1.ListPluginsResponse.plugins:type_name -> orchestrator.v1.Plugin
2, // 12: orchestrator.v1.ListCategoriesResponse.categories:type_name -> orchestrator.v1.Category 2, // 12: orchestrator.v1.ListCategoriesResponse.categories:type_name -> orchestrator.v1.Category
3, // 13: orchestrator.v1.GetVersionResponse.version:type_name -> orchestrator.v1.Version 3, // 13: orchestrator.v1.GetVersionResponse.version:type_name -> orchestrator.v1.Version
@ -2258,23 +2469,27 @@ var file_orchestrator_v1_plugin_registry_proto_depIdxs = []int32{
25, // 27: orchestrator.v1.PluginAuthService.StartDevice:input_type -> orchestrator.v1.StartDeviceRequest 25, // 27: orchestrator.v1.PluginAuthService.StartDevice:input_type -> orchestrator.v1.StartDeviceRequest
27, // 28: orchestrator.v1.PluginAuthService.PollDevice:input_type -> orchestrator.v1.PollDeviceRequest 27, // 28: orchestrator.v1.PluginAuthService.PollDevice:input_type -> orchestrator.v1.PollDeviceRequest
29, // 29: orchestrator.v1.PluginAuthService.ApproveDevice:input_type -> orchestrator.v1.ApproveDeviceRequest 29, // 29: orchestrator.v1.PluginAuthService.ApproveDevice:input_type -> orchestrator.v1.ApproveDeviceRequest
31, // 30: orchestrator.v1.PluginAuthService.Whoami:input_type -> orchestrator.v1.WhoamiRequest 31, // 30: orchestrator.v1.PluginAuthService.DenyDevice:input_type -> orchestrator.v1.DenyDeviceRequest
6, // 31: orchestrator.v1.PluginScopeService.CreateScope:output_type -> orchestrator.v1.CreateScopeResponse 33, // 31: orchestrator.v1.PluginAuthService.GetDeviceStatus:input_type -> orchestrator.v1.GetDeviceStatusRequest
8, // 32: orchestrator.v1.PluginScopeService.ListMyScopes:output_type -> orchestrator.v1.ListMyScopesResponse 35, // 32: orchestrator.v1.PluginAuthService.Whoami:input_type -> orchestrator.v1.WhoamiRequest
10, // 33: orchestrator.v1.PluginScopeService.GetScope:output_type -> orchestrator.v1.GetScopeResponse 6, // 33: orchestrator.v1.PluginScopeService.CreateScope:output_type -> orchestrator.v1.CreateScopeResponse
12, // 34: orchestrator.v1.PluginRegistryService.CreatePlugin:output_type -> orchestrator.v1.CreatePluginResponse 8, // 34: orchestrator.v1.PluginScopeService.ListMyScopes:output_type -> orchestrator.v1.ListMyScopesResponse
14, // 35: orchestrator.v1.PluginRegistryService.GetPlugin:output_type -> orchestrator.v1.GetPluginResponse 10, // 35: orchestrator.v1.PluginScopeService.GetScope:output_type -> orchestrator.v1.GetScopeResponse
16, // 36: orchestrator.v1.PluginRegistryService.ListPlugins:output_type -> orchestrator.v1.ListPluginsResponse 12, // 36: orchestrator.v1.PluginRegistryService.CreatePlugin:output_type -> orchestrator.v1.CreatePluginResponse
20, // 37: orchestrator.v1.PluginRegistryService.GetVersion:output_type -> orchestrator.v1.GetVersionResponse 14, // 37: orchestrator.v1.PluginRegistryService.GetPlugin:output_type -> orchestrator.v1.GetPluginResponse
22, // 38: orchestrator.v1.PluginRegistryService.ResolveInstall:output_type -> orchestrator.v1.ResolveInstallResponse 16, // 38: orchestrator.v1.PluginRegistryService.ListPlugins:output_type -> orchestrator.v1.ListPluginsResponse
18, // 39: orchestrator.v1.PluginRegistryService.ListCategories:output_type -> orchestrator.v1.ListCategoriesResponse 20, // 39: orchestrator.v1.PluginRegistryService.GetVersion:output_type -> orchestrator.v1.GetVersionResponse
24, // 40: orchestrator.v1.PluginPublishService.PublishVersion:output_type -> orchestrator.v1.PublishVersionResponse 22, // 40: orchestrator.v1.PluginRegistryService.ResolveInstall:output_type -> orchestrator.v1.ResolveInstallResponse
26, // 41: orchestrator.v1.PluginAuthService.StartDevice:output_type -> orchestrator.v1.StartDeviceResponse 18, // 41: orchestrator.v1.PluginRegistryService.ListCategories:output_type -> orchestrator.v1.ListCategoriesResponse
28, // 42: orchestrator.v1.PluginAuthService.PollDevice:output_type -> orchestrator.v1.PollDeviceResponse 24, // 42: orchestrator.v1.PluginPublishService.PublishVersion:output_type -> orchestrator.v1.PublishVersionResponse
30, // 43: orchestrator.v1.PluginAuthService.ApproveDevice:output_type -> orchestrator.v1.ApproveDeviceResponse 26, // 43: orchestrator.v1.PluginAuthService.StartDevice:output_type -> orchestrator.v1.StartDeviceResponse
32, // 44: orchestrator.v1.PluginAuthService.Whoami:output_type -> orchestrator.v1.WhoamiResponse 28, // 44: orchestrator.v1.PluginAuthService.PollDevice:output_type -> orchestrator.v1.PollDeviceResponse
31, // [31:45] is the sub-list for method output_type 30, // 45: orchestrator.v1.PluginAuthService.ApproveDevice:output_type -> orchestrator.v1.ApproveDeviceResponse
17, // [17:31] is the sub-list for method input_type 32, // 46: orchestrator.v1.PluginAuthService.DenyDevice:output_type -> orchestrator.v1.DenyDeviceResponse
34, // 47: orchestrator.v1.PluginAuthService.GetDeviceStatus:output_type -> orchestrator.v1.GetDeviceStatusResponse
36, // 48: orchestrator.v1.PluginAuthService.Whoami:output_type -> orchestrator.v1.WhoamiResponse
33, // [33:49] is the sub-list for method output_type
17, // [17:33] is the sub-list for method input_type
17, // [17:17] is the sub-list for extension type_name 17, // [17:17] is the sub-list for extension type_name
17, // [17:17] is the sub-list for extension extendee 17, // [17:17] is the sub-list for extension extendee
0, // [0:17] is the sub-list for field type_name 0, // [0:17] is the sub-list for field type_name
@ -2291,7 +2506,7 @@ func file_orchestrator_v1_plugin_registry_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_orchestrator_v1_plugin_registry_proto_rawDesc), len(file_orchestrator_v1_plugin_registry_proto_rawDesc)), RawDescriptor: unsafe.Slice(unsafe.StringData(file_orchestrator_v1_plugin_registry_proto_rawDesc), len(file_orchestrator_v1_plugin_registry_proto_rawDesc)),
NumEnums: 0, NumEnums: 0,
NumMessages: 34, NumMessages: 38,
NumExtensions: 0, NumExtensions: 0,
NumServices: 4, NumServices: 4,
}, },

View File

@ -33,6 +33,8 @@ service PluginAuthService {
rpc StartDevice(StartDeviceRequest) returns (StartDeviceResponse); rpc StartDevice(StartDeviceRequest) returns (StartDeviceResponse);
rpc PollDevice(PollDeviceRequest) returns (PollDeviceResponse); rpc PollDevice(PollDeviceRequest) returns (PollDeviceResponse);
rpc ApproveDevice(ApproveDeviceRequest) returns (ApproveDeviceResponse); rpc ApproveDevice(ApproveDeviceRequest) returns (ApproveDeviceResponse);
rpc DenyDevice(DenyDeviceRequest) returns (DenyDeviceResponse);
rpc GetDeviceStatus(GetDeviceStatusRequest) returns (GetDeviceStatusResponse);
rpc Whoami(WhoamiRequest) returns (WhoamiResponse); rpc Whoami(WhoamiRequest) returns (WhoamiResponse);
} }
@ -190,6 +192,17 @@ message PollDeviceResponse {
message ApproveDeviceRequest { string user_code = 1; } message ApproveDeviceRequest { string user_code = 1; }
message ApproveDeviceResponse {} message ApproveDeviceResponse {}
message DenyDeviceRequest { string user_code = 1; }
message DenyDeviceResponse {}
message GetDeviceStatusRequest { string user_code = 1; }
message GetDeviceStatusResponse {
bool valid = 1;
bool authorized = 2;
bool denied = 3;
string client_id = 4;
}
message WhoamiRequest {} message WhoamiRequest {}
message WhoamiResponse { message WhoamiResponse {
string user_id = 1; string user_id = 1;