maps-service/pkg/api/oas_request_encoders_gen.go

83 lines
1.4 KiB
Go
Raw Permalink Normal View History

2024-11-25 17:22:45 -08:00
// Code generated by ogen, DO NOT EDIT.
package api
2024-11-27 15:38:17 -08:00
import (
"bytes"
"net/http"
"github.com/go-faster/jx"
ht "github.com/ogen-go/ogen/http"
)
2024-12-05 16:36:15 -08:00
func encodeCreateScriptRequest(
2024-12-05 18:48:26 -08:00
req *ScriptCreate,
2024-12-05 16:36:15 -08:00
r *http.Request,
) error {
const contentType = "application/json"
e := new(jx.Encoder)
{
2024-12-05 18:48:26 -08:00
req.Encode(e)
2024-12-05 16:36:15 -08:00
}
encoded := e.Bytes()
ht.SetBody(r, bytes.NewReader(encoded), contentType)
return nil
}
func encodeCreateScriptPolicyRequest(
2024-12-05 18:48:26 -08:00
req *ScriptPolicyCreate,
2024-12-05 16:36:15 -08:00
r *http.Request,
) error {
const contentType = "application/json"
e := new(jx.Encoder)
{
2024-12-05 18:48:26 -08:00
req.Encode(e)
2024-12-05 16:36:15 -08:00
}
encoded := e.Bytes()
ht.SetBody(r, bytes.NewReader(encoded), contentType)
return nil
}
2024-11-27 15:38:17 -08:00
func encodeCreateSubmissionRequest(
2024-12-05 18:48:26 -08:00
req *SubmissionCreate,
2024-11-27 15:38:17 -08:00
r *http.Request,
) error {
const contentType = "application/json"
e := new(jx.Encoder)
{
2024-12-05 18:48:26 -08:00
req.Encode(e)
2024-11-27 15:38:17 -08:00
}
encoded := e.Bytes()
ht.SetBody(r, bytes.NewReader(encoded), contentType)
return nil
}
2024-12-05 16:36:15 -08:00
func encodeUpdateScriptRequest(
2024-12-05 18:48:26 -08:00
req *ScriptUpdate,
2024-12-05 16:36:15 -08:00
r *http.Request,
) error {
const contentType = "application/json"
e := new(jx.Encoder)
{
2024-12-05 18:48:26 -08:00
req.Encode(e)
2024-12-05 16:36:15 -08:00
}
encoded := e.Bytes()
ht.SetBody(r, bytes.NewReader(encoded), contentType)
return nil
}
func encodeUpdateScriptPolicyRequest(
2024-12-05 18:48:26 -08:00
req *ScriptPolicyUpdate,
2024-12-05 16:36:15 -08:00
r *http.Request,
) error {
const contentType = "application/json"
e := new(jx.Encoder)
{
2024-12-05 18:48:26 -08:00
req.Encode(e)
2024-12-05 16:36:15 -08:00
}
encoded := e.Bytes()
ht.SetBody(r, bytes.NewReader(encoded), contentType)
return nil
}