diff options
author | Ben Morrison <ben@gbmor.dev> | 2019-05-20 22:52:50 -0400 |
---|---|---|
committer | Ben Morrison <ben@gbmor.dev> | 2019-05-21 03:42:17 -0400 |
commit | df1d1efa19aed5bc6553c7c0a0b4b7dfe20e3bd0 (patch) | |
tree | 2a60f30829b8d1fca943aa3ca4a077cb4cb3517d /types.go | |
parent | a3c67f1ff9ed2cff44930f6bfd17a3ec272fe2f5 (diff) | |
download | getwtxt-df1d1efa19aed5bc6553c7c0a0b4b7dfe20e3bd0.tar.gz |
fleshed out POST handler, added remote registry list
Diffstat (limited to 'types.go')
-rw-r--r-- | types.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/types.go b/types.go index b5f27ce..018e26e 100644 --- a/types.go +++ b/types.go @@ -1,5 +1,7 @@ package main +import "sync" + // content-type consts const txtutf8 = "text/plain; charset=utf-8" const htmlutf8 = "text/html; charset=utf-8" @@ -23,6 +25,14 @@ type Instance struct { Desc string } +// RemoteRegistries holds a list of remote registries to +// periodically scrape for new users. The remote registries +// must have been added via POST like a user. +type RemoteRegistries struct { + Mu sync.RWMutex + List []string +} + // ipCtxKey is the Context value key for user IP addresses type ipCtxKey int |