Help us shape the future of Go! Take the 2026 Go Developer Survey

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

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