82 lines
1.4 KiB
Go
82 lines
1.4 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 encodeGroupsIDPutRequest(
|
|
req *GroupUpdate,
|
|
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 encodeGroupsPostRequest(
|
|
req *GroupUpdate,
|
|
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 encodeUsersIDGroupPutRequest(
|
|
req *UsersIDGroupPutReq,
|
|
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 encodeUsersIDPutRequest(
|
|
req *UserUpdate,
|
|
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 encodeUsersPostRequest(
|
|
req *UserUpdate,
|
|
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
|
|
}
|