Documentation
¶
Index ¶
- Constants
- Variables
- func ContextGetClient(ctx context.Context) (*resty.Client, bool)
- func ContextSetClient(ctx context.Context, client *resty.Client) context.Context
- func ExecuteRequest(ctx context.Context, request, response any) error
- func NewAPIClient() *resty.Client
- type GenericResponse
- type GetRequest
- type JSONResponse
- type PostRequest
Constants ¶
View Source
const ( LevelTrace = slog.Level(-8) LevelFatal = slog.Level(12) )
Variables ¶
View Source
var ErrResponseMalformed = errors.New("malformed response")
Functions ¶
func ContextGetClient ¶
func ContextSetClient ¶
func NewAPIClient ¶
func NewAPIClient() *resty.Client
Types ¶
type GenericResponse ¶
type JSONResponse ¶
type JSONResponse interface { json.Unmarshaler }
type PostRequest ¶
type PostRequest interface { GetRequest RequestBody() json.RawMessage }
PostRequest is a HTTP POST request with the request body provided by Body().
Click to show internal directories.
Click to hide internal directories.