util

package
v0.0.0-...-9749e31 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserAgent = "serverless-scene-test"
)

Variables

This section is empty.

Functions

func EqualPointerValues

func EqualPointerValues(t *require.Assertions, expected, actual interface{})

EqualPointerValues checks if two pointers point to the same value. see https://github.com/stretchr/testify/issues/1118

func GetResponse

func GetResponse(url string) (*http.Response, error)

func NewBearerTransport

func NewBearerTransport(token string) http.RoundTripper

NewBearerTransport returns a RoundTripper that adds a Bearer token to the Authorization header.

func NewDebugTransport

func NewDebugTransport(inner http.RoundTripper) http.RoundTripper

func NewDigestTransport

func NewDigestTransport(publicKey, privateKey string) http.RoundTripper

func ParseError

func ParseError(err error, resp *http.Response) error

func ValidateApiUrl

func ValidateApiUrl(value string) (*url.URL, error)

Types

type DebugTransport

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

func (*DebugTransport) RoundTrip

func (dt *DebugTransport) RoundTrip(r *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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