case1

package
v0.0.0-...-30da470 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package case1 is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, app *App) error

Types

type App

type App struct {
	kod.Implements[kod.Main]
	// contains filtered or unexported fields
}

type FooReq

type FooReq struct {
	Id    int `validate:"lt=100"`
	Panic bool
}

type FooRes

type FooRes struct {
	Id int
}

type HTTPController

type HTTPController interface {
	// Foo is implemented by [httpControllerImpl.Foo]
	//
	//	Foo is a http handler
	Foo(w http.ResponseWriter, r *http.Request)
}

HTTPController is implemented by [httpControllerImpl], which can be mocked with NewMockHTTPController.

type InterceptorRetry

type InterceptorRetry interface {
	// TestError is implemented by [interceptorRetry.TestError]
	TestError(ctx context.Context) error
	// TestNormal is implemented by [interceptorRetry.TestNormal]
	TestNormal(ctx context.Context) error
}

InterceptorRetry is implemented by [interceptorRetry], which can be mocked with NewMockInterceptorRetry.

type LazyInitComponent

type LazyInitComponent interface {
	// Try is implemented by [lazyInitComponent.Try]
	Try(ctx context.Context) error
}

LazyInitComponent is implemented by [lazyInitComponent], which can be mocked with NewMockLazyInitComponent.

type LazyInitImpl

type LazyInitImpl interface {
	// Try is implemented by [lazyInitImpl.Try]
	Try(ctx context.Context)
}

LazyInitImpl is implemented by [lazyInitImpl], which can be mocked with NewMockLazyInitImpl.

type MockHTTPController

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

MockHTTPController is a mock of HTTPController interface.

func NewMockHTTPController

func NewMockHTTPController(ctrl *gomock.Controller) *MockHTTPController

NewMockHTTPController creates a new mock instance.

func (*MockHTTPController) EXPECT

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

func (*MockHTTPController) Foo

Foo mocks base method.

type MockHTTPControllerFooCall

type MockHTTPControllerFooCall struct {
	*gomock.Call
}

MockHTTPControllerFooCall wrap *gomock.Call

func (*MockHTTPControllerFooCall) Do

Do rewrite *gomock.Call.Do

func (*MockHTTPControllerFooCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockHTTPControllerFooCall) Return

Return rewrite *gomock.Call.Return

type MockHTTPControllerMockRecorder

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

MockHTTPControllerMockRecorder is the mock recorder for MockHTTPController.

func (*MockHTTPControllerMockRecorder) Foo

Foo indicates an expected call of Foo.

type MockInterceptorRetry

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

MockInterceptorRetry is a mock of InterceptorRetry interface.

func NewMockInterceptorRetry

func NewMockInterceptorRetry(ctrl *gomock.Controller) *MockInterceptorRetry

NewMockInterceptorRetry creates a new mock instance.

func (*MockInterceptorRetry) EXPECT

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

func (*MockInterceptorRetry) TestError

func (m *MockInterceptorRetry) TestError(ctx context.Context) error

TestError mocks base method.

func (*MockInterceptorRetry) TestNormal

func (m *MockInterceptorRetry) TestNormal(ctx context.Context) error

TestNormal mocks base method.

type MockInterceptorRetryMockRecorder

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

MockInterceptorRetryMockRecorder is the mock recorder for MockInterceptorRetry.

func (*MockInterceptorRetryMockRecorder) TestError

TestError indicates an expected call of TestError.

func (*MockInterceptorRetryMockRecorder) TestNormal

TestNormal indicates an expected call of TestNormal.

type MockInterceptorRetryTestErrorCall

type MockInterceptorRetryTestErrorCall struct {
	*gomock.Call
}

MockInterceptorRetryTestErrorCall wrap *gomock.Call

func (*MockInterceptorRetryTestErrorCall) Do

Do rewrite *gomock.Call.Do

func (*MockInterceptorRetryTestErrorCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockInterceptorRetryTestErrorCall) Return

Return rewrite *gomock.Call.Return

type MockInterceptorRetryTestNormalCall

type MockInterceptorRetryTestNormalCall struct {
	*gomock.Call
}

MockInterceptorRetryTestNormalCall wrap *gomock.Call

func (*MockInterceptorRetryTestNormalCall) Do

Do rewrite *gomock.Call.Do

func (*MockInterceptorRetryTestNormalCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockInterceptorRetryTestNormalCall) Return

Return rewrite *gomock.Call.Return

type MockLazyInitComponent

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

MockLazyInitComponent is a mock of LazyInitComponent interface.

