mirror of
https://github.com/muety/wakapi.git
synced 2025-12-05 22:20:24 -08:00
21 lines
401 B
Go
21 lines
401 B
Go
package config
|
|
|
|
import (
|
|
"github.com/muety/wakapi/lib"
|
|
)
|
|
|
|
type SharedDataKey string
|
|
|
|
const (
|
|
MiddlewareKeyPrincipal = SharedDataKey("principal")
|
|
MiddlewareKeyPrincipalId = SharedDataKey("principal_identity")
|
|
)
|
|
|
|
type SharedData struct {
|
|
*lib.ConcurrentMap[SharedDataKey, interface{}]
|
|
}
|
|
|
|
func NewSharedData() *SharedData {
|
|
return &SharedData{lib.NewConcurrentMap[SharedDataKey, interface{}]()}
|
|
}
|