Files
wakapi/config/shared_data.go
2025-10-12 10:10:52 +02:00

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{}]()}
}