example

package
v0.0.0-...-6f9f026 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package example is a generated GoMock package.

Package example is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockService

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

MockService is a mock of Service interface.

func NewMockService

func NewMockService(ctrl *gomock.Controller) *MockService

NewMockService creates a new mock instance.

func (*MockService) A

func (m *MockService) A(ctx context.Context, in int) error

A mocks base method.

func (*MockService) B

func (m *MockService) B(ctx context.Context, in int) (*Out, error)

B mocks base method.

func (*MockService) C

func (m *MockService) C() int

C mocks base method.

func (*MockService) EXPECT

func (m *MockService) EXPECT() *MockServiceMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

type MockServiceACall

type MockServiceACall struct {
	*gomock.Call
}

MockServiceACall wrap *gomock.Call

func (*MockServiceACall) Do

Do rewrite *gomock.Call.Do

func (*MockServiceACall) DoAndReturn

func (c *MockServiceACall) DoAndReturn(f func(context.Context, int) error) *MockServiceACall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockServiceACall) Return

func (c *MockServiceACall) Return(arg0 error) *MockServiceACall

Return rewrite *gomock.Call.Return

type MockServiceBCall

type MockServiceBCall struct {
	*gomock.Call
}

MockServiceBCall wrap *gomock.Call

func (*MockServiceBCall) Do

Do rewrite *gomock.Call.Do

func (*MockServiceBCall) DoAndReturn

func (c *MockServiceBCall) DoAndReturn(f func(context.Context, int) (*Out, error)) *MockServiceBCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockServiceBCall) Return

func (c *MockServiceBCall) Return(arg0 *Out, arg1 error) *MockServiceBCall

Return rewrite *gomock.Call.Return

type MockServiceCCall

type MockServiceCCall struct {
	*gomock.Call
}

MockServiceCCall wrap *gomock.Call

func (*MockServiceCCall) Do

func (c *MockServiceCCall) Do(f func() int) *MockServiceCCall

Do rewrite *gomock.Call.Do

func (*MockServiceCCall) DoAndReturn

func (c *MockServiceCCall) DoAndReturn(f func() int) *MockServiceCCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockServiceCCall) Return

func (c *MockServiceCCall) Return(arg0 int) *MockServiceCCall

Return rewrite *gomock.Call.Return

type MockServiceMockRecorder

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

MockServiceMockRecorder is the mock recorder for MockService.

func (*MockServiceMockRecorder) A

A indicates an expected call of A.

func (*MockServiceMockRecorder) B

B indicates an expected call of B.

func (*MockServiceMockRecorder) C

C indicates an expected call of C.

type MockSimple

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

MockSimple is a mock of Simple interface.

func NewMockSimple

func NewMockSimple(ctrl *gomock.Controller) *MockSimple

NewMockSimple creates a new mock instance.

func (*MockSimple) A

func (m *MockSimple) A() string

A mocks base method.

func (*MockSimple) B

func (m *MockSimple) B(a int) string

B mocks base method.

func (*MockSimple) C

func (m *MockSimple) C(b, c int) (string, int)

C mocks base method.

func (*MockSimple) EXPECT

func (m *MockSimple) EXPECT() *MockSimpleMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

type MockSimpleACall

type MockSimpleACall struct {
	*gomock.Call
}

MockSimpleACall wrap *gomock.Call

func (*MockSimpleACall) Do

func (c *MockSimpleACall) Do(f func() string) *MockSimpleACall

Do rewrite *gomock.Call.Do

func (*MockSimpleACall) DoAndReturn

func (c *MockSimpleACall) DoAndReturn(f func() string) *MockSimpleACall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockSimpleACall) Return

func (c *MockSimpleACall) Return(arg0 string) *MockSimpleACall

Return rewrite *gomock.Call.Return

type MockSimpleBCall

type MockSimpleBCall struct {
	*gomock.Call
}

MockSimpleBCall wrap *gomock.Call

func (*MockSimpleBCall) Do

func (c *MockSimpleBCall) Do(f func(int) string) *MockSimpleBCall

Do rewrite *gomock.Call.Do

func (*MockSimpleBCall) DoAndReturn

func (c *MockSimpleBCall) DoAndReturn(f func(int) string) *MockSimpleBCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockSimpleBCall) Return

func (c *MockSimpleBCall) Return(arg0 string) *MockSimpleBCall

Return rewrite *gomock.Call.Return

type MockSimpleCCall

type MockSimpleCCall struct {
	*gomock.Call
}

MockSimpleCCall wrap *gomock.Call

func (*MockSimpleCCall) Do

func (c_2 *MockSimpleCCall) Do(f func(int, int) (string, int)) *MockSimpleCCall

Do rewrite *gomock.Call.Do

func (*MockSimpleCCall) DoAndReturn

func (c_2 *MockSimpleCCall) DoAndReturn(f func(int, int) (string, int)) *MockSimpleCCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockSimpleCCall) Return

func (c_2 *MockSimpleCCall) Return(arg0 string, arg1 int) *MockSimpleCCall

Return rewrite *gomock.Call.Return

type MockSimpleMockRecorder

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

MockSimpleMockRecorder is the mock recorder for MockSimple.

func (*MockSimpleMockRecorder) A

A indicates an expected call of A.

func (*MockSimpleMockRecorder) B

B indicates an expected call of B.

func (*MockSimpleMockRecorder) C

C indicates an expected call of C.

type Out

type Out struct {
	X string
	Y int
}

type Service

type Service interface {
	A(ctx context.Context, in int) error
	B(ctx context.Context, in int) (*Out, error)
	C() int
}

type ServiceUser

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

func NewServiceUser

func NewServiceUser(service Service) *ServiceUser

func (ServiceUser) Do

func (u ServiceUser) Do(ctx context.Context) (int, error)

type Simple

type Simple interface {
	A() string
	B(a int) string
	C(b, c int) (string, int)
}

type SimpleUser

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

func NewSimpleUser

func NewSimpleUser(simple Simple) *SimpleUser

func (SimpleUser) Do

func (u SimpleUser) Do() (string, string, string, int)

Jump to

Keyboard shortcuts

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