Merge branch 'proto' into 'master'

Proto

See merge request murphg62/2023-ca400-murphg62-byrnm257!1
This commit is contained in:
gaz8860 Gary 2023-03-24 12:43:40 +00:00
commit f2610758f2
6 changed files with 1717 additions and 0 deletions

13
src/backend/go.mod Normal file
View File

@ -0,0 +1,13 @@
module gitlab.computing.dcu.ie/murphg62/2023-ca400-murphg62-byrnm257/src/backend
go 1.19
require (
github.com/golang/protobuf v1.5.2 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect
google.golang.org/grpc v1.53.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
)

29
src/backend/go.sum Normal file
View File

@ -0,0 +1,29 @@
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw=
golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws=
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18=
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k=
golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/genproto v0.0.0-20230109162033-3c3c17ce83e6 h1:uUn6GsgKK2eCI0bWeRMgRCcqDaQXYDuB+5tXA5Xeg/8=
google.golang.org/genproto v0.0.0-20230109162033-3c3c17ce83e6/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM=
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 h1:DdoeryqhaXp1LtT/emMP1BRJPHHKFi5akj/nbx/zNTA=
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s=
google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U=
google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww=
google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc=
google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=

View File

@ -0,0 +1,481 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.30.0
// protoc v3.21.12
// source: components.proto
package proto
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 ComponentType int32
const (
ComponentType_Text ComponentType = 0
ComponentType_Chart ComponentType = 1
)
// Enum value maps for ComponentType.
var (
ComponentType_name = map[int32]string{
0: "Text",
1: "Chart",
}
ComponentType_value = map[string]int32{
"Text": 0,
"Chart": 1,
}
)
func (x ComponentType) Enum() *ComponentType {
p := new(ComponentType)
*p = x
return p
}
func (x ComponentType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ComponentType) Descriptor() protoreflect.EnumDescriptor {
return file_components_proto_enumTypes[0].Descriptor()
}
func (ComponentType) Type() protoreflect.EnumType {
return &file_components_proto_enumTypes[0]
}
func (x ComponentType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ComponentType.Descriptor instead.
func (ComponentType) EnumDescriptor() ([]byte, []int) {
return file_components_proto_rawDescGZIP(), []int{0}
}
type Component struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Type ComponentType `protobuf:"varint,3,opt,name=type,proto3,enum=panoptes.ComponentType" json:"type,omitempty"`
}
func (x *Component) Reset() {
*x = Component{}
if protoimpl.UnsafeEnabled {
mi := &file_components_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Component) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Component) ProtoMessage() {}
func (x *Component) ProtoReflect() protoreflect.Message {
mi := &file_components_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Component.ProtoReflect.Descriptor instead.
func (*Component) Descriptor() ([]byte, []int) {
return file_components_proto_rawDescGZIP(), []int{0}
}
func (x *Component) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Component) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Component) GetType() ComponentType {
if x != nil {
return x.Type
}
return ComponentType_Text
}
type Schema struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Components []*Component `protobuf:"bytes,1,rep,name=components,proto3" json:"components,omitempty"`
}
func (x *Schema) Reset() {
*x = Schema{}
if protoimpl.UnsafeEnabled {
mi := &file_components_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Schema) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Schema) ProtoMessage() {}
func (x *Schema) ProtoReflect() protoreflect.Message {
mi := &file_components_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Schema.ProtoReflect.Descriptor instead.
func (*Schema) Descriptor() ([]byte, []int) {
return file_components_proto_rawDescGZIP(), []int{1}
}
func (x *Schema) GetComponents() []*Component {
if x != nil {
return x.Components
}
return nil
}
type TextComponent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Id int32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"`
Websocket bool `protobuf:"varint,4,opt,name=websocket,proto3" json:"websocket,omitempty"`
}
func (x *TextComponent) Reset() {
*x = TextComponent{}
if protoimpl.UnsafeEnabled {
mi := &file_components_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TextComponent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TextComponent) ProtoMessage() {}
func (x *TextComponent) ProtoReflect() protoreflect.Message {
mi := &file_components_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TextComponent.ProtoReflect.Descriptor instead.
func (*TextComponent) Descriptor() ([]byte, []int) {
return file_components_proto_rawDescGZIP(), []int{2}
}
func (x *TextComponent) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *TextComponent) GetId() int32 {
if x != nil {
return x.Id
}
return 0
}
func (x *TextComponent) GetText() string {
if x != nil {
return x.Text
}
return ""
}
func (x *TextComponent) GetWebsocket() bool {
if x != nil {
return x.Websocket
}
return false
}
type ChartComponent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Id int32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
Labels []string `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty"`
Values []int32 `protobuf:"varint,5,rep,packed,name=values,proto3" json:"values,omitempty"`
Websocket bool `protobuf:"varint,6,opt,name=websocket,proto3" json:"websocket,omitempty"`
}
func (x *ChartComponent) Reset() {
*x = ChartComponent{}
if protoimpl.UnsafeEnabled {
mi := &file_components_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChartComponent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChartComponent) ProtoMessage() {}
func (x *ChartComponent) ProtoReflect() protoreflect.Message {
mi := &file_components_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChartComponent.ProtoReflect.Descriptor instead.
func (*ChartComponent) Descriptor() ([]byte, []int) {
return file_components_proto_rawDescGZIP(), []int{3}
}
func (x *ChartComponent) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *ChartComponent) GetId() int32 {
if x != nil {
return x.Id
}
return 0
}
func (x *ChartComponent) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *ChartComponent) GetLabels() []string {
if x != nil {
return x.Labels
}
return nil
}
func (x *ChartComponent) GetValues() []int32 {
if x != nil {
return x.Values
}
return nil
}
func (x *ChartComponent) GetWebsocket() bool {
if x != nil {
return x.Websocket
}
return false
}
var File_components_proto protoreflect.FileDescriptor
var file_components_proto_rawDesc = []byte{
0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x08, 0x70, 0x61, 0x6e, 0x6f, 0x70, 0x74, 0x65, 0x73, 0x22, 0x5c, 0x0a, 0x09,
0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a,
0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x61,
0x6e, 0x6f, 0x70, 0x74, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74,
0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3d, 0x0a, 0x06, 0x53, 0x63,
0x68, 0x65, 0x6d, 0x61, 0x12, 0x33, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e,
0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x6e, 0x6f, 0x70,
0x74, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x63,
0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x65, 0x0a, 0x0d, 0x54, 0x65, 0x78,
0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12,
0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65,
0x78, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x18,
0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74,
0x22, 0x96, 0x01, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x72, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e,
0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20,
0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c,
0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62,
0x65, 0x6c, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x05, 0x20,
0x03, 0x28, 0x05, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x77,
0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09,
0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2a, 0x24, 0x0a, 0x0d, 0x43, 0x6f, 0x6d,
0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x65,
0x78, 0x74, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x68, 0x61, 0x72, 0x74, 0x10, 0x01, 0x42,
0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x2e, 0x6d, 0x61, 0x6c, 0x61, 0x63, 0x68, 0x79, 0x2e, 0x69,
0x65, 0x2f, 0x6d, 0x61, 0x6c, 0x6d, 0x61, 0x6c, 0x32, 0x30, 0x30, 0x2f, 0x70, 0x61, 0x6e, 0x6f,
0x70, 0x74, 0x65, 0x73, 0x2f, 0x73, 0x72, 0x63, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_components_proto_rawDescOnce sync.Once
file_components_proto_rawDescData = file_components_proto_rawDesc
)
func file_components_proto_rawDescGZIP() []byte {
file_components_proto_rawDescOnce.Do(func() {
file_components_proto_rawDescData = protoimpl.X.CompressGZIP(file_components_proto_rawDescData)
})
return file_components_proto_rawDescData
}
var file_components_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_components_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_components_proto_goTypes = []interface{}{
(ComponentType)(0), // 0: panoptes.ComponentType
(*Component)(nil), // 1: panoptes.Component
(*Schema)(nil), // 2: panoptes.Schema
(*TextComponent)(nil), // 3: panoptes.TextComponent
(*ChartComponent)(nil), // 4: panoptes.ChartComponent
}
var file_components_proto_depIdxs = []int32{
0, // 0: panoptes.Component.type:type_name -> panoptes.ComponentType
1, // 1: panoptes.Schema.components:type_name -> panoptes.Component
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_components_proto_init() }
func file_components_proto_init() {
if File_components_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_components_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Component); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_components_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Schema); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_components_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TextComponent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_components_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChartComponent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_components_proto_rawDesc,
NumEnums: 1,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_components_proto_goTypes,
DependencyIndexes: file_components_proto_depIdxs,
EnumInfos: file_components_proto_enumTypes,
MessageInfos: file_components_proto_msgTypes,
}.Build()
File_components_proto = out.File
file_components_proto_rawDesc = nil
file_components_proto_goTypes = nil
file_components_proto_depIdxs = nil
}

View File

@ -0,0 +1,35 @@
syntax = "proto3";
package panoptes;
option go_package = "git.malachy.ie/malmal200/panoptes/src/common/proto";
enum ComponentType {
Text = 0;
Chart = 1;
}
message Component {
string id = 1;
string name = 2;
ComponentType type = 3;
}
message Schema {
repeated Component components = 1;
}
message TextComponent {
string name = 1;
int32 id = 2;
string text = 3;
bool websocket = 4;
}
message ChartComponent {
string name = 1;
int32 id = 2;
string type = 3;
repeated string labels = 4;
repeated int32 values = 5;
bool websocket = 6;
}

2
src/common/proto/gen.sh Executable file
View File

@ -0,0 +1,2 @@
protoc -I=$(pwd) --go_out=../../backend/pb/ --go_opt=paths=source_relative components.proto
protoc -I=$(pwd) --csharp_out=../../frontend/pb/ components.proto

File diff suppressed because it is too large Load Diff