Some checks failed
continuous-integration/drone/push Build is failing
Depends on #160, #196, #197. Closes #147. This introduces a new type of audit event: the CheckList. This is a list of map checks that the validator performed. The intention is to update the web interface to display ✅ check marks for every check passed and ❌ for every check failed, and also include the summary of why the check failed. ~~The `Details` field would be the complete internal structure of the check in json, but I'm thinking it's unnecessary and should just be omitted.~~ The `Details` field has been removed. ```go type Check struct { Name string `json:"name"` Summary string `json:"summary"` Passed bool `json:"passed"` } type AuditEventDataCheckList struct { CheckList []Check `json:"check_list"` } ``` This is created instead of the Error audit event when the validator requests changes, but the Error audit event can still be created for other purposes. - [x] Make a proper error instead of hijacking a CheckList Reviewed-on: #181 Reviewed-by: itzaname <itzaname@noreply@itzana.me> Co-authored-by: Quaternions <krakow20@gmail.com> Co-committed-by: Quaternions <krakow20@gmail.com>
97 lines
1.7 KiB
Go
97 lines
1.7 KiB
Go
// Code generated by ogen, DO NOT EDIT.
|
|
|
|
package api
|
|
|
|
import (
|
|
"bytes"
|
|
"net/http"
|
|
|
|
"github.com/go-faster/jx"
|
|
|
|
ht "github.com/ogen-go/ogen/http"
|
|
)
|
|
|
|
func encodeCreateMapfixRequest(
|
|
req *MapfixCreate,
|
|
r *http.Request,
|
|
) error {
|
|
const contentType = "application/json"
|
|
e := new(jx.Encoder)
|
|
{
|
|
req.Encode(e)
|
|
}
|
|
encoded := e.Bytes()
|
|
ht.SetBody(r, bytes.NewReader(encoded), contentType)
|
|
return nil
|
|
}
|
|
|
|
func encodeCreateMapfixAuditCheckListRequest(
|
|
req CheckList,
|
|
r *http.Request,
|
|
) error {
|
|
const contentType = "application/json"
|
|
e := new(jx.Encoder)
|
|
{
|
|
req.Encode(e)
|
|
}
|
|
encoded := e.Bytes()
|
|
ht.SetBody(r, bytes.NewReader(encoded), contentType)
|
|
return nil
|
|
}
|
|
|
|
func encodeCreateScriptRequest(
|
|
req *ScriptCreate,
|
|
r *http.Request,
|
|
) error {
|
|
const contentType = "application/json"
|
|
e := new(jx.Encoder)
|
|
{
|
|
req.Encode(e)
|
|
}
|
|
encoded := e.Bytes()
|
|
ht.SetBody(r, bytes.NewReader(encoded), contentType)
|
|
return nil
|
|
}
|
|
|
|
func encodeCreateScriptPolicyRequest(
|
|
req *ScriptPolicyCreate,
|
|
r *http.Request,
|
|
) error {
|
|
const contentType = "application/json"
|
|
e := new(jx.Encoder)
|
|
{
|
|
req.Encode(e)
|
|
}
|
|
encoded := e.Bytes()
|
|
ht.SetBody(r, bytes.NewReader(encoded), contentType)
|
|
return nil
|
|
}
|
|
|
|
func encodeCreateSubmissionRequest(
|
|
req *SubmissionCreate,
|
|
r *http.Request,
|
|
) error {
|
|
const contentType = "application/json"
|
|
e := new(jx.Encoder)
|
|
{
|
|
req.Encode(e)
|
|
}
|
|
encoded := e.Bytes()
|
|
ht.SetBody(r, bytes.NewReader(encoded), contentType)
|
|
return nil
|
|
}
|
|
|
|
func encodeCreateSubmissionAuditCheckListRequest(
|
|
req CheckList,
|
|
r *http.Request,
|
|
) error {
|
|
const contentType = "application/json"
|
|
e := new(jx.Encoder)
|
|
{
|
|
req.Encode(e)
|
|
}
|
|
encoded := e.Bytes()
|
|
ht.SetBody(r, bytes.NewReader(encoded), contentType)
|
|
return nil
|
|
}
|