internal

package
v1.70.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteRequest

func ExecuteRequest[ReqBody any, ResBody any](
	ctx context.Context,
	client *SvixHttpClient,
	method string,
	path string,
	pathParams map[string]string,
	queryParams map[string]string,
	headerParams map[string]string,
	jsonBody *ReqBody,

) (*ResBody, error)

func SerializeParamToMap

func SerializeParamToMap(key string, val interface{}, d map[string]string, err *error)

Types

type Error

type Error struct {
	// contains filtered or unexported fields
}

Error provides access to the body, status, and error on returned errors.

func (Error) Body

func (e Error) Body() []byte

Body returns the raw bytes of the response.

func (Error) Error

func (e Error) Error() string

Error returns non-empty string if there was an error.

func (Error) Status

func (e Error) Status() int

Status returns the HTTP status of the error.

type SvixHttpClient

type SvixHttpClient struct {
	DefaultHeaders map[string]string
	HTTPClient     *http.Client
	RetrySchedule  []time.Duration
	BaseURL        string
	Debug          bool
}

func DefaultSvixHttpClient

func DefaultSvixHttpClient(defaultBaseUrl string) SvixHttpClient

Jump to

Keyboard shortcuts

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