Files
authorizer/server/memorystore/providers/inmemory/provider.go

26 lines
519 B
Go
Raw Normal View History

2022-05-27 23:20:38 +05:30
package inmemory
2022-05-29 17:22:46 +05:30
import (
"sync"
)
2022-05-27 23:20:38 +05:30
type provider struct {
mutex sync.Mutex
sessionStore map[string]map[string]string
stateStore map[string]string
2022-05-29 17:22:46 +05:30
envStore *EnvStore
2022-05-27 23:20:38 +05:30
}
// NewInMemoryStore returns a new in-memory store.
func NewInMemoryProvider() (*provider, error) {
return &provider{
mutex: sync.Mutex{},
sessionStore: map[string]map[string]string{},
stateStore: map[string]string{},
2022-05-29 17:22:46 +05:30
envStore: &EnvStore{
mutex: sync.Mutex{},
store: map[string]interface{}{},
},
2022-05-27 23:20:38 +05:30
}, nil
}