func NewMockLazyInitComponent

func NewMockLazyInitComponent(ctrl *gomock.Controller) *MockLazyInitComponent

NewMockLazyInitComponent creates a new mock instance.

func (*MockLazyInitComponent) EXPECT

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

func (*MockLazyInitComponent) Try

Try mocks base method.

type MockLazyInitComponentMockRecorder

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

MockLazyInitComponentMockRecorder is the mock recorder for MockLazyInitComponent.

func (*MockLazyInitComponentMockRecorder) Try

Try indicates an expected call of Try.

type MockLazyInitComponentTryCall

type MockLazyInitComponentTryCall struct {
	*gomock.Call
}

MockLazyInitComponentTryCall wrap *gomock.Call

func (*MockLazyInitComponentTryCall) Do

Do rewrite *gomock.Call.Do

func (*MockLazyInitComponentTryCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockLazyInitComponentTryCall) Return

Return rewrite *gomock.Call.Return

type MockLazyInitImpl

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

MockLazyInitImpl is a mock of LazyInitImpl interface.

func NewMockLazyInitImpl

func NewMockLazyInitImpl(ctrl *gomock.Controller) *MockLazyInitImpl

NewMockLazyInitImpl creates a new mock instance.

func (*MockLazyInitImpl) EXPECT

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

func (*MockLazyInitImpl) Try

func (m *MockLazyInitImpl) Try(ctx context.Context)

Try mocks base method.

type MockLazyInitImplMockRecorder

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

MockLazyInitImplMockRecorder is the mock recorder for MockLazyInitImpl.

func (*MockLazyInitImplMockRecorder) Try

Try indicates an expected call of Try.

type MockLazyInitImplTryCall

type MockLazyInitImplTryCall struct {
	*gomock.Call
}

MockLazyInitImplTryCall wrap *gomock.Call

func (*MockLazyInitImplTryCall) Do

Do rewrite *gomock.Call.Do

func (*MockLazyInitImplTryCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockLazyInitImplTryCall) Return

Return rewrite *gomock.Call.Return

type MockTest1Component

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

MockTest1Component is a mock of Test1Component interface.

func NewMockTest1Component

func NewMockTest1Component(ctrl *gomock.Controller) *MockTest1Component

NewMockTest1Component creates a new mock instance.

func (*MockTest1Component) EXPECT

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

func (*MockTest1Component) Foo

func (m *MockTest1Component) Foo(ctx context.Context, req *FooReq) (*FooRes, error)

Foo mocks base method.

type MockTest1ComponentFooCall

type MockTest1ComponentFooCall struct {
	*gomock.Call
}

MockTest1ComponentFooCall wrap *gomock.Call

func (*MockTest1ComponentFooCall) Do

Do rewrite *gomock.Call.Do

func (*MockTest1ComponentFooCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockTest1ComponentFooCall) Return

Return rewrite *gomock.Call.Return

type MockTest1ComponentMockRecorder

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

MockTest1ComponentMockRecorder is the mock recorder for MockTest1Component.

func (*MockTest1ComponentMockRecorder) Foo

Foo indicates an expected call of Foo.

type MockTest2Component

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

MockTest2Component is a mock of Test2Component interface.

func NewMockTest2Component

func NewMockTest2Component(ctrl *gomock.Controller) *MockTest2Component

NewMockTest2Component creates a new mock instance.

func (*MockTest2Component) EXPECT

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

func (*MockTest2Component) GetClient

func (m *MockTest2Component) GetClient() *http.Client

GetClient mocks base method.

type MockTest2ComponentGetClientCall

type MockTest2ComponentGetClientCall struct {
	*gomock.Call
}

MockTest2ComponentGetClientCall wrap *gomock.Call

func (*MockTest2ComponentGetClientCall) Do

Do rewrite *gomock.Call.Do

func (*MockTest2ComponentGetClientCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockTest2ComponentGetClientCall) Return

Return rewrite *gomock.Call.Return

type MockTest2ComponentMockRecorder

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

MockTest2ComponentMockRecorder is the mock recorder for MockTest2Component.

func (*MockTest2ComponentMockRecorder) GetClient

GetClient indicates an expected call of GetClient.

type MockctxInterface

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

MockctxInterface is a mock of ctxInterface interface.

func NewMockctxInterface

func NewMockctxInterface(ctrl *gomock.Controller) *MockctxInterface

NewMockctxInterface creates a new mock instance.

func (*MockctxInterface) EXPECT

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

func (*MockctxInterface) Foo

func (m *MockctxInterface) Foo(ctx context.Context)

