jwttoken

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockJwtToken

type MockJwtToken struct {
	mock.Mock
}

MockJwtToken is an autogenerated mock type for the JwtToken type

func NewMockJwtToken

func NewMockJwtToken(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockJwtToken

NewMockJwtToken creates a new instance of MockJwtToken. 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 (*MockJwtToken) CreateAccessToken

func (_m *MockJwtToken) CreateAccessToken(_a0 context.Context, _a1 model.SessionUser) (string, *time.Time, error)

CreateAccessToken provides a mock function with given fields: _a0, _a1

func (*MockJwtToken) CreateRefreshToken

func (_m *MockJwtToken) CreateRefreshToken(_a0 context.Context, _a1 model.SessionUser) (string, *time.Time, error)

CreateRefreshToken provides a mock function with given fields: _a0, _a1

func (*MockJwtToken) CreateTokenCustomDuration

func (_m *MockJwtToken) CreateTokenCustomDuration(_a0 context.Context, _a1 model.SessionUser, _a2 time.Duration) (string, *time.Time, error)

CreateTokenCustomDuration provides a mock function with given fields: _a0, _a1, _a2

func (*MockJwtToken) EXPECT

func (_m *MockJwtToken) EXPECT() *MockJwtToken_Expecter

func (*MockJwtToken) Parse

func (_m *MockJwtToken) Parse(ctx context.Context, tokenString string) (*model.SessionUser, error)

Parse provides a mock function with given fields: ctx, tokenString

func (*MockJwtToken) SetSecretKey

func (_m *MockJwtToken) SetSecretKey(secretKey []byte, signMethod jwt.SigningMethod)

SetSecretKey provides a mock function with given fields: secretKey, signMethod

type MockJwtToken_CreateAccessToken_Call

type MockJwtToken_CreateAccessToken_Call struct {
	*mock.Call
}

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

func (*MockJwtToken_CreateAccessToken_Call) Return

func (*MockJwtToken_CreateAccessToken_Call) Run

func (*MockJwtToken_CreateAccessToken_Call) RunAndReturn

type MockJwtToken_CreateRefreshToken_Call

type MockJwtToken_CreateRefreshToken_Call struct {
	*mock.Call
}

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

func (*MockJwtToken_CreateRefreshToken_Call) Return

func (*MockJwtToken_CreateRefreshToken_Call) Run

func (*MockJwtToken_CreateRefreshToken_Call) RunAndReturn

type MockJwtToken_CreateTokenCustomDuration_Call

type MockJwtToken_CreateTokenCustomDuration_Call struct {
	*mock.Call
}

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

func (*MockJwtToken_CreateTokenCustomDuration_Call) Return

func (*MockJwtToken_CreateTokenCustomDuration_Call) Run

func (*MockJwtToken_CreateTokenCustomDuration_Call) RunAndReturn

type MockJwtToken_Expecter

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

func (*MockJwtToken_Expecter) CreateAccessToken

func (_e *MockJwtToken_Expecter) CreateAccessToken(_a0 interface{}, _a1 interface{}) *MockJwtToken_CreateAccessToken_Call

CreateAccessToken is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 model.SessionUser

func (*MockJwtToken_Expecter) CreateRefreshToken

func (_e *MockJwtToken_Expecter) CreateRefreshToken(_a0 interface{}, _a1 interface{}) *MockJwtToken_CreateRefreshToken_Call

CreateRefreshToken is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 model.SessionUser

func (*MockJwtToken_Expecter) CreateTokenCustomDuration

func (_e *MockJwtToken_Expecter) CreateTokenCustomDuration(_a0 interface{}, _a1 interface{}, _a2 interface{}) *MockJwtToken_CreateTokenCustomDuration_Call

CreateTokenCustomDuration is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 model.SessionUser
  • _a2 time.Duration

func (*MockJwtToken_Expecter) Parse

func (_e *MockJwtToken_Expecter) Parse(ctx interface{}, tokenString interface{}) *MockJwtToken_Parse_Call

Parse is a helper method to define mock.On call

  • ctx context.Context
  • tokenString string

func (*MockJwtToken_Expecter) SetSecretKey

func (_e *MockJwtToken_Expecter) SetSecretKey(secretKey interface{}, signMethod interface{}) *MockJwtToken_SetSecretKey_Call

SetSecretKey is a helper method to define mock.On call

  • secretKey []byte
  • signMethod jwt.SigningMethod

type MockJwtToken_Parse_Call

type MockJwtToken_Parse_Call struct {
	*mock.Call
}

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

func (*MockJwtToken_Parse_Call) Return

func (*MockJwtToken_Parse_Call) Run

func (_c *MockJwtToken_Parse_Call) Run(run func(ctx context.Context, tokenString string)) *MockJwtToken_Parse_Call

func (*MockJwtToken_Parse_Call) RunAndReturn

type MockJwtToken_SetSecretKey_Call

type MockJwtToken_SetSecretKey_Call struct {
	*mock.Call
}

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

func (*MockJwtToken_SetSecretKey_Call) Return

func (*MockJwtToken_SetSecretKey_Call) Run

func (_c *MockJwtToken_SetSecretKey_Call) Run(run func(secretKey []byte, signMethod jwt.SigningMethod)) *MockJwtToken_SetSecretKey_Call

func (*MockJwtToken_SetSecretKey_Call) RunAndReturn

Jump to

Keyboard shortcuts

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