auth
auth/memstore.go
Add support for bulk changes and for logins. Logins now get stored, listed, removed, and updated. You can select a profile by the login associated with it. Also added support for bulk changing profiles, because it may be necesary to set many profiles to compromised at the same time, and there's no sense in requiring a statement per profile.
1.1 --- a/memstore.go Thu Sep 18 22:42:02 2014 -0400 1.2 +++ b/memstore.go Fri Sep 19 00:05:35 2014 -0400 1.3 @@ -24,6 +24,10 @@ 1.4 1.5 profiles map[string]Profile 1.6 profileLock sync.RWMutex 1.7 + 1.8 + logins map[string]Login 1.9 + profileLoginLookup map[string][]string 1.10 + loginLock sync.RWMutex 1.11 } 1.12 1.13 func NewMemstore() *Memstore { 1.14 @@ -36,6 +40,8 @@ 1.15 profileClientLookup: map[string][]uuid.ID{}, 1.16 endpoints: map[string][]Endpoint{}, 1.17 profiles: map[string]Profile{}, 1.18 + logins: map[string]Login{}, 1.19 + profileLoginLookup: map[string][]string{}, 1.20 } 1.21 } 1.22