internal

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Post

func Post[T any](u *url.URL, r any, hooks ...func(req *http.Request)) (zero T, err error)

Types

type Error

type Error struct {
	StatusCode int                 `json:"code,omitempty"`
	Type       string              `json:"error,omitempty"`
	Code       int                 `json:"errorCode,omitempty"`
	Details    map[string][]string `json:"errorDetails,omitempty"`
	Message    string              `json:"errorMessage,omitempty"`
	Status     string              `json:"status,omitempty"`
}

func (Error) Error

func (err Error) Error() string

type Result

type Result[T any] struct {
	StatusCode int    `json:"code,omitempty"`
	Data       T      `json:"data,omitempty"`
	Status     string `json:"status,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL