implement simple tui with humans data
This commit is contained in:
@@ -0,0 +1,431 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.35.1
|
||||
// protoc v5.28.3
|
||||
// source: helios/keypad/keypad.proto
|
||||
|
||||
package pbkeypad
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type GetConfigRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *GetConfigRequest) Reset() {
|
||||
*x = GetConfigRequest{}
|
||||
mi := &file_helios_keypad_keypad_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetConfigRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetConfigRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetConfigRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_helios_keypad_keypad_proto_msgTypes[0]
|
||||
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 GetConfigRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetConfigRequest) Descriptor() ([]byte, []int) {
|
||||
return file_helios_keypad_keypad_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
type GetConfigResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
YamlConfig string `protobuf:"bytes,1,opt,name=yaml_config,json=yamlConfig,proto3" json:"yaml_config,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetConfigResponse) Reset() {
|
||||
*x = GetConfigResponse{}
|
||||
mi := &file_helios_keypad_keypad_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetConfigResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetConfigResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetConfigResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_helios_keypad_keypad_proto_msgTypes[1]
|
||||
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 GetConfigResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetConfigResponse) Descriptor() ([]byte, []int) {
|
||||
return file_helios_keypad_keypad_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *GetConfigResponse) GetYamlConfig() string {
|
||||
if x != nil {
|
||||
return x.YamlConfig
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type SaveConfigRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
YamlConfig string `protobuf:"bytes,1,opt,name=yaml_config,json=yamlConfig,proto3" json:"yaml_config,omitempty"`
|
||||
}
|
||||
|
||||
func (x *SaveConfigRequest) Reset() {
|
||||
*x = SaveConfigRequest{}
|
||||
mi := &file_helios_keypad_keypad_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SaveConfigRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SaveConfigRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SaveConfigRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_helios_keypad_keypad_proto_msgTypes[2]
|
||||
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 SaveConfigRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SaveConfigRequest) Descriptor() ([]byte, []int) {
|
||||
return file_helios_keypad_keypad_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *SaveConfigRequest) GetYamlConfig() string {
|
||||
if x != nil {
|
||||
return x.YamlConfig
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type SaveConfigResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *SaveConfigResponse) Reset() {
|
||||
*x = SaveConfigResponse{}
|
||||
mi := &file_helios_keypad_keypad_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SaveConfigResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SaveConfigResponse) ProtoMessage() {}
|
||||
|
||||
func (x *SaveConfigResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_helios_keypad_keypad_proto_msgTypes[3]
|
||||
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 SaveConfigResponse.ProtoReflect.Descriptor instead.
|
||||
func (*SaveConfigResponse) Descriptor() ([]byte, []int) {
|
||||
return file_helios_keypad_keypad_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
type ListKeypadsRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *ListKeypadsRequest) Reset() {
|
||||
*x = ListKeypadsRequest{}
|
||||
mi := &file_helios_keypad_keypad_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListKeypadsRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListKeypadsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListKeypadsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_helios_keypad_keypad_proto_msgTypes[4]
|
||||
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 ListKeypadsRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListKeypadsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_helios_keypad_keypad_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
type ListKeypadsResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
HumanKeypads []*ListKeypadsResponse_HumanKeypad `protobuf:"bytes,1,rep,name=human_keypads,json=humanKeypads,proto3" json:"human_keypads,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListKeypadsResponse) Reset() {
|
||||
*x = ListKeypadsResponse{}
|
||||
mi := &file_helios_keypad_keypad_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListKeypadsResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListKeypadsResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListKeypadsResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_helios_keypad_keypad_proto_msgTypes[5]
|
||||
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 ListKeypadsResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListKeypadsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_helios_keypad_keypad_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *ListKeypadsResponse) GetHumanKeypads() []*ListKeypadsResponse_HumanKeypad {
|
||||
if x != nil {
|
||||
return x.HumanKeypads
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ListKeypadsResponse_HumanKeypad struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
HumanId string `protobuf:"bytes,1,opt,name=human_id,json=humanId,proto3" json:"human_id,omitempty"`
|
||||
YamlConfig string `protobuf:"bytes,2,opt,name=yaml_config,json=yamlConfig,proto3" json:"yaml_config,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListKeypadsResponse_HumanKeypad) Reset() {
|
||||
*x = ListKeypadsResponse_HumanKeypad{}
|
||||
mi := &file_helios_keypad_keypad_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListKeypadsResponse_HumanKeypad) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListKeypadsResponse_HumanKeypad) ProtoMessage() {}
|
||||
|
||||
func (x *ListKeypadsResponse_HumanKeypad) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_helios_keypad_keypad_proto_msgTypes[6]
|
||||
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 ListKeypadsResponse_HumanKeypad.ProtoReflect.Descriptor instead.
|
||||
func (*ListKeypadsResponse_HumanKeypad) Descriptor() ([]byte, []int) {
|
||||
return file_helios_keypad_keypad_proto_rawDescGZIP(), []int{5, 0}
|
||||
}
|
||||
|
||||
func (x *ListKeypadsResponse_HumanKeypad) GetHumanId() string {
|
||||
if x != nil {
|
||||
return x.HumanId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ListKeypadsResponse_HumanKeypad) GetYamlConfig() string {
|
||||
if x != nil {
|
||||
return x.YamlConfig
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_helios_keypad_keypad_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_helios_keypad_keypad_proto_rawDesc = []byte{
|
||||
0x0a, 0x1a, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2f, 0x6b, 0x65, 0x79, 0x70, 0x61, 0x64, 0x2f,
|
||||
0x6b, 0x65, 0x79, 0x70, 0x61, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x68, 0x65,
|
||||
0x6c, 0x69, 0x6f, 0x73, 0x2e, 0x6b, 0x65, 0x79, 0x70, 0x61, 0x64, 0x22, 0x12, 0x0a, 0x10, 0x47,
|
||||
0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22,
|
||||
0x34, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x79, 0x61, 0x6d, 0x6c, 0x5f, 0x63, 0x6f, 0x6e,
|
||||
0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x79, 0x61, 0x6d, 0x6c, 0x43,
|
||||
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x34, 0x0a, 0x11, 0x53, 0x61, 0x76, 0x65, 0x43, 0x6f, 0x6e,
|
||||
0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x79, 0x61,
|
||||
0x6d, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x0a, 0x79, 0x61, 0x6d, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x14, 0x0a, 0x12, 0x53,
|
||||
0x61, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x14, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x70, 0x61, 0x64, 0x73,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xb5, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x4b, 0x65, 0x79, 0x70, 0x61, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||
0x53, 0x0a, 0x0d, 0x68, 0x75, 0x6d, 0x61, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x70, 0x61, 0x64, 0x73,
|
||||
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2e,
|
||||
0x6b, 0x65, 0x79, 0x70, 0x61, 0x64, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x70, 0x61,
|
||||
0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x75, 0x6d, 0x61, 0x6e,
|
||||
0x4b, 0x65, 0x79, 0x70, 0x61, 0x64, 0x52, 0x0c, 0x68, 0x75, 0x6d, 0x61, 0x6e, 0x4b, 0x65, 0x79,
|
||||
0x70, 0x61, 0x64, 0x73, 0x1a, 0x49, 0x0a, 0x0b, 0x48, 0x75, 0x6d, 0x61, 0x6e, 0x4b, 0x65, 0x79,
|
||||
0x70, 0x61, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x75, 0x6d, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x75, 0x6d, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1f,
|
||||
0x0a, 0x0b, 0x79, 0x61, 0x6d, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x0a, 0x79, 0x61, 0x6d, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x32,
|
||||
0x88, 0x02, 0x0a, 0x0d, 0x4b, 0x65, 0x79, 0x70, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x12, 0x4e, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1f,
|
||||
0x2e, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2e, 0x6b, 0x65, 0x79, 0x70, 0x61, 0x64, 0x2e, 0x47,
|
||||
0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x20, 0x2e, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2e, 0x6b, 0x65, 0x79, 0x70, 0x61, 0x64, 0x2e,
|
||||
0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x51, 0x0a, 0x0a, 0x53, 0x61, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12,
|
||||
0x20, 0x2e, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2e, 0x6b, 0x65, 0x79, 0x70, 0x61, 0x64, 0x2e,
|
||||
0x53, 0x61, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x21, 0x2e, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2e, 0x6b, 0x65, 0x79, 0x70, 0x61,
|
||||
0x64, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x70,
|
||||
0x61, 0x64, 0x73, 0x12, 0x21, 0x2e, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2e, 0x6b, 0x65, 0x79,
|
||||
0x70, 0x61, 0x64, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x70, 0x61, 0x64, 0x73, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2e,
|
||||
0x6b, 0x65, 0x79, 0x70, 0x61, 0x64, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x70, 0x61,
|
||||
0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3e, 0x5a, 0x3c, 0x67, 0x69,
|
||||
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x6f, 0x77, 0x79, 0x2d, 0x6c,
|
||||
0x69, 0x76, 0x65, 0x2f, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x2f, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2f, 0x6b, 0x65, 0x79, 0x70, 0x61,
|
||||
0x64, 0x3b, 0x70, 0x62, 0x6b, 0x65, 0x79, 0x70, 0x61, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_helios_keypad_keypad_proto_rawDescOnce sync.Once
|
||||
file_helios_keypad_keypad_proto_rawDescData = file_helios_keypad_keypad_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_helios_keypad_keypad_proto_rawDescGZIP() []byte {
|
||||
file_helios_keypad_keypad_proto_rawDescOnce.Do(func() {
|
||||
file_helios_keypad_keypad_proto_rawDescData = protoimpl.X.CompressGZIP(file_helios_keypad_keypad_proto_rawDescData)
|
||||
})
|
||||
return file_helios_keypad_keypad_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_helios_keypad_keypad_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||
var file_helios_keypad_keypad_proto_goTypes = []any{
|
||||
(*GetConfigRequest)(nil), // 0: helios.keypad.GetConfigRequest
|
||||
(*GetConfigResponse)(nil), // 1: helios.keypad.GetConfigResponse
|
||||
(*SaveConfigRequest)(nil), // 2: helios.keypad.SaveConfigRequest
|
||||
(*SaveConfigResponse)(nil), // 3: helios.keypad.SaveConfigResponse
|
||||
(*ListKeypadsRequest)(nil), // 4: helios.keypad.ListKeypadsRequest
|
||||
(*ListKeypadsResponse)(nil), // 5: helios.keypad.ListKeypadsResponse
|
||||
(*ListKeypadsResponse_HumanKeypad)(nil), // 6: helios.keypad.ListKeypadsResponse.HumanKeypad
|
||||
}
|
||||
var file_helios_keypad_keypad_proto_depIdxs = []int32{
|
||||
6, // 0: helios.keypad.ListKeypadsResponse.human_keypads:type_name -> helios.keypad.ListKeypadsResponse.HumanKeypad
|
||||
0, // 1: helios.keypad.KeypadService.GetConfig:input_type -> helios.keypad.GetConfigRequest
|
||||
2, // 2: helios.keypad.KeypadService.SaveConfig:input_type -> helios.keypad.SaveConfigRequest
|
||||
4, // 3: helios.keypad.KeypadService.ListKeypads:input_type -> helios.keypad.ListKeypadsRequest
|
||||
1, // 4: helios.keypad.KeypadService.GetConfig:output_type -> helios.keypad.GetConfigResponse
|
||||
3, // 5: helios.keypad.KeypadService.SaveConfig:output_type -> helios.keypad.SaveConfigResponse
|
||||
5, // 6: helios.keypad.KeypadService.ListKeypads:output_type -> helios.keypad.ListKeypadsResponse
|
||||
4, // [4:7] is the sub-list for method output_type
|
||||
1, // [1:4] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_helios_keypad_keypad_proto_init() }
|
||||
func file_helios_keypad_keypad_proto_init() {
|
||||
if File_helios_keypad_keypad_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_helios_keypad_keypad_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 7,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_helios_keypad_keypad_proto_goTypes,
|
||||
DependencyIndexes: file_helios_keypad_keypad_proto_depIdxs,
|
||||
MessageInfos: file_helios_keypad_keypad_proto_msgTypes,
|
||||
}.Build()
|
||||
File_helios_keypad_keypad_proto = out.File
|
||||
file_helios_keypad_keypad_proto_rawDesc = nil
|
||||
file_helios_keypad_keypad_proto_goTypes = nil
|
||||
file_helios_keypad_keypad_proto_depIdxs = nil
|
||||
}
|
||||
@@ -0,0 +1,203 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v5.28.3
|
||||
// source: helios/keypad/keypad.proto
|
||||
|
||||
package pbkeypad
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
KeypadService_GetConfig_FullMethodName = "/helios.keypad.KeypadService/GetConfig"
|
||||
KeypadService_SaveConfig_FullMethodName = "/helios.keypad.KeypadService/SaveConfig"
|
||||
KeypadService_ListKeypads_FullMethodName = "/helios.keypad.KeypadService/ListKeypads"
|
||||
)
|
||||
|
||||
// KeypadServiceClient is the client API for KeypadService 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.
|
||||
type KeypadServiceClient interface {
|
||||
// Requires authed human.
|
||||
GetConfig(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*GetConfigResponse, error)
|
||||
// Requires authed human.
|
||||
SaveConfig(ctx context.Context, in *SaveConfigRequest, opts ...grpc.CallOption) (*SaveConfigResponse, error)
|
||||
// Requires admin.
|
||||
ListKeypads(ctx context.Context, in *ListKeypadsRequest, opts ...grpc.CallOption) (*ListKeypadsResponse, error)
|
||||
}
|
||||
|
||||
type keypadServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewKeypadServiceClient(cc grpc.ClientConnInterface) KeypadServiceClient {
|
||||
return &keypadServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *keypadServiceClient) GetConfig(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*GetConfigResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetConfigResponse)
|
||||
err := c.cc.Invoke(ctx, KeypadService_GetConfig_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *keypadServiceClient) SaveConfig(ctx context.Context, in *SaveConfigRequest, opts ...grpc.CallOption) (*SaveConfigResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SaveConfigResponse)
|
||||
err := c.cc.Invoke(ctx, KeypadService_SaveConfig_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *keypadServiceClient) ListKeypads(ctx context.Context, in *ListKeypadsRequest, opts ...grpc.CallOption) (*ListKeypadsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListKeypadsResponse)
|
||||
err := c.cc.Invoke(ctx, KeypadService_ListKeypads_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// KeypadServiceServer is the server API for KeypadService service.
|
||||
// All implementations must embed UnimplementedKeypadServiceServer
|
||||
// for forward compatibility.
|
||||
type KeypadServiceServer interface {
|
||||
// Requires authed human.
|
||||
GetConfig(context.Context, *GetConfigRequest) (*GetConfigResponse, error)
|
||||
// Requires authed human.
|
||||
SaveConfig(context.Context, *SaveConfigRequest) (*SaveConfigResponse, error)
|
||||
// Requires admin.
|
||||
ListKeypads(context.Context, *ListKeypadsRequest) (*ListKeypadsResponse, error)
|
||||
mustEmbedUnimplementedKeypadServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedKeypadServiceServer 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.
|
||||
type UnimplementedKeypadServiceServer struct{}
|
||||
|
||||
func (UnimplementedKeypadServiceServer) GetConfig(context.Context, *GetConfigRequest) (*GetConfigResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetConfig not implemented")
|
||||
}
|
||||
func (UnimplementedKeypadServiceServer) SaveConfig(context.Context, *SaveConfigRequest) (*SaveConfigResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SaveConfig not implemented")
|
||||
}
|
||||
func (UnimplementedKeypadServiceServer) ListKeypads(context.Context, *ListKeypadsRequest) (*ListKeypadsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListKeypads not implemented")
|
||||
}
|
||||
func (UnimplementedKeypadServiceServer) mustEmbedUnimplementedKeypadServiceServer() {}
|
||||
func (UnimplementedKeypadServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeKeypadServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to KeypadServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeKeypadServiceServer interface {
|
||||
mustEmbedUnimplementedKeypadServiceServer()
|
||||
}
|
||||
|
||||
func RegisterKeypadServiceServer(s grpc.ServiceRegistrar, srv KeypadServiceServer) {
|
||||
// If the following call pancis, it indicates UnimplementedKeypadServiceServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&KeypadService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _KeypadService_GetConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetConfigRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(KeypadServiceServer).GetConfig(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: KeypadService_GetConfig_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(KeypadServiceServer).GetConfig(ctx, req.(*GetConfigRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _KeypadService_SaveConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SaveConfigRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(KeypadServiceServer).SaveConfig(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: KeypadService_SaveConfig_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(KeypadServiceServer).SaveConfig(ctx, req.(*SaveConfigRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _KeypadService_ListKeypads_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListKeypadsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(KeypadServiceServer).ListKeypads(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: KeypadService_ListKeypads_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(KeypadServiceServer).ListKeypads(ctx, req.(*ListKeypadsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// KeypadService_ServiceDesc is the grpc.ServiceDesc for KeypadService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var KeypadService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "helios.keypad.KeypadService",
|
||||
HandlerType: (*KeypadServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetConfig",
|
||||
Handler: _KeypadService_GetConfig_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SaveConfig",
|
||||
Handler: _KeypadService_SaveConfig_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListKeypads",
|
||||
Handler: _KeypadService_ListKeypads_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "helios/keypad/keypad.proto",
|
||||
}
|
||||
Reference in New Issue
Block a user