about summary refs log tree commit diff
path: root/shell/structs
diff options
context:
space:
mode:
authorhanemile <hanemile@protonmail.com>2019-01-09 21:26:24 +0100
committerhanemile <hanemile@protonmail.com>2019-01-09 21:26:24 +0100
commitc4c15a00a7b50d18a113fb68bb1fe209fa544afc (patch)
treee8b0cb28b5852a92a59bdc0934f6b1efa415960b /shell/structs
parent8ca97c4e416d3bf32ab9caf54d738d699fc47eb1 (diff)
overall push
Diffstat (limited to 'shell/structs')
-rw-r--r--shell/structs/boundary.go36
-rw-r--r--shell/structs/env.go43
2 files changed, 79 insertions, 0 deletions
diff --git a/shell/structs/boundary.go b/shell/structs/boundary.go
new file mode 100644
index 0000000..b49c7a2
--- /dev/null
+++ b/shell/structs/boundary.go
@@ -0,0 +1,36 @@
+package structs
+
+type Boundary struct {
+	// boundary box values
+	x     int64
+	y     int64
+	width int64
+}
+
+func NewBoundary(x int64, y int64, width int64) *Boundary {
+	return &Boundary{x: x, y: y, width: width}
+}
+
+func (b *Boundary) Width() int64 {
+	return b.width
+}
+
+func (b *Boundary) SetWidth(width int64) {
+	b.width = width
+}
+
+func (b *Boundary) Y() int64 {
+	return b.y
+}
+
+func (b *Boundary) SetY(y int64) {
+	b.y = y
+}
+
+func (b *Boundary) X() int64 {
+	return b.x
+}
+
+func (b *Boundary) SetX(x int64) {
+	b.x = x
+}
diff --git a/shell/structs/env.go b/shell/structs/env.go
new file mode 100644
index 0000000..949460f
--- /dev/null
+++ b/shell/structs/env.go
@@ -0,0 +1,43 @@
+package structs
+
+// Env structure storing the variables used to define what stars are inserted where
+type Env struct {
+	// general values
+	url       string
+	data      string
+	amount    int64
+	treeindex int64
+}
+
+func NewEnv(url string, data string, amount int64, treeindex int64) *Env {
+	return &Env{url: url, data: data, amount: amount, treeindex: treeindex}
+}
+
+// Getters and setters
+func (e *Env) Treeindex() int64 {
+	return e.treeindex
+}
+func (e *Env) SetTreeindex(treeindex int64) {
+	e.treeindex = treeindex
+}
+
+func (e *Env) Amount() int64 {
+	return e.amount
+}
+func (e *Env) SetAmount(amount int64) {
+	e.amount = amount
+}
+
+func (e *Env) Data() string {
+	return e.data
+}
+func (e *Env) SetData(data string) {
+	e.data = data
+}
+
+func (e *Env) Url() string {
+	return e.url
+}
+func (e *Env) SetUrl(url string) {
+	e.url = url
+}