Foo mocks base method.

type MockctxInterfaceFooCall

type MockctxInterfaceFooCall struct {
	*gomock.Call
}

MockctxInterfaceFooCall wrap *gomock.Call

func (*MockctxInterfaceFooCall) Do

Do rewrite *gomock.Call.Do

func (*MockctxInterfaceFooCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockctxInterfaceFooCall) Return

Return rewrite *gomock.Call.Return

type MockctxInterfaceMockRecorder

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

MockctxInterfaceMockRecorder is the mock recorder for MockctxInterface.

func (*MockctxInterfaceMockRecorder) Foo

Foo indicates an expected call of Foo.

type MockpanicCaseInterface

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

MockpanicCaseInterface is a mock of panicCaseInterface interface.

func NewMockpanicCaseInterface

func NewMockpanicCaseInterface(ctrl *gomock.Controller) *MockpanicCaseInterface

NewMockpanicCaseInterface creates a new mock instance.

func (*MockpanicCaseInterface) EXPECT

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

func (*MockpanicCaseInterface) TestPanic

func (m *MockpanicCaseInterface) TestPanic(ctx context.Context)

TestPanic mocks base method.

type MockpanicCaseInterfaceMockRecorder

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

MockpanicCaseInterfaceMockRecorder is the mock recorder for MockpanicCaseInterface.

func (*MockpanicCaseInterfaceMockRecorder) TestPanic

TestPanic indicates an expected call of TestPanic.

type MockpanicCaseInterfaceTestPanicCall

type MockpanicCaseInterfaceTestPanicCall struct {
	*gomock.Call
}

MockpanicCaseInterfaceTestPanicCall wrap *gomock.Call

func (*MockpanicCaseInterfaceTestPanicCall) Do

Do rewrite *gomock.Call.Do

func (*MockpanicCaseInterfaceTestPanicCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockpanicCaseInterfaceTestPanicCall) Return

Return rewrite *gomock.Call.Return

type MockpanicNoRecvoeryCaseInterface

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

MockpanicNoRecvoeryCaseInterface is a mock of panicNoRecvoeryCaseInterface interface.

func NewMockpanicNoRecvoeryCaseInterface

func NewMockpanicNoRecvoeryCaseInterface(ctrl *gomock.Controller) *MockpanicNoRecvoeryCaseInterface

NewMockpanicNoRecvoeryCaseInterface creates a new mock instance.

func (*MockpanicNoRecvoeryCaseInterface) EXPECT

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

func (*MockpanicNoRecvoeryCaseInterface) TestPanic

TestPanic mocks base method.

type MockpanicNoRecvoeryCaseInterfaceMockRecorder

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

MockpanicNoRecvoeryCaseInterfaceMockRecorder is the mock recorder for MockpanicNoRecvoeryCaseInterface.

func (*MockpanicNoRecvoeryCaseInterfaceMockRecorder) TestPanic

TestPanic indicates an expected call of TestPanic.

type MockpanicNoRecvoeryCaseInterfaceTestPanicCall

type MockpanicNoRecvoeryCaseInterfaceTestPanicCall struct {
	*gomock.Call
}

MockpanicNoRecvoeryCaseInterfaceTestPanicCall wrap *gomock.Call

func (*MockpanicNoRecvoeryCaseInterfaceTestPanicCall) Do

Do rewrite *gomock.Call.Do

func (*MockpanicNoRecvoeryCaseInterfaceTestPanicCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockpanicNoRecvoeryCaseInterfaceTestPanicCall) Return

Return rewrite *gomock.Call.Return

type Mocktest1Controller

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

Mocktest1Controller is a mock of test1Controller interface.

func NewMocktest1Controller

func NewMocktest1Controller(ctrl *gomock.Controller) *Mocktest1Controller

NewMocktest1Controller creates a new mock instance.

func (*Mocktest1Controller) EXPECT

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

type Mocktest1ControllerMockRecorder

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

Mocktest1ControllerMockRecorder is the mock recorder for Mocktest1Controller.

type MocktestEchoController

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

MocktestEchoController is a mock of testEchoController interface.

func NewMocktestEchoController

func NewMocktestEchoController(ctrl *gomock.Controller) *MocktestEchoController

NewMocktestEchoController creates a new mock instance.

func (*MocktestEchoController) EXPECT

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

func (*MocktestEchoController) Error

Error mocks base method.

func (*MocktestEchoController) Hello

Hello mocks base method.

type MocktestEchoControllerErrorCall

type MocktestEchoControllerErrorCall struct {
	*gomock.Call
}

