mocktoken

package
v0.0.0-...-d64ad05 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockMaker

type MockMaker struct {
	mock.Mock
}

MockMaker is an autogenerated mock type for the Maker type

func NewMockMaker

func NewMockMaker(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockMaker

NewMockMaker creates a new instance of MockMaker. 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 (*MockMaker) CreateToken

func (_m *MockMaker) CreateToken(user token.User, duration time.Duration) (string, *token.Payload, error)

CreateToken provides a mock function with given fields: user, duration

func (*MockMaker) EXPECT

func (_m *MockMaker) EXPECT() *MockMaker_Expecter

func (*MockMaker) VerifyToken

func (_m *MockMaker) VerifyToken(_a0 string) (*token.Payload, error)

VerifyToken provides a mock function with given fields: _a0

type MockMaker_CreateToken_Call

type MockMaker_CreateToken_Call struct {
	*mock.Call
}

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

func (*MockMaker_CreateToken_Call) Return

func (*MockMaker_CreateToken_Call) Run

func (_c *MockMaker_CreateToken_Call) Run(run func(user token.User, duration time.Duration)) *MockMaker_CreateToken_Call

func (*MockMaker_CreateToken_Call) RunAndReturn

type MockMaker_Expecter

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

func (*MockMaker_Expecter) CreateToken

func (_e *MockMaker_Expecter) CreateToken(user interface{}, duration interface{}) *MockMaker_CreateToken_Call

CreateToken is a helper method to define mock.On call

  • user token.User
  • duration time.Duration

func (*MockMaker_Expecter) VerifyToken

func (_e *MockMaker_Expecter) VerifyToken(_a0 interface{}) *MockMaker_VerifyToken_Call

VerifyToken is a helper method to define mock.On call

  • _a0 string

type MockMaker_VerifyToken_Call

type MockMaker_VerifyToken_Call struct {
	*mock.Call
}

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

func (*MockMaker_VerifyToken_Call) Return

func (*MockMaker_VerifyToken_Call) Run

func (*MockMaker_VerifyToken_Call) RunAndReturn

Jump to

Keyboard shortcuts

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