package views_test import ( "time" "git.novox.be/novox/mesh-sdk/go/views" ) // Plain structs shaped as the types the seat generator emits for the seat `mesh-conditions` (design 47 G A-3): the writer // is generic over them and works on their wire form, so the test brings the same shape, field for field. type testSubject struct { Also []string `json:"also,omitempty"` ID string `json:"id"` Machine string `json:"machine,omitempty"` Scope string `json:"scope"` } type testFinding struct { At time.Time `json:"at"` Explanation string `json:"explanation,omitempty"` Headline string `json:"headline,omitempty"` ID string `json:"id"` Kind string `json:"kind"` Observer string `json:"observer"` Owner string `json:"owner,omitempty"` Run string `json:"run,omitempty"` Scope string `json:"scope"` Severity string `json:"severity"` Since time.Time `json:"since"` Source string `json:"source"` Subject testSubject `json:"subject"` Summary string `json:"summary"` WaitingOn string `json:"waiting-on,omitempty"` } type testCleared struct { At time.Time `json:"at"` ID string `json:"id"` Kind string `json:"kind"` Scope string `json:"scope"` Why string `json:"why"` } type testPending struct { Bound string `json:"bound"` Key string `json:"key"` Since time.Time `json:"since"` } type testStated struct { Asked string `json:"asked,omitempty"` At time.Time `json:"at"` Findings []testFinding `json:"findings"` Kinds []string `json:"kinds,omitempty"` Pending []testPending `json:"pending"` } type testAsked struct { Ask string `json:"ask"` Module string `json:"module,omitempty"` } type testWriter = views.Writer[testFinding, testCleared, testStated, testAsked] type testConfig = views.WriterConfig[testFinding, testCleared, testStated, testAsked] type testObserved = views.Observed[testFinding]