http

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Client *ovh.Client

OVH API client

Functions

func FetchArray

func FetchArray(path, idField string) ([]any, error)

fetchArray calls the given path (and expects it to return an array), and paginates to fetch all the results. If "idField" given, it tries to extract the given field from the objects returned by the API call.

func FetchExpandedArray

func FetchExpandedArray(path, idField string) ([]map[string]any, error)

func FetchObjectsParallel

func FetchObjectsParallel[T any](path string, ids []any, ignoreErrors bool) ([]T, error)

func InitClient

func InitClient()

func NewTransport deprecated

func NewTransport(name string, t http.RoundTripper) *transport

NewTransport creates a wrapper around a *http.RoundTripper, designed to be used for the `Transport` field of http.Client.

This logs each pair of HTTP request/response that it handles. The logging is done via Go standard library `log` package.

Deprecated: This will log the content of every http request/response at `[DEBUG]` level, without any filtering. Any sensitive information will appear as-is in your logs. Please use NewSubsystemLoggingHTTPTransport instead.

Types

This section is empty.

Jump to

Keyboard shortcuts

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