errorstest

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Detail

type Detail struct {
	mock.Mock
}

Detail is an autogenerated mock type for the Detail type

func NewDetail

func NewDetail(t interface {
	mock.TestingT
	Cleanup(func())
}) *Detail

NewDetail creates a new instance of Detail. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Detail) Code

func (_mock *Detail) Code() errors.Code

Code provides a mock function for the type Detail

func (*Detail) EXPECT

func (_m *Detail) EXPECT() *Detail_Expecter

func (*Detail) Field

func (_mock *Detail) Field() string

Field provides a mock function for the type Detail

func (*Detail) Message

func (_mock *Detail) Message() string

Message provides a mock function for the type Detail

func (*Detail) Value

func (_mock *Detail) Value() interface{}

Value provides a mock function for the type Detail

type Detail_Code_Call

type Detail_Code_Call struct {
	*mock.Call
}

Detail_Code_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Code'

func (*Detail_Code_Call) Return

func (_c *Detail_Code_Call) Return(code errors.Code) *Detail_Code_Call

func (*Detail_Code_Call) Run

func (_c *Detail_Code_Call) Run(run func()) *Detail_Code_Call

func (*Detail_Code_Call) RunAndReturn

func (_c *Detail_Code_Call) RunAndReturn(run func() errors.Code) *Detail_Code_Call

type Detail_Expecter

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

func (*Detail_Expecter) Code

func (_e *Detail_Expecter) Code() *Detail_Code_Call

Code is a helper method to define mock.On call

func (*Detail_Expecter) Field

func (_e *Detail_Expecter) Field() *Detail_Field_Call

Field is a helper method to define mock.On call

func (*Detail_Expecter) Message

func (_e *Detail_Expecter) Message() *Detail_Message_Call

Message is a helper method to define mock.On call

func (*Detail_Expecter) Value

func (_e *Detail_Expecter) Value() *Detail_Value_Call

Value is a helper method to define mock.On call

type Detail_Field_Call

type Detail_Field_Call struct {
	*mock.Call
}

Detail_Field_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Field'

func (*Detail_Field_Call) Return

func (*Detail_Field_Call) Run

func (_c *Detail_Field_Call) Run(run func()) *Detail_Field_Call

func (*Detail_Field_Call) RunAndReturn

func (_c *Detail_Field_Call) RunAndReturn(run func() string) *Detail_Field_Call

type Detail_Message_Call

type Detail_Message_Call struct {
	*mock.Call
}

Detail_Message_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Message'

func (*Detail_Message_Call) Return

func (*Detail_Message_Call) Run

func (_c *Detail_Message_Call) Run(run func()) *Detail_Message_Call

func (*Detail_Message_Call) RunAndReturn

func (_c *Detail_Message_Call) RunAndReturn(run func() string) *Detail_Message_Call

type Detail_Value_Call

type Detail_Value_Call struct {
	*mock.Call
}

Detail_Value_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Value'

func (*Detail_Value_Call) Return

func (_c *Detail_Value_Call) Return(ifaceVal interface{}) *Detail_Value_Call

func (*Detail_Value_Call) Run

func (_c *Detail_Value_Call) Run(run func()) *Detail_Value_Call

func (*Detail_Value_Call) RunAndReturn

func (_c *Detail_Value_Call) RunAndReturn(run func() interface{}) *Detail_Value_Call

type Error

type Error struct {
	mock.Mock
}

Error is an autogenerated mock type for the Error type

func NewError

func NewError(t interface {
	mock.TestingT
	Cleanup(func())
}) *Error

NewError creates a new instance of Error. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Error) Cause

func (_mock *Error) Cause() error

Cause provides a mock function for the type Error

func (*Error) Code

func (_mock *Error) Code() errors.Code

Code provides a mock function for the type Error

func (*Error) Details

func (_mock *Error) Details() []errors.Detail

Details provides a mock function for the type Error

func (*Error) EXPECT

func (_m *Error) EXPECT() *Error_Expecter

func (*Error) Error

func (_mock *Error) Error() string

Error provides a mock function for the type Error

func (*Error) GRPCCode

func (_mock *Error) GRPCCode() codes.Code

GRPCCode provides a mock function for the type Error

func (*Error) HTTPStatus

func (_mock *Error) HTTPStatus() int

HTTPStatus provides a mock function for the type Error

func (*Error) Message

func (_mock *Error) Message() string

Message provides a mock function for the type Error

func (*Error) RequestID

func (_mock *Error) RequestID() string

RequestID provides a mock function for the type Error

func (*Error) Service

func (_mock *Error) Service() string

Service provides a mock function for the type Error

func (*Error) Timestamp

func (_mock *Error) Timestamp() time.Time

Timestamp provides a mock function for the type Error

type Error_Cause_Call

type Error_Cause_Call struct {
	*mock.Call
}

Error_Cause_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Cause'

func (*Error_Cause_Call) Return

func (_c *Error_Cause_Call) Return(err error) *Error_Cause_Call

func (*Error_Cause_Call) Run

func (_c *Error_Cause_Call) Run(run func()) *Error_Cause_Call

func (*Error_Cause_Call) RunAndReturn

func (_c *Error_Cause_Call) RunAndReturn(run func() error) *Error_Cause_Call

type Error_Code_Call

type Error_Code_Call struct {
	*mock.Call
}

Error_Code_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Code'

func (*Error_Code_Call) Return

func (_c *Error_Code_Call) Return(code errors.Code) *Error_Code_Call

func (*Error_Code_Call) Run

func (_c *Error_Code_Call) Run(run func()) *Error_Code_Call

