Documentation
¶
Index ¶
Constants ¶
const ( ErrCodeInvalidDiff = "invalid_diff" ErrCodeInvalidPath = "invalid_path" )
Common error codes
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
Error represents an API error response.
func (*Error) MarshalText ¶
MarshalText implements encoding.TextMarshaler. It returns a structured format: "codeLength:code:message" or just "message" if no code. The length-prefixed format handles arbitrary message content including colons.
func (*Error) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler. It parses the structured format: "codeLength:code:message" or just "message" if no code. The length-prefixed format handles arbitrary message content including colons.
type RequestBody ¶
type RequestBody struct {
Path *ir.Node `tony:"name=path"`
Match *ir.Node `tony:"name=match"`
Patch *ir.Node `tony:"name=patch"`
Meta *ir.Node `tony:"name=meta"`
}
RequestBody represents the common structure for all requests using the path: match: patch: meta: layout.
func ParseRequestBody ¶
func ParseRequestBody(r *http.Request) (*RequestBody, error)
ParseRequestBody parses the request body as a Tony document and extracts the RequestBody structure.