emissary/internal/spec/spec.go

28 lines
511 B
Go

package spec
import "forge.cadoles.com/Cadoles/emissary/internal/agent/metadata"
type Spec interface {
SpecName() Name
SpecRevision() int
SpecData() metadata.Metadata
}
type RawSpec struct {
Name Name `json:"name"`
Revision int `json:"revision"`
Data metadata.Metadata `json:"data"`
}
func (s *RawSpec) SpecName() Name {
return s.Name
}
func (s *RawSpec) SpecRevision() int {
return s.Revision
}
func (s *RawSpec) SpecData() metadata.Metadata {
return s.Data
}