Files
core/restream/store/store.go
Ingo Oppermann ccac2ffd5d Various updates
- rebrand group to domain
- move IAM to the API (rest and graph) for enforcing "process:" rules
- add abstraction layer for restream store in order to decouple internal format from format on disk
- move playout handler into restreamHandler
- remove user from restream interface
- add TaskID type that includes the process id and its domain
2023-05-23 15:47:06 +02:00

43 lines
647 B
Go

package store
import "github.com/datarhei/core/v16/restream/app"
type Process struct {
Process *app.Process
Metadata map[string]interface{}
}
type Data struct {
Process map[string]map[string]Process
Metadata map[string]interface{}
}
func (d *Data) IsEmpty() bool {
if len(d.Process) != 0 {
return false
}
if len(d.Metadata) != 0 {
return false
}
return true
}
type Store interface {
// Load data from the store
Load() (Data, error)
// Save data to the store
Store(Data) error
}
func NewData() Data {
c := Data{
Process: make(map[string]map[string]Process),
Metadata: make(map[string]interface{}),
}
return c
}