clients

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildHTTPClient

func BuildHTTPClient(cfg config.HTTPClient, logger *logrus.Entry) (*http.Client, error)

func BuildURL

func BuildURL(cfg config.HTTPClient) string

func Delete

func Delete(ctx context.Context, client *http.Client, url string, knownErrors map[int][]error) error

func Get

func Get[T any](ctx context.Context, client *http.Client, url string, queryParams *resources.QueryParameters, knownErrors map[int][]error) (T, error)

func HttpClientWithSourceHeaderInjector

func HttpClientWithSourceHeaderInjector(cli *http.Client, sourceID string) *http.Client

func IterGet

func IterGet[E any, T resources.Iterator[E]](ctx context.Context, client *http.Client, url string, queryParams *resources.QueryParameters, applyFunc func(E), knownErrors map[int][]error) error

func NewHttpCAClient

func NewHttpCAClient(client *http.Client, url string) services.CAService

func NewHttpDMSManagerClient

func NewHttpDMSManagerClient(client *http.Client, url string) services.DMSManagerService

func NewHttpDeviceManagerClient

func NewHttpDeviceManagerClient(client *http.Client, url string) services.DeviceManagerService

func Post

func Post[T any](ctx context.Context, client *http.Client, url string, data any, knownErrors map[int][]error) (T, error)

func Put

func Put[T any](ctx context.Context, client *http.Client, url string, data any, knownErrors map[int][]error) (T, error)

Types

type CAClient

type CAClient services.CAService

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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