26 lines
427 B
Go
26 lines
427 B
Go
package spec
|
|
|
|
type Spec interface {
|
|
SpecName() Name
|
|
SpecRevision() int
|
|
SpecData() map[string]any
|
|
}
|
|
|
|
type RawSpec struct {
|
|
Name Name `json:"name"`
|
|
Revision int `json:"revision"`
|
|
Data map[string]any `json:"data"`
|
|
}
|
|
|
|
func (s *RawSpec) SpecName() Name {
|
|
return s.Name
|
|
}
|
|
|
|
func (s *RawSpec) SpecRevision() int {
|
|
return s.Revision
|
|
}
|
|
|
|
func (s *RawSpec) SpecData() map[string]any {
|
|
return s.Data
|
|
}
|