Drop CollectedAt from the example DummyData

This commit is contained in:
nemunaire 2026-05-20 13:43:57 +08:00
commit 780fbdd57d

View file

@ -133,7 +133,6 @@ const ObservationKeyDummy = "dummy"
type DummyData struct {
Message string `json:"message"`
Score float64 `json:"score"`
CollectedAt time.Time `json:"collected_at"`
}
```
@ -197,7 +196,6 @@ func (p *dummyProvider) Collect(ctx context.Context, opts CheckerOptions) (any,
return &DummyData{
Message: message,
Score: score,
CollectedAt: time.Now(),
}, nil
}
```
@ -525,7 +523,6 @@ Response:
"data": {
"message": "Testing my checker!",
"score": 73.2,
"collected_at": "2026-01-15T10:30:00Z"
}
}
```
@ -537,7 +534,7 @@ curl -X POST http://localhost:8080/evaluate \
-H "Content-Type: application/json" \
-d '{
"observations": {
"dummy": "{\"message\":\"test\",\"score\":42.5,\"collected_at\":\"2026-01-15T10:30:00Z\"}"
"dummy": "{\"message\":\"test\",\"score\":42.5}"
},
"options": {
"warningThreshold": 50,
@ -570,7 +567,7 @@ Status codes: `1` = OK, `3` = Warning, `4` = Critical.
curl -X POST http://localhost:8080/report \
-H "Content-Type: application/json" \
-d '{
"data": "{\"message\":\"test\",\"score\":73.2,\"collected_at\":\"2026-01-15T10:30:00Z\"}"
"data": "{\"message\":\"test\",\"score\":73.2}"
}'
```