mirror of
https://github.com/datarhei/core.git
synced 2025-09-26 20:11:29 +08:00
Add RegistryReader interface for read-only registry
This commit is contained in:
@@ -13,11 +13,11 @@ import (
|
||||
|
||||
// The SessionHandler type provides handlers to retrieve session information
|
||||
type SessionHandler struct {
|
||||
registry session.Registry
|
||||
registry session.RegistryReader
|
||||
}
|
||||
|
||||
// NewSession returns a new Session type. You have to provide a session registry.
|
||||
func NewSession(registry session.Registry) *SessionHandler {
|
||||
func NewSession(registry session.RegistryReader) *SessionHandler {
|
||||
return &SessionHandler{
|
||||
registry: registry,
|
||||
}
|
||||
|
@@ -13,13 +13,13 @@ import (
|
||||
|
||||
type WidgetConfig struct {
|
||||
Restream restream.Restreamer
|
||||
Registry session.Registry
|
||||
Registry session.RegistryReader
|
||||
}
|
||||
|
||||
// The WidgetHandler type provides handlers for the widget API
|
||||
type WidgetHandler struct {
|
||||
restream restream.Restreamer
|
||||
registry session.Registry
|
||||
registry session.RegistryReader
|
||||
}
|
||||
|
||||
// NewWidget return a new Widget type
|
||||
|
@@ -89,7 +89,7 @@ type Config struct {
|
||||
JWT jwt.JWT
|
||||
Config config.Store
|
||||
Cache cache.Cacher
|
||||
Sessions session.Registry
|
||||
Sessions session.RegistryReader
|
||||
Router router.Router
|
||||
ReadOnly bool
|
||||
}
|
||||
|
Reference in New Issue
Block a user