func (*Error_Code_Call) RunAndReturn

func (_c *Error_Code_Call) RunAndReturn(run func() errors.Code) *Error_Code_Call

type Error_Details_Call

type Error_Details_Call struct {
	*mock.Call
}

Error_Details_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Details'

func (*Error_Details_Call) Return

func (_c *Error_Details_Call) Return(details []errors.Detail) *Error_Details_Call

func (*Error_Details_Call) Run

func (_c *Error_Details_Call) Run(run func()) *Error_Details_Call

func (*Error_Details_Call) RunAndReturn

func (_c *Error_Details_Call) RunAndReturn(run func() []errors.Detail) *Error_Details_Call

type Error_Error_Call

type Error_Error_Call struct {
	*mock.Call
}

Error_Error_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Error'

func (*Error_Error_Call) Return

func (_c *Error_Error_Call) Return(s string) *Error_Error_Call

func (*Error_Error_Call) Run

func (_c *Error_Error_Call) Run(run func()) *Error_Error_Call

func (*Error_Error_Call) RunAndReturn

func (_c *Error_Error_Call) RunAndReturn(run func() string) *Error_Error_Call

type Error_Expecter

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

func (*Error_Expecter) Cause

func (_e *Error_Expecter) Cause() *Error_Cause_Call

Cause is a helper method to define mock.On call

func (*Error_Expecter) Code

func (_e *Error_Expecter) Code() *Error_Code_Call

Code is a helper method to define mock.On call

func (*Error_Expecter) Details

func (_e *Error_Expecter) Details() *Error_Details_Call

Details is a helper method to define mock.On call

func (*Error_Expecter) Error

func (_e *Error_Expecter) Error() *Error_Error_Call

Error is a helper method to define mock.On call

func (*Error_Expecter) GRPCCode

func (_e *Error_Expecter) GRPCCode() *Error_GRPCCode_Call

GRPCCode is a helper method to define mock.On call

func (*Error_Expecter) HTTPStatus

func (_e *Error_Expecter) HTTPStatus() *Error_HTTPStatus_Call

HTTPStatus is a helper method to define mock.On call

func (*Error_Expecter) Message

func (_e *Error_Expecter) Message() *Error_Message_Call

Message is a helper method to define mock.On call

func (*Error_Expecter) RequestID

func (_e *Error_Expecter) RequestID() *Error_RequestID_Call

RequestID is a helper method to define mock.On call

func (*Error_Expecter) Service

func (_e *Error_Expecter) Service() *Error_Service_Call

Service is a helper method to define mock.On call

func (*Error_Expecter) Timestamp

func (_e *Error_Expecter) Timestamp() *Error_Timestamp_Call

Timestamp is a helper method to define mock.On call

type Error_GRPCCode_Call

type Error_GRPCCode_Call struct {
	*mock.Call
}

Error_GRPCCode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GRPCCode'

func (*Error_GRPCCode_Call) Return

func (*Error_GRPCCode_Call) Run

func (_c *Error_GRPCCode_Call) Run(run func()) *Error_GRPCCode_Call

func (*Error_GRPCCode_Call) RunAndReturn

func (_c *Error_GRPCCode_Call) RunAndReturn(run func() codes.Code) *Error_GRPCCode_Call

type Error_HTTPStatus_Call

type Error_HTTPStatus_Call struct {
	*mock.Call
}

Error_HTTPStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HTTPStatus'

func (*Error_HTTPStatus_Call) Return

func (*Error_HTTPStatus_Call) Run

func (_c *Error_HTTPStatus_Call) Run(run func()) *Error_HTTPStatus_Call

func (*Error_HTTPStatus_Call) RunAndReturn

func (_c *Error_HTTPStatus_Call) RunAndReturn(run func() int) *Error_HTTPStatus_Call

type Error_Message_Call

type Error_Message_Call struct {
	*mock.Call
}

Error_Message_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Message'

func (*Error_Message_Call) Return

func (*Error_Message_Call) Run

func (_c *Error_Message_Call) Run(run func()) *Error_Message_Call

func (*Error_Message_Call) RunAndReturn

func (_c *Error_Message_Call) RunAndReturn(run func() string) *Error_Message_Call

type Error_RequestID_Call

type Error_RequestID_Call struct {
	*mock.Call
}

Error_RequestID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RequestID'

func (*Error_RequestID_Call) Return

func (*Error_RequestID_Call) Run

func (_c *Error_RequestID_Call) Run(run func()) *Error_RequestID_Call

func (*Error_RequestID_Call) RunAndReturn

func (_c *Error_RequestID_Call) RunAndReturn(run func() string) *Error_RequestID_Call

type Error_Service_Call

type Error_Service_Call struct {
	*mock.Call
}

Error_Service_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Service'

func (*Error_Service_Call) Return

func (*Error_Service_Call) Run

func (_c *Error_Service_Call) Run(run func()) *Error_Service_Call

func (*Error_Service_Call) RunAndReturn

func (_c *Error_Service_Call) RunAndReturn(run func() string) *Error_Service_Call

type Error_Timestamp_Call

type Error_Timestamp_Call struct {
	*mock.Call
}

Error_Timestamp_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Timestamp'

func (*Error_Timestamp_Call) Return

func (*Error_Timestamp_Call) Run

func (_c *Error_Timestamp_Call) Run(run func()) *Error_Timestamp_Call

func (*Error_Timestamp_Call) RunAndReturn

func (_c *Error_Timestamp_Call) RunAndReturn(run func() time.Time) *Error_Timestamp_Call

Jump to

Keyboard shortcuts

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