mockdata

package
v0.0.0-...-64f2fc3 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FixtureMockFile

func FixtureMockFile(p fixture.Param) interface{}

func Read

func Read(path string, mockdata interface{}) interface{}

func ReadRaw

func ReadRaw(path string) interface{}

func ResultMockFile

func ResultMockFile(p fixture.Result) interface{}

Types

type MockObjectFn

type MockObjectFn func() interface{}

Return a structure to load the mock data into

type MockParam

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

type Parameters

type Parameters struct {
	*fixture.Parameters
	// contains filtered or unexported fields
}

func P

func P(name string, mockdata MockObjectFn) *Parameters

func (*Parameters) BasePath

func (p *Parameters) BasePath() string

mockdata.BasePath('./testdata/mock_{testname}_')

func (*Parameters) Paths

func (p *Parameters) Paths() []string

mockdata.Paths(base string)

func (*Parameters) Values

func (p *Parameters) Values() []fixture.Param

type Results

type Results struct {
	*fixture.Results
	// contains filtered or unexported fields
}

func R

func R(name string) *Results

func (*Results) BasePath

func (r *Results) BasePath() string

func (*Results) Paths

func (r *Results) Paths() []string

func (*Results) Values

func (r *Results) Values() []fixture.Result

Jump to

Keyboard shortcuts

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