mock

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MyEnumType_name = map[int32]string{
		0: "ZERO",
		1: "ONE",
		2: "TWO",
		3: "THREE",
	}
	MyEnumType_value = map[string]int32{
		"ZERO":  0,
		"ONE":   1,
		"TWO":   2,
		"THREE": 3,
	}
)

Enum value maps for MyEnumType.

Functions

This section is empty.

Types

type Impl

type Impl struct {
	NewField string `json:"newField"`
}

func (Impl) MockFn

func (i Impl) MockFn(string, int, bool) error

type MockEmptyIfaceSlice

type MockEmptyIfaceSlice []interface{}

MockEmptyIfSlice is an empty slice used for testing parsing of slices.

type MockEmptyStructSlice

type MockEmptyStructSlice []struct{}

MockEmptyStructSlice

type MockIface

type MockIface interface {
	// mockFn is a function used for testing interface methods.
	MockFn(string, int, bool) error
}

mockIface is an interface used for testing parsing of interfacees.

type MockImportedStructSlice

type MockImportedStructSlice []bytes.Buffer

MockImportedStructSlice

type MockMap

type MockMap map[string]interface{}

MockMap is a map used for testing parsing of maps.

type MockMapSlice

type MockMapSlice map[string][]MockStr

MockMapSlice is a map slice used for testing parsing of maps of slices.

type MockNonStringMap

type MockNonStringMap map[int]string

MockNonStringMap does not get generated because it has no string key.

type MockPtr

type MockPtr *string

MockPtr is a type alias for a pointer to a string

type MockPtrImport

type MockPtrImport *bytes.Buffer

MockPtrImport is a pointer to an imported type

type MockSlice

type MockSlice []MockPtrImport

MockSlice is a slice used for testing parsing of slices.

type MockSlicePointer

type MockSlicePointer []*int

MockSlicePointer is a pointer slice used for testing parsing of slice pointers.

type MockStr

type MockStr string

MockStr is a type alias for a string

type MockStruct

type MockStruct struct {
	// mockField is a field used for testing struct fields.
	MockField int `json:"mockField"`
	// mockField2 is a field used for testing struct fields.
	MockField2 string `json:"mockField2"`
	// array
	MockField3 []string `json:"mockField3"`
	// map
	MockField4 map[string]string `json:"mockField4"`
	// ptr
	MockField5 *string `json:"mockField5"`
	// interface!
	MockInterface MockIface `json:"myIface"`
}

MockStruct is a struct used for testing parsing of structs.

type MockStructSlice

type MockStructSlice []MockStruct

MockStructSlice

type MyEnumType

type MyEnumType int32

This is an enum type

Jump to

Keyboard shortcuts

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