MocktestEchoControllerErrorCall wrap *gomock.Call

func (*MocktestEchoControllerErrorCall) Do

Do rewrite *gomock.Call.Do

func (*MocktestEchoControllerErrorCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MocktestEchoControllerErrorCall) Return

Return rewrite *gomock.Call.Return

type MocktestEchoControllerHelloCall

type MocktestEchoControllerHelloCall struct {
	*gomock.Call
}

MocktestEchoControllerHelloCall wrap *gomock.Call

func (*MocktestEchoControllerHelloCall) Do

Do rewrite *gomock.Call.Do

func (*MocktestEchoControllerHelloCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MocktestEchoControllerHelloCall) Return

Return rewrite *gomock.Call.Return

type MocktestEchoControllerMockRecorder

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

MocktestEchoControllerMockRecorder is the mock recorder for MocktestEchoController.

func (*MocktestEchoControllerMockRecorder) Error

Error indicates an expected call of Error.

func (*MocktestEchoControllerMockRecorder) Hello

Hello indicates an expected call of Hello.

type MocktestGinController

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

MocktestGinController is a mock of testGinController interface.

func NewMocktestGinController

func NewMocktestGinController(ctrl *gomock.Controller) *MocktestGinController

NewMocktestGinController creates a new mock instance.

func (*MocktestGinController) EXPECT

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

func (*MocktestGinController) Hello

func (m *MocktestGinController) Hello(c *gin.Context)

Hello mocks base method.

type MocktestGinControllerHelloCall

type MocktestGinControllerHelloCall struct {
	*gomock.Call
}

MocktestGinControllerHelloCall wrap *gomock.Call

func (*MocktestGinControllerHelloCall) Do

Do rewrite *gomock.Call.Do

func (*MocktestGinControllerHelloCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MocktestGinControllerHelloCall) Return

Return rewrite *gomock.Call.Return

type MocktestGinControllerMockRecorder

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

MocktestGinControllerMockRecorder is the mock recorder for MocktestGinController.

func (*MocktestGinControllerMockRecorder) Hello

Hello indicates an expected call of Hello.

type MocktestRepository

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

MocktestRepository is a mock of testRepository interface.

func NewMocktestRepository

func NewMocktestRepository(ctrl *gomock.Controller) *MocktestRepository

NewMocktestRepository creates a new mock instance.

func (*MocktestRepository) EXPECT

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

func (*MocktestRepository) Foo

Foo mocks base method.

type MocktestRepositoryFooCall

type MocktestRepositoryFooCall struct {
	*gomock.Call
}

MocktestRepositoryFooCall wrap *gomock.Call

func (*MocktestRepositoryFooCall) Do

Do rewrite *gomock.Call.Do

func (*MocktestRepositoryFooCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MocktestRepositoryFooCall) Return

Return rewrite *gomock.Call.Return

type MocktestRepositoryMockRecorder

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

MocktestRepositoryMockRecorder is the mock recorder for MocktestRepository.

func (*MocktestRepositoryMockRecorder) Foo

Foo indicates an expected call of Foo.

type MocktestService

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

MocktestService is a mock of testService interface.

func NewMocktestService

func NewMocktestService(ctrl *gomock.Controller) *MocktestService

NewMocktestService creates a new mock instance.

func (*MocktestService) EXPECT

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

func (*MocktestService) Foo

func (m *MocktestService) Foo(ctx context.Context) error

Foo mocks base method.

type MocktestServiceFooCall

type MocktestServiceFooCall struct {
	*gomock.Call
}

MocktestServiceFooCall wrap *gomock.Call

func (*MocktestServiceFooCall) Do

Do rewrite *gomock.Call.Do

func (*MocktestServiceFooCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MocktestServiceFooCall) Return

Return rewrite *gomock.Call.Return

type MocktestServiceMockRecorder

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

MocktestServiceMockRecorder is the mock recorder for MocktestService.

func (*MocktestServiceMockRecorder) Foo

Foo indicates an expected call of Foo.

type Test1Component

type Test1Component interface {
	// Foo is implemented by [test1Component.Foo]
	Foo(ctx context.Context, req *FooReq) (*FooRes, error)
}

Test1Component is implemented by [test1Component], which can be mocked with NewMockTest1Component.

type Test2Component

type Test2Component interface {
	// GetClient is implemented by [test2Component.GetClient]
	GetClient() *http.Client
}

Test2Component is implemented by [test2Component], which can be mocked with NewMockTest2Component.

Jump to

Keyboard shortcuts

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