mock

package
v0.0.0-...-a83b45c Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mock

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

Mock registers some common http requests usually used by the model

func Init

func Init() *Mock

Init initializes the mocking helper

func (*Mock) Checkpoint

func (m *Mock) Checkpoint(options Options)

func (*Mock) CheckpointWithPrePlatform

func (m *Mock) CheckpointWithPrePlatform(options Options)

func (*Mock) Close

func (m *Mock) Close()

Close de-activates the mocking helper

func (*Mock) NoCheckpoint

func (m *Mock) NoCheckpoint(options Options)

func (*Mock) NoProjects

func (m *Mock) NoProjects(options Options)

func (*Mock) ProjectByOrgAndName

func (m *Mock) ProjectByOrgAndName(options Options)

func (*Mock) ProjectByOrgAndNameNoCommits

func (m *Mock) ProjectByOrgAndNameNoCommits(options Options)

func (*Mock) Reset

func (m *Mock) Reset()

Reset unsets any responders, useful since this mock is special since it doesn't mock based on path

type Options

type Options uint8
const (
	NoOptions Options = iota
	Once
)

type Responder

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

func NewResponder

func NewResponder(match string, responseFile string, options Options) *Responder

Jump to

Keyboard shortcuts

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