diff options
author | Ben Morrison <ben@gbmor.dev> | 2019-05-14 03:19:26 -0400 |
---|---|---|
committer | Ben Morrison <ben@gbmor.dev> | 2019-05-14 03:19:26 -0400 |
commit | 1dcdbca485394818381549a98b7d4c809842526c (patch) | |
tree | 32b8f46cd8758d1b3fabcad69e57326c8d251b2a /registry/types.go | |
parent | 2492014051e5cd4c37287a09639d18f85e1349dc (diff) | |
download | getwtxt-1dcdbca485394818381549a98b7d4c809842526c.tar.gz |
exported Data struct fields
Diffstat (limited to 'registry/types.go')
-rw-r--r-- | registry/types.go | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/registry/types.go b/registry/types.go index 43b323f..429c55c 100644 --- a/registry/types.go +++ b/registry/types.go @@ -14,19 +14,22 @@ type Indexer interface { // UserIndex provides an index of users by URL type UserIndex map[string]*Data -// Data from user's twtxt.txt +// Data on each user. `Nick` is the specified nickname. `Date` is the +// time.Time of the user's submission to the registry. `APIdate` is the +// RFC3339-formatted date/time of the user's submission. `Status` is a +// TimeMap containing the user's statuses. type Data struct { - nick string - date time.Time - apidate []byte - status TimeMap + Nick string + Date time.Time + APIdate []byte + Status TimeMap } // TimeMap holds extracted and processed user data as a // string. A standard time.Time value is used as the key. type TimeMap map[time.Time]string -// StatusMapSlice is a slice of StatusMaps. Useful for sorting the +// TimeMapSlice is a slice of TimeMap. Useful for sorting the // output of queries. type TimeMapSlice []TimeMap |