MCPcopy Create free account
hub / github.com/boringproxy/boringproxy / SetUser

Method SetUser

database.go:286–294  ·  view source on GitHub ↗
(username string, user User)

Source from the content-addressed store, hash-verified

284}
285
286func (d *Database) SetUser(username string, user User) error {
287 d.mutex.Lock()
288 defer d.mutex.Unlock()
289
290 d.Users[username] = user
291 d.persist()
292
293 return nil
294}
295
296func (d *Database) AddUser(username string, isAdmin bool) error {
297 d.mutex.Lock()

Callers 2

SetClientMethod · 0.80
DeleteClientMethod · 0.80

Calls 1

persistMethod · 0.95

Tested by

no test coverage detected