summary refs log tree commit diff stats
path: root/types.go
diff options
context:
space:
mode:
Diffstat (limited to 'types.go')
-rw-r--r--types.go36
1 files changed, 18 insertions, 18 deletions
diff --git a/types.go b/types.go
index 1aaf7a8..5032c5a 100644
--- a/types.go
+++ b/types.go
@@ -10,28 +10,28 @@ const txtutf8 = "text/plain; charset=utf-8"
 const htmlutf8 = "text/html; charset=utf-8"
 const cssutf8 = "text/css; charset=utf-8"
 
-// config object definition
-type configuration struct {
-	mu            sync.RWMutex
-	port          int
-	logFile       string
-	dbPath        string
-	stdoutLogging bool
-	version       string
-	cacheInterval time.Duration
-	dbInterval    time.Duration
-	lastCache     time.Time
-	lastPush      time.Time
-	Instance
+// Configuration object definition
+type Configuration struct {
+	Mu            sync.RWMutex
+	Port          int           `json:"ListenPort"`
+	LogFile       string        `json:"LogFile"`
+	DBPath        string        `json:"DatabasePath"`
+	StdoutLogging bool          `json:"StdoutLogging"`
+	Version       string        `json:"-"`
+	CacheInterval time.Duration `json:"StatusFetchInterval"`
+	DBInterval    time.Duration `json:"DatabasePushInterval"`
+	LastCache     time.Time     `json:"-"`
+	LastPush      time.Time     `json:"-"`
+	Instance      `json:"Instance"`
 }
 
 // Instance refers to this specific instance of getwtxt
 type Instance struct {
-	Name  string
-	URL   string
-	Owner string
-	Mail  string
-	Desc  string
+	Name  string `json:"Instance.SiteName"`
+	URL   string `json:"Instance.URL"`
+	Owner string `json:"Instance.OwnerName"`
+	Mail  string `json:"Instance.Email"`
+	Desc  string `json:"Instance.Description"`
 }
 
 // RemoteRegistries holds a list of remote registries to
anisanti/profani-tty/blame/themes/joker?id=e97ec56fce641554ff7aa2ff9f0583e1fb9fc364'>^
6dabbbd5 ^
30b5f112 ^
2f82f50a ^
86c1c388 ^
1a3dc91e ^
6dabbbd5 ^

30b5f112 ^
fbc30231 ^

















cd2458c0 ^

0ae975c2 ^

b21edfaa ^
cd2458c0 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77