package app import ( "forge.cadoles.com/Cadoles/emissary/internal/spec" ) const NameApp spec.Name = "app.emissary.cadoles.com" type Spec struct { Revision int `json:"revisions"` Apps map[string]AppEntry `json:"apps"` Auth *Auth `json:"auth"` } type AppEntry struct { URL string `json:"url"` SHA256Sum string `json:"sha256sum"` Address string `json:"address"` Format string `json:"format"` } type Auth struct { Key any `json:"key"` } func (s *Spec) SpecName() spec.Name { return NameApp } func (s *Spec) SpecRevision() int { return s.Revision } func (s *Spec) SpecData() map[string]any { return map[string]any{ "apps": s.Apps, "auth": s.Auth, } } func NewSpec() *Spec { return &Spec{ Revision: -1, } } var _ spec.Spec = &Spec{}