(now time.Time, users []*types.User)
| 102 | } |
| 103 | |
| 104 | func initAuthRecords(now time.Time, users []*types.User) []common.AuthRecord { |
| 105 | recs := make([]common.AuthRecord, 0, 2) |
| 106 | recs = append(recs, common.AuthRecord{ |
| 107 | Unique: "basic:alice", |
| 108 | UserId: users[0].Id, |
| 109 | Scheme: "basic", |
| 110 | AuthLvl: auth.LevelAuth, |
| 111 | Secret: []byte{'a', 'l', 'i', 'c', 'e'}, |
| 112 | Expires: now.Add(24 * time.Hour), |
| 113 | }) |
| 114 | recs = append(recs, common.AuthRecord{ |
| 115 | Unique: "basic:bob", |
| 116 | UserId: users[1].Id, |
| 117 | Scheme: "basic", |
| 118 | AuthLvl: auth.LevelAuth, |
| 119 | Secret: []byte{'b', 'o', 'b'}, |
| 120 | Expires: now.Add(24 * time.Hour), |
| 121 | }) |
| 122 | return recs |
| 123 | } |
| 124 | |
| 125 | func initTopics(now time.Time, users []*types.User) []*types.Topic { |
| 126 | topics := make([]*types.Topic, 0, 5) |
no test coverage detected
searching dependent graphs…