From 914fc7c5e937bd8ac2f9fb2fe95c2133899e781c Mon Sep 17 00:00:00 2001 From: Adrian Zuercher Date: Fri, 28 Aug 2026 18:09:16 +0200 Subject: [PATCH] initial commit lets start to have some fun --- array.go | 7 +++++++ device.go | 7 +++++++ global.go | 6 ++++++ go.mod | 3 +++ information.go | 7 +++++++ program.go | 6 ++++++ project.go | 9 +++++++++ task.go | 10 ++++++++++ variable.go | 8 ++++++++ 9 files changed, 63 insertions(+) create mode 100644 array.go create mode 100644 device.go create mode 100644 global.go create mode 100644 go.mod create mode 100644 information.go create mode 100644 program.go create mode 100644 project.go create mode 100644 task.go create mode 100644 variable.go diff --git a/array.go b/array.go new file mode 100644 index 0000000..65f9e1e --- /dev/null +++ b/array.go @@ -0,0 +1,7 @@ +package schema + +type Array struct { + Start int `json:"start"` + End int `json:"end"` + Values []any `json:"values"` +} diff --git a/device.go b/device.go new file mode 100644 index 0000000..332513b --- /dev/null +++ b/device.go @@ -0,0 +1,7 @@ +package schema + +type Device struct { + Name string `json:"name"` + Tasks []*Task `json:"tasks"` + Globals []*Global `json:"globals"` +} diff --git a/global.go b/global.go new file mode 100644 index 0000000..4b40653 --- /dev/null +++ b/global.go @@ -0,0 +1,6 @@ +package schema + +type Global struct { + Name string `json:"name"` + Variables []*Variable `json:"variables"` +} diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..6a199c2 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module schema + +go 1.26.4 diff --git a/information.go b/information.go new file mode 100644 index 0000000..1444b16 --- /dev/null +++ b/information.go @@ -0,0 +1,7 @@ +package schema + +type Information struct { + CompanyName string `json:"companyName"` + ProductName string `json:"productName"` + Version string `json:"version"` +} diff --git a/program.go b/program.go new file mode 100644 index 0000000..a51e386 --- /dev/null +++ b/program.go @@ -0,0 +1,6 @@ +package schema + +type Program struct { + Name string `json:"name"` + TypeName string `json:"typeName"` +} diff --git a/project.go b/project.go new file mode 100644 index 0000000..c205658 --- /dev/null +++ b/project.go @@ -0,0 +1,9 @@ +package schema + +type Project struct { + ProjectName string `json:"projectName"` + Platform string `json:"platfrom"` + GenerateType int `json:"generateType"` + Information Information `json:"information"` + Devices []*Device `json:"devices"` +} diff --git a/task.go b/task.go new file mode 100644 index 0000000..6319416 --- /dev/null +++ b/task.go @@ -0,0 +1,10 @@ +package schema + +type Task struct { + Name string `json:"name"` + Interval int `json:"interval"` + IntervalUnit string `json:"intervalUnit"` + KindOfTask string `json:"kindOfTask"` + Priority int `json:"priority"` + Programs []*Program `json:"programs"` +} diff --git a/variable.go b/variable.go new file mode 100644 index 0000000..4a66741 --- /dev/null +++ b/variable.go @@ -0,0 +1,8 @@ +package schema + +type Variable struct { + Name string `json:"name"` + Type string `json:"type"` + Value any `json:"value,omitempty"` + Array *Array `json:"array,omitempty"` +}