aurestplayback

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const PlaybackRewritePathEnvVariable = "GO_AUTUMN_RESTCLIENT_PLAYBACK_REWRITE_PATH"

Variables

This section is empty.

Functions

func New

func New(recorderPath string) aurestclientapi.Client

New builds a new http client simulator based on playback.

Use this in your tests.

Types

type PlaybackImpl

type PlaybackImpl struct {
	RecorderPath        string
	RecorderRewritePath string
	// Now is exposed so tests can fixate the time by overwriting this field
	Now func() time.Time
}

func (*PlaybackImpl) Perform

func (c *PlaybackImpl) Perform(ctx context.Context, method string, requestUrl string, _ interface{}, response *aurestclientapi.ParsedResponse) error

Jump to

Keyboard shortcuts

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