blob: ed270c3b9edc7f286265249fb741f586f0b0fa64 (
plain) (
blame)
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
|
package cache
import (
"sync"
"time"
)
// Indexer allows for other uses of the Index functions
type Indexer interface {
AddUser(string, string)
DelUser(string)
}
// UserIndex provides an index of users by URL
type UserIndex map[string]*Data
// Data from user's twtxt.txt
type Data struct {
nick string
date time.Time
apidate []byte
status []string
}
// Mutex to control access to the User Index
var imutex = sync.RWMutex{}
|