mock

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backoff

type Backoff struct {
	NextFn      func()
	NextInvoked bool

	CurrentFn      func() time.Duration
	CurrentInvoked bool

	ResetFn      func()
	ResetInvoked bool
}

func (*Backoff) Current

func (b *Backoff) Current() time.Duration

func (*Backoff) Next

func (b *Backoff) Next()

func (*Backoff) Reset

func (b *Backoff) Reset()
type Cookie struct {
	IDFn      func() string
	IDInvoked bool

	ContentFn      func() interface{}
	ContentInvoked bool

	MetadataFn      func() map[string]string
	MetadataInvoked bool
}

func (*Cookie) Content

func (c *Cookie) Content() interface{}

func (*Cookie) ID

func (c *Cookie) ID() string

func (*Cookie) Metadata

func (c *Cookie) Metadata() map[string]string

type Jar

type Jar struct {
	RetrieveFn      func() ([]cookiemonster.Cookie, error)
	RetrieveInvoked bool

	RetireFn      func(cookie cookiemonster.Cookie) error
	RetireInvoked bool
}

func (*Jar) Retire

func (j *Jar) Retire(cookie cookiemonster.Cookie) error

func (*Jar) Retrieve

func (j *Jar) Retrieve() ([]cookiemonster.Cookie, error)

Jump to

Keyboard shortcuts

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