diff options
author | Ben Morrison <ben@gbmor.dev> | 2019-05-23 00:21:53 -0400 |
---|---|---|
committer | Ben Morrison <ben@gbmor.dev> | 2019-05-23 01:08:13 -0400 |
commit | cd635e6c6b009d6c9d6943ea7c850ca740172b65 (patch) | |
tree | 47c482560cf5f0019f6e13076fc39053f9d5bf77 /types.go | |
parent | d15180e9dcd540d5850fa0319a7614620075eaea (diff) | |
download | getwtxt-cd635e6c6b009d6c9d6943ea7c850ca740172b65.tar.gz |
configuration init changes
Diffstat (limited to 'types.go')
-rw-r--r-- | types.go | 36 |
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 |