From b57dc1a90a3af16766eb295ac763c76a60859cf0 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 3 Jan 2024 14:29:37 -0600 Subject: [PATCH] moved from go.wit.com/gui --- Makefile | 34 +++ widget.pb.go | 712 +++++++++++++++++++++++++++++++++++++++++++++++++++ widget.proto | 117 +++++++++ 3 files changed, 863 insertions(+) create mode 100644 Makefile create mode 100644 widget.pb.go create mode 100644 widget.proto diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7dd70be --- /dev/null +++ b/Makefile @@ -0,0 +1,34 @@ +all: + # You must use the current protoc-gen-go + # protoc --version 3.6++ does not mean that protoc will generate version3 .go files + # + # apt remove golang-goprotobuf-dev + # apt install protobuf-compiler + # + # Then: + # go get -u github.com/golang/protobuf/protoc-gen-go + # cd ~/go/src/github.com/golang/protobuf/protoc-gen-go + # go install + # + # Then: + protoc --version + make widget.pb.go + +clean: + rm -f *.pb.go + +widget.pb.go: widget.proto + protoc --go_out=. widget.proto + +compile: + protoc --go_out=. *.proto + +deps: + apt install golang-goprotobuf-dev + apt install protobuf-compiler + +push: + git pull + git add --all + git commit -a -s + git push diff --git a/widget.pb.go b/widget.pb.go new file mode 100644 index 0000000..1d3efb6 --- /dev/null +++ b/widget.pb.go @@ -0,0 +1,712 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: widget.proto + +package guiProtobuf + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +type Action_WidgetType int32 + +const ( + Action_Unknown Action_WidgetType = 0 + Action_Root Action_WidgetType = 1 + Action_Flag Action_WidgetType = 2 + Action_Window Action_WidgetType = 3 + Action_Tab Action_WidgetType = 4 + Action_Frame Action_WidgetType = 5 + Action_Grid Action_WidgetType = 6 + Action_Group Action_WidgetType = 7 + Action_Box Action_WidgetType = 8 + Action_Button Action_WidgetType = 9 + Action_Checkbox Action_WidgetType = 10 + Action_Dropdown Action_WidgetType = 11 + Action_Combobox Action_WidgetType = 12 + Action_Label Action_WidgetType = 13 + Action_Textbox Action_WidgetType = 14 + Action_Slider Action_WidgetType = 15 + Action_Spinner Action_WidgetType = 16 + Action_Separator Action_WidgetType = 17 + Action_Image Action_WidgetType = 18 + Action_Area Action_WidgetType = 19 + Action_Form Action_WidgetType = 20 + Action_Font Action_WidgetType = 21 + Action_Color Action_WidgetType = 22 + Action_Dialog Action_WidgetType = 23 + Action_Stdout Action_WidgetType = 24 +) + +var Action_WidgetType_name = map[int32]string{ + 0: "Unknown", + 1: "Root", + 2: "Flag", + 3: "Window", + 4: "Tab", + 5: "Frame", + 6: "Grid", + 7: "Group", + 8: "Box", + 9: "Button", + 10: "Checkbox", + 11: "Dropdown", + 12: "Combobox", + 13: "Label", + 14: "Textbox", + 15: "Slider", + 16: "Spinner", + 17: "Separator", + 18: "Image", + 19: "Area", + 20: "Form", + 21: "Font", + 22: "Color", + 23: "Dialog", + 24: "Stdout", +} + +var Action_WidgetType_value = map[string]int32{ + "Unknown": 0, + "Root": 1, + "Flag": 2, + "Window": 3, + "Tab": 4, + "Frame": 5, + "Grid": 6, + "Group": 7, + "Box": 8, + "Button": 9, + "Checkbox": 10, + "Dropdown": 11, + "Combobox": 12, + "Label": 13, + "Textbox": 14, + "Slider": 15, + "Spinner": 16, + "Separator": 17, + "Image": 18, + "Area": 19, + "Form": 20, + "Font": 21, + "Color": 22, + "Dialog": 23, + "Stdout": 24, +} + +func (x Action_WidgetType) String() string { + return proto.EnumName(Action_WidgetType_name, int32(x)) +} + +func (Action_WidgetType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_95b5c33b51e24547, []int{0, 0} +} + +type Action_ActionType int32 + +const ( + Action_Health Action_ActionType = 0 + Action_Add Action_ActionType = 1 + Action_Delete Action_ActionType = 2 + Action_Get Action_ActionType = 3 + Action_Set Action_ActionType = 4 + Action_GetText Action_ActionType = 5 + Action_SetText Action_ActionType = 6 + Action_AddText Action_ActionType = 7 + Action_Show Action_ActionType = 8 + Action_Hide Action_ActionType = 9 + Action_Enable Action_ActionType = 10 + Action_Disable Action_ActionType = 11 + Action_Margin Action_ActionType = 12 + Action_Unmargin Action_ActionType = 13 + Action_Pad Action_ActionType = 14 + Action_Unpad Action_ActionType = 15 + Action_Append Action_ActionType = 16 + Action_Move Action_ActionType = 17 + Action_Dump Action_ActionType = 18 + Action_User Action_ActionType = 19 + Action_InitToolkit Action_ActionType = 20 + Action_CloseToolkit Action_ActionType = 21 + Action_UserQuit Action_ActionType = 22 + Action_EnableDebug Action_ActionType = 23 +) + +var Action_ActionType_name = map[int32]string{ + 0: "Health", + 1: "Add", + 2: "Delete", + 3: "Get", + 4: "Set", + 5: "GetText", + 6: "SetText", + 7: "AddText", + 8: "Show", + 9: "Hide", + 10: "Enable", + 11: "Disable", + 12: "Margin", + 13: "Unmargin", + 14: "Pad", + 15: "Unpad", + 16: "Append", + 17: "Move", + 18: "Dump", + 19: "User", + 20: "InitToolkit", + 21: "CloseToolkit", + 22: "UserQuit", + 23: "EnableDebug", +} + +var Action_ActionType_value = map[string]int32{ + "Health": 0, + "Add": 1, + "Delete": 2, + "Get": 3, + "Set": 4, + "GetText": 5, + "SetText": 6, + "AddText": 7, + "Show": 8, + "Hide": 9, + "Enable": 10, + "Disable": 11, + "Margin": 12, + "Unmargin": 13, + "Pad": 14, + "Unpad": 15, + "Append": 16, + "Move": 17, + "Dump": 18, + "User": 19, + "InitToolkit": 20, + "CloseToolkit": 21, + "UserQuit": 22, + "EnableDebug": 23, +} + +func (x Action_ActionType) String() string { + return proto.EnumName(Action_ActionType_name, int32(x)) +} + +func (Action_ActionType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_95b5c33b51e24547, []int{0, 1} +} + +type Action struct { + WidgetType Action_WidgetType `protobuf:"varint,1,opt,name=widgetType,proto3,enum=guiProtobuf.Action_WidgetType" json:"widgetType,omitempty"` + ActionType Action_ActionType `protobuf:"varint,2,opt,name=actionType,proto3,enum=guiProtobuf.Action_ActionType" json:"actionType,omitempty"` + WidgetId int64 `protobuf:"varint,3,opt,name=widgetId,proto3" json:"widgetId,omitempty"` + ParentId int64 `protobuf:"varint,4,opt,name=parentId,proto3" json:"parentId,omitempty"` + Text string `protobuf:"bytes,5,opt,name=text,proto3" json:"text,omitempty"` + Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` + // This is how the values are passed back and forth + // values from things like checkboxes & dropdown's + B bool `protobuf:"varint,7,opt,name=b,proto3" json:"b,omitempty"` + I int64 `protobuf:"varint,8,opt,name=i,proto3" json:"i,omitempty"` + S string `protobuf:"bytes,9,opt,name=s,proto3" json:"s,omitempty"` + // This is used for things like a slider(0,100) + X int64 `protobuf:"varint,10,opt,name=x,proto3" json:"x,omitempty"` + Y int64 `protobuf:"varint,11,opt,name=y,proto3" json:"y,omitempty"` + // This is for the grid size & widget position + W int64 `protobuf:"varint,12,opt,name=w,proto3" json:"w,omitempty"` + H int64 `protobuf:"varint,13,opt,name=h,proto3" json:"h,omitempty"` + Atw int64 `protobuf:"varint,14,opt,name=atw,proto3" json:"atw,omitempty"` + Ath int64 `protobuf:"varint,15,opt,name=ath,proto3" json:"ath,omitempty"` + Margin bool `protobuf:"varint,16,opt,name=margin,proto3" json:"margin,omitempty"` + Expand bool `protobuf:"varint,17,opt,name=expand,proto3" json:"expand,omitempty"` + Results []*Action_Response `protobuf:"bytes,18,rep,name=results,proto3" json:"results,omitempty"` + Networks []*Action_Network `protobuf:"bytes,19,rep,name=networks,proto3" json:"networks,omitempty"` + Vms []*Action_VM `protobuf:"bytes,20,rep,name=vms,proto3" json:"vms,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Action) Reset() { *m = Action{} } +func (m *Action) String() string { return proto.CompactTextString(m) } +func (*Action) ProtoMessage() {} +func (*Action) Descriptor() ([]byte, []int) { + return fileDescriptor_95b5c33b51e24547, []int{0} +} + +func (m *Action) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Action.Unmarshal(m, b) +} +func (m *Action) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Action.Marshal(b, m, deterministic) +} +func (m *Action) XXX_Merge(src proto.Message) { + xxx_messageInfo_Action.Merge(m, src) +} +func (m *Action) XXX_Size() int { + return xxx_messageInfo_Action.Size(m) +} +func (m *Action) XXX_DiscardUnknown() { + xxx_messageInfo_Action.DiscardUnknown(m) +} + +var xxx_messageInfo_Action proto.InternalMessageInfo + +func (m *Action) GetWidgetType() Action_WidgetType { + if m != nil { + return m.WidgetType + } + return Action_Unknown +} + +func (m *Action) GetActionType() Action_ActionType { + if m != nil { + return m.ActionType + } + return Action_Health +} + +func (m *Action) GetWidgetId() int64 { + if m != nil { + return m.WidgetId + } + return 0 +} + +func (m *Action) GetParentId() int64 { + if m != nil { + return m.ParentId + } + return 0 +} + +func (m *Action) GetText() string { + if m != nil { + return m.Text + } + return "" +} + +func (m *Action) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Action) GetB() bool { + if m != nil { + return m.B + } + return false +} + +func (m *Action) GetI() int64 { + if m != nil { + return m.I + } + return 0 +} + +func (m *Action) GetS() string { + if m != nil { + return m.S + } + return "" +} + +func (m *Action) GetX() int64 { + if m != nil { + return m.X + } + return 0 +} + +func (m *Action) GetY() int64 { + if m != nil { + return m.Y + } + return 0 +} + +func (m *Action) GetW() int64 { + if m != nil { + return m.W + } + return 0 +} + +func (m *Action) GetH() int64 { + if m != nil { + return m.H + } + return 0 +} + +func (m *Action) GetAtw() int64 { + if m != nil { + return m.Atw + } + return 0 +} + +func (m *Action) GetAth() int64 { + if m != nil { + return m.Ath + } + return 0 +} + +func (m *Action) GetMargin() bool { + if m != nil { + return m.Margin + } + return false +} + +func (m *Action) GetExpand() bool { + if m != nil { + return m.Expand + } + return false +} + +func (m *Action) GetResults() []*Action_Response { + if m != nil { + return m.Results + } + return nil +} + +func (m *Action) GetNetworks() []*Action_Network { + if m != nil { + return m.Networks + } + return nil +} + +func (m *Action) GetVms() []*Action_VM { + if m != nil { + return m.Vms + } + return nil +} + +type Action_Response struct { + // ActionType type = 1; + Id int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` + Snippets []string `protobuf:"bytes,5,rep,name=snippets,proto3" json:"snippets,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Action_Response) Reset() { *m = Action_Response{} } +func (m *Action_Response) String() string { return proto.CompactTextString(m) } +func (*Action_Response) ProtoMessage() {} +func (*Action_Response) Descriptor() ([]byte, []int) { + return fileDescriptor_95b5c33b51e24547, []int{0, 0} +} + +func (m *Action_Response) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Action_Response.Unmarshal(m, b) +} +func (m *Action_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Action_Response.Marshal(b, m, deterministic) +} +func (m *Action_Response) XXX_Merge(src proto.Message) { + xxx_messageInfo_Action_Response.Merge(m, src) +} +func (m *Action_Response) XXX_Size() int { + return xxx_messageInfo_Action_Response.Size(m) +} +func (m *Action_Response) XXX_DiscardUnknown() { + xxx_messageInfo_Action_Response.DiscardUnknown(m) +} + +var xxx_messageInfo_Action_Response proto.InternalMessageInfo + +func (m *Action_Response) GetId() int64 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *Action_Response) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Action_Response) GetError() string { + if m != nil { + return m.Error + } + return "" +} + +func (m *Action_Response) GetSnippets() []string { + if m != nil { + return m.Snippets + } + return nil +} + +type Action_Network struct { + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + TotalCpu int64 `protobuf:"varint,3,opt,name=total_cpu,json=totalCpu,proto3" json:"total_cpu,omitempty"` + TotalMem int64 `protobuf:"varint,4,opt,name=total_mem,json=totalMem,proto3" json:"total_mem,omitempty"` + LoginUrl string `protobuf:"bytes,5,opt,name=login_url,json=loginUrl,proto3" json:"login_url,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Action_Network) Reset() { *m = Action_Network{} } +func (m *Action_Network) String() string { return proto.CompactTextString(m) } +func (*Action_Network) ProtoMessage() {} +func (*Action_Network) Descriptor() ([]byte, []int) { + return fileDescriptor_95b5c33b51e24547, []int{0, 1} +} + +func (m *Action_Network) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Action_Network.Unmarshal(m, b) +} +func (m *Action_Network) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Action_Network.Marshal(b, m, deterministic) +} +func (m *Action_Network) XXX_Merge(src proto.Message) { + xxx_messageInfo_Action_Network.Merge(m, src) +} +func (m *Action_Network) XXX_Size() int { + return xxx_messageInfo_Action_Network.Size(m) +} +func (m *Action_Network) XXX_DiscardUnknown() { + xxx_messageInfo_Action_Network.DiscardUnknown(m) +} + +var xxx_messageInfo_Action_Network proto.InternalMessageInfo + +func (m *Action_Network) GetId() int64 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *Action_Network) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Action_Network) GetTotalCpu() int64 { + if m != nil { + return m.TotalCpu + } + return 0 +} + +func (m *Action_Network) GetTotalMem() int64 { + if m != nil { + return m.TotalMem + } + return 0 +} + +func (m *Action_Network) GetLoginUrl() string { + if m != nil { + return m.LoginUrl + } + return "" +} + +type Action_VM struct { + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Hostname string `protobuf:"bytes,3,opt,name=hostname,proto3" json:"hostname,omitempty"` + Cpus int64 `protobuf:"varint,4,opt,name=cpus,proto3" json:"cpus,omitempty"` + Memory int64 `protobuf:"varint,5,opt,name=memory,proto3" json:"memory,omitempty"` + Disk int64 `protobuf:"varint,6,opt,name=disk,proto3" json:"disk,omitempty"` + IPv6 string `protobuf:"bytes,7,opt,name=IPv6,proto3" json:"IPv6,omitempty"` + Role string `protobuf:"bytes,8,opt,name=role,proto3" json:"role,omitempty"` + BaseImage string `protobuf:"bytes,9,opt,name=baseImage,proto3" json:"baseImage,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Action_VM) Reset() { *m = Action_VM{} } +func (m *Action_VM) String() string { return proto.CompactTextString(m) } +func (*Action_VM) ProtoMessage() {} +func (*Action_VM) Descriptor() ([]byte, []int) { + return fileDescriptor_95b5c33b51e24547, []int{0, 2} +} + +func (m *Action_VM) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Action_VM.Unmarshal(m, b) +} +func (m *Action_VM) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Action_VM.Marshal(b, m, deterministic) +} +func (m *Action_VM) XXX_Merge(src proto.Message) { + xxx_messageInfo_Action_VM.Merge(m, src) +} +func (m *Action_VM) XXX_Size() int { + return xxx_messageInfo_Action_VM.Size(m) +} +func (m *Action_VM) XXX_DiscardUnknown() { + xxx_messageInfo_Action_VM.DiscardUnknown(m) +} + +var xxx_messageInfo_Action_VM proto.InternalMessageInfo + +func (m *Action_VM) GetId() int64 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *Action_VM) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Action_VM) GetHostname() string { + if m != nil { + return m.Hostname + } + return "" +} + +func (m *Action_VM) GetCpus() int64 { + if m != nil { + return m.Cpus + } + return 0 +} + +func (m *Action_VM) GetMemory() int64 { + if m != nil { + return m.Memory + } + return 0 +} + +func (m *Action_VM) GetDisk() int64 { + if m != nil { + return m.Disk + } + return 0 +} + +func (m *Action_VM) GetIPv6() string { + if m != nil { + return m.IPv6 + } + return "" +} + +func (m *Action_VM) GetRole() string { + if m != nil { + return m.Role + } + return "" +} + +func (m *Action_VM) GetBaseImage() string { + if m != nil { + return m.BaseImage + } + return "" +} + +func init() { + proto.RegisterEnum("guiProtobuf.Action_WidgetType", Action_WidgetType_name, Action_WidgetType_value) + proto.RegisterEnum("guiProtobuf.Action_ActionType", Action_ActionType_name, Action_ActionType_value) + proto.RegisterType((*Action)(nil), "guiProtobuf.Action") + proto.RegisterType((*Action_Response)(nil), "guiProtobuf.Action.Response") + proto.RegisterType((*Action_Network)(nil), "guiProtobuf.Action.Network") + proto.RegisterType((*Action_VM)(nil), "guiProtobuf.Action.VM") +} + +func init() { + proto.RegisterFile("widget.proto", fileDescriptor_95b5c33b51e24547) +} + +var fileDescriptor_95b5c33b51e24547 = []byte{ + // 885 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0xc1, 0x6e, 0xdb, 0x46, + 0x10, 0x0d, 0x45, 0x4b, 0x22, 0x57, 0xb2, 0x3d, 0x59, 0x3b, 0xce, 0x42, 0x09, 0x0a, 0x21, 0x27, + 0x9d, 0x7c, 0x48, 0x81, 0xf4, 0x56, 0x40, 0xb1, 0x1a, 0xc7, 0x40, 0x55, 0xb8, 0x94, 0x95, 0x1c, + 0xd3, 0xa5, 0x39, 0x95, 0x16, 0x22, 0x77, 0x89, 0xe5, 0xd2, 0x92, 0xef, 0xfd, 0x9d, 0xfe, 0x48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, 0x8e, 0xa9, 0xed, 0xad, 0xcc, 0xe0, 0x84, 0xce, 0x36, 0xd7, 0xa5, + 0xcc, 0xe0, 0x94, 0xd4, 0xe3, 0xb2, 0x44, 0x9d, 0x01, 0x50, 0xf1, 0xa9, 0x79, 0x40, 0x78, 0x49, + 0xd1, 0xa4, 0x2e, 0xca, 0xe6, 0x92, 0xe6, 0x15, 0x5a, 0x38, 0xe3, 0xa7, 0xac, 0x77, 0xa3, 0x95, + 0xbb, 0x33, 0x26, 0x5f, 0x29, 0x07, 0xe7, 0x1c, 0x58, 0xff, 0x2a, 0x37, 0x15, 0xee, 0x98, 0x57, + 0xbe, 0x5d, 0x85, 0xf6, 0xd7, 0x5a, 0x39, 0xb8, 0x20, 0x43, 0x33, 0xe1, 0x04, 0xd3, 0x7a, 0x01, + 0xaf, 0xd3, 0x8e, 0xff, 0x97, 0xf9, 0xfe, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc5, 0x63, 0xcc, + 0xcb, 0x75, 0x06, 0x00, 0x00, +} diff --git a/widget.proto b/widget.proto new file mode 100644 index 0000000..e20354b --- /dev/null +++ b/widget.proto @@ -0,0 +1,117 @@ +syntax = "proto3"; +package guiProtobuf; + +message Action { + WidgetType widgetType = 1; + ActionType actionType = 2; + int64 widgetId = 3; + int64 parentId = 4; + string text = 5; // what is visable to the user + string name = 6; // a name useful for programming + + // This is how the values are passed back and forth + // values from things like checkboxes & dropdown's + bool b = 7; + int64 i = 8; + string s = 9; + + // This is used for things like a slider(0,100) + int64 x = 10; + int64 y = 11; + + // This is for the grid size & widget position + int64 w = 12; + int64 h = 13; + int64 atw = 14; + int64 ath = 15; + + bool margin = 16; // Put space around elements to improve look & feel + bool expand = 17; // Make widgets fill up the space available + + repeated Response results = 18; + repeated Network networks = 19; + repeated VM vms = 20; + + enum WidgetType { + Unknown = 0; + Root = 1; // the master 'root' node of the binary tree + Flag = 2; // used to send configuration values to plugins + Window = 3; // in certain gui's (ncurses), these are tabs + Tab = 4; // internally, this is a window + Frame = 5; // deprecate? + Grid = 6; // like drawers in a chest + Group = 7; // like the 'Appetizers' section on a menu + Box = 8; // a vertical or horizontal stack of widgets + Button = 9; + Checkbox = 10; // select 'on' or 'off' + Dropdown = 11; + Combobox = 12; // dropdown with edit=true + Label = 13; + Textbox = 14; // is this a Label with edit=true + Slider = 15; // like a progress bar + Spinner = 16; // like setting the oven temperature + Separator = 17; // TODO + Image = 18; // TODO + Area = 19; // TODO + Form = 20; // TODO + Font = 21; // TODO + Color = 22; // TODO + Dialog = 23; // TODO + Stdout = 24; // can be used to capture and display log output + } + + enum ActionType { + Health = 0; + Add = 1; + Delete = 2; + Get = 3; + Set = 4; + GetText = 5; + SetText = 6; + AddText = 7; + Show = 8; + Hide = 9; + Enable = 10; + Disable = 11; + Margin = 12; + Unmargin = 13; + Pad = 14; + Unpad = 15; + Append = 16; + Move = 17; + Dump = 18; + User = 19; // the user did something (mouse, keyboard, etc) + InitToolkit = 20; // initializes the toolkit + CloseToolkit = 21; // closes the toolkit + UserQuit = 22; // the user closed the GUI + EnableDebug = 23; // open the debugging window + } + + message Response { + // ActionType type = 1; + int64 id = 2; + string name = 3; + string error = 4; + repeated string snippets = 5; + } + + message Network { + int64 id = 1; + string name = 2; + int64 total_cpu = 3; + int64 total_mem = 4; + string login_url = 5; + } + + message VM { + int64 id = 1; + string name = 2; + string hostname = 3; + int64 cpus = 4; + int64 memory = 5; + int64 disk = 6; + string IPv6 = 7; + string role = 8; + string baseImage = 9; + } +}