client

package
v0.50.7 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call added in v0.32.0

func Call[T any](call func(*Client) (*http.Response, error)) (T, error)

Call creates an API client, executes call, and decodes the response JSON into T.

func DecodeJSON added in v0.32.0

func DecodeJSON(resp *http.Response, out any) error

DecodeJSON reads the response body and unmarshals it directly into out.

func Do added in v0.32.0

func Do(call func(*Client) (*http.Response, error)) error

Do is like Call but for endpoints where no response body is needed.

func Ptr added in v0.32.0

func Ptr[T any](v T) *T

Ptr returns a pointer to v.

func ReadBody added in v0.32.0

func ReadBody(resp *http.Response) ([]byte, error)

ReadBody reads the response body and returns an error on 4xx/5xx.

func WrapServerErr added in v0.32.0

func WrapServerErr(err error) error

WrapServerErr decorates connection errors with a hint about STELLA_SERVER_URL.

Types

This section is empty.

Jump to

Keyboard shortcuts

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