2023-02-02 10:55:24 +01:00
|
|
|
package datastore
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
type SpecID int64
|
|
|
|
|
|
|
|
type Spec struct {
|
2024-03-12 16:22:35 +01:00
|
|
|
ID SpecID `json:"id"`
|
|
|
|
DefinitionName string `json:"name"`
|
|
|
|
DefinitionVersion string `json:"version"`
|
|
|
|
Data map[string]any `json:"data"`
|
|
|
|
Revision int `json:"revision"`
|
|
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
|
|
TenantID TenantID `json:"tenantId"`
|
|
|
|
AgentID AgentID `json:"agentId"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Spec) SpecDefinitionName() string {
|
|
|
|
return s.DefinitionName
|
2023-02-02 10:55:24 +01:00
|
|
|
}
|
|
|
|
|
2024-03-12 16:22:35 +01:00
|
|
|
func (s *Spec) SpecDefinitionVersion() string {
|
|
|
|
return s.DefinitionVersion
|
2023-02-02 10:55:24 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Spec) SpecRevision() int {
|
|
|
|
return s.Revision
|
|
|
|
}
|
|
|
|
|
2023-02-28 15:50:35 +01:00
|
|
|
func (s *Spec) SpecData() map[string]any {
|
2023-02-02 10:55:24 +01:00
|
|
|
return s.Data
|
|
|
|
}
|