mock

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Batch = []interface{}{
	"1stIndex",
	"2ndIndex",
	Err,
	"3rdIndex",
	"4thIndex",
	Err,
	"5thIndex",
	"6thIndex",
	Err,
	"7thIndex",
	"8thIndex",
	Err,
	"9thIndex",
	"10thIndex",
	Err,
}
View Source
var Err = errors.New("error appear")
View Source
var NoErrBatch = []interface{}{
	"1stIndex",
	"2ndIndex",
	"3rdIndex",
	"4thIndex",
	"5thIndex",
	"6thIndex",
	"7thIndex",
	"8thIndex",
	"9thIndex",
	"10thIndex",
}

Functions

This section is empty.

Types

type Mock

type Mock interface {
	Main(ctx context.Context, request interface{}) (interface{}, error)
	MainNoErr(ctx context.Context, request interface{}) (interface{}, error)
	Executor(ctx context.Context, request interface{}) (interface{}, error)
	GetCounter() int
	Increment(int)
}

func NewMock

func NewMock() Mock

type MockDB

type MockDB interface {
	Upsert(context.Context, interface{}) (interface{}, error)
}

func NewMockDB

func NewMockDB(db *sqlx.DB) MockDB

Jump to

Keyboard shortcuts

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