mocks

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlowRepository

type FlowRepository struct {
	mock.Mock
}

FlowRepository is an autogenerated mock type for the FlowRepository type

func NewFlowRepository

func NewFlowRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *FlowRepository

NewFlowRepository creates a new instance of FlowRepository. 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 (*FlowRepository) Delete

func (_m *FlowRepository) Delete(ctx context.Context, id uuid.UUID) error

Delete provides a mock function with given fields: ctx, id

func (*FlowRepository) DeleteExpiredFlows

func (_m *FlowRepository) DeleteExpiredFlows(ctx context.Context) error

DeleteExpiredFlows provides a mock function with given fields: ctx

func (*FlowRepository) EXPECT

func (*FlowRepository) Get

Get provides a mock function with given fields: ctx, id

func (*FlowRepository) Set

func (_m *FlowRepository) Set(ctx context.Context, flow *authenticate.Flow) error

Set provides a mock function with given fields: ctx, flow

type FlowRepository_DeleteExpiredFlows_Call

type FlowRepository_DeleteExpiredFlows_Call struct {
	*mock.Call
}

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

func (*FlowRepository_DeleteExpiredFlows_Call) Return

func (*FlowRepository_DeleteExpiredFlows_Call) Run

func (*FlowRepository_DeleteExpiredFlows_Call) RunAndReturn

type FlowRepository_Delete_Call

type FlowRepository_Delete_Call struct {
	*mock.Call
}

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

func (*FlowRepository_Delete_Call) Return

func (*FlowRepository_Delete_Call) Run

func (*FlowRepository_Delete_Call) RunAndReturn

type FlowRepository_Expecter

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

func (*FlowRepository_Expecter) Delete

func (_e *FlowRepository_Expecter) Delete(ctx interface{}, id interface{}) *FlowRepository_Delete_Call

Delete is a helper method to define mock.On call

  • ctx context.Context
  • id uuid.UUID

func (*FlowRepository_Expecter) DeleteExpiredFlows

func (_e *FlowRepository_Expecter) DeleteExpiredFlows(ctx interface{}) *FlowRepository_DeleteExpiredFlows_Call

DeleteExpiredFlows is a helper method to define mock.On call

  • ctx context.Context

func (*FlowRepository_Expecter) Get

func (_e *FlowRepository_Expecter) Get(ctx interface{}, id interface{}) *FlowRepository_Get_Call

Get is a helper method to define mock.On call

  • ctx context.Context
  • id uuid.UUID

func (*FlowRepository_Expecter) Set

func (_e *FlowRepository_Expecter) Set(ctx interface{}, flow interface{}) *FlowRepository_Set_Call

Set is a helper method to define mock.On call

  • ctx context.Context
  • flow *authenticate.Flow

type FlowRepository_Get_Call

type FlowRepository_Get_Call struct {
	*mock.Call
}

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

func (*FlowRepository_Get_Call) Return

func (*FlowRepository_Get_Call) Run

func (*FlowRepository_Get_Call) RunAndReturn

type FlowRepository_Set_Call

type FlowRepository_Set_Call struct {
	*mock.Call
}

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

func (*FlowRepository_Set_Call) Return

func (*FlowRepository_Set_Call) Run

func (*FlowRepository_Set_Call) RunAndReturn

type ServiceUserService

type ServiceUserService struct {
	mock.Mock
}

ServiceUserService is an autogenerated mock type for the ServiceUserService type

func NewServiceUserService

func NewServiceUserService(t interface {
	mock.TestingT
	Cleanup(func())
}) *ServiceUserService

NewServiceUserService creates a new instance of ServiceUserService. 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 (*ServiceUserService) EXPECT

func (*ServiceUserService) GetByJWT

GetByJWT provides a mock function with given fields: ctx, token

func (*ServiceUserService) GetBySecret

func (_m *ServiceUserService) GetBySecret(ctx context.Context, clientID string, clientSecret string) (serviceuser.ServiceUser, error)

GetBySecret provides a mock function with given fields: ctx, clientID, clientSecret

type ServiceUserService_Expecter

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

func (*ServiceUserService_Expecter) GetByJWT

func (_e *ServiceUserService_Expecter) GetByJWT(ctx interface{}, token interface{}) *ServiceUserService_GetByJWT_Call

GetByJWT is a helper method to define mock.On call

  • ctx context.Context
  • token string

func (*ServiceUserService_Expecter) GetBySecret

func (_e *ServiceUserService_Expecter) GetBySecret(ctx interface{}, clientID interface{}, clientSecret interface{}) *ServiceUserService_GetBySecret_Call

GetBySecret is a helper method to define mock.On call

  • ctx context.Context
  • clientID string
  • clientSecret string

type ServiceUserService_GetByJWT_Call

type ServiceUserService_GetByJWT_Call struct {
	*mock.Call
}

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

func (*ServiceUserService_GetByJWT_Call) Return

func (*ServiceUserService_GetByJWT_Call) Run

func (*ServiceUserService_GetByJWT_Call) RunAndReturn

type ServiceUserService_GetBySecret_Call

type ServiceUserService_GetBySecret_Call struct {
	*mock.Call
}

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

func (*ServiceUserService_GetBySecret_Call) Return

func (*ServiceUserService_GetBySecret_Call) Run

func (*ServiceUserService_GetBySecret_Call) RunAndReturn

type SessionService

type SessionService struct {
	mock.Mock
}

SessionService is an autogenerated mock type for the SessionService type

func NewSessionService

func NewSessionService(t interface {
	mock.TestingT
	Cleanup(func())
}) *SessionService

NewSessionService creates a new instance of SessionService. 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 (*SessionService) EXPECT

func (*SessionService) ExtractFromContext

func (_m *SessionService) ExtractFromContext(ctx context.Context) (*session.Session, error)

ExtractFromContext provides a mock function with given fields: ctx

type SessionService_Expecter

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

func (*SessionService_Expecter) ExtractFromContext

func (_e *SessionService_Expecter) ExtractFromContext(ctx interface{}) *SessionService_ExtractFromContext_Call

ExtractFromContext is a helper method to define mock.On call

  • ctx context.Context

type SessionService_ExtractFromContext_Call

type SessionService_ExtractFromContext_Call struct {
	*mock.Call
}

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

func (*SessionService_ExtractFromContext_Call) Return

func (*SessionService_ExtractFromContext_Call) Run

func (*SessionService_ExtractFromContext_Call) RunAndReturn

type TokenService

type TokenService struct {
	mock.Mock
}

TokenService is an autogenerated mock type for the TokenService type

func NewTokenService

func NewTokenService(t interface {
	mock.TestingT
	Cleanup(func())
}) *TokenService

NewTokenService creates a new instance of TokenService. 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 (*TokenService) Build

func (_m *TokenService) Build(subjectID string, metadata map[string]string) ([]byte, error)

Build provides a mock function with given fields: subjectID, metadata

func (*TokenService) EXPECT

func (_m *TokenService) EXPECT() *TokenService_Expecter

func (*TokenService) GetPublicKeySet

func (_m *TokenService) GetPublicKeySet() jwk.Set

GetPublicKeySet provides a mock function with given fields:

func (*TokenService) Parse

func (_m *TokenService) Parse(ctx context.Context, userToken []byte) (string, map[string]interface{}, error)

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

type TokenService_Build_Call

type TokenService_Build_Call struct {
	*mock.Call
}

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

func (*TokenService_Build_Call) Return

func (*TokenService_Build_Call) Run

func (_c *TokenService_Build_Call) Run(run func(subjectID string, metadata map[string]string)) *TokenService_Build_Call

func (*TokenService_Build_Call) RunAndReturn

func (_c *TokenService_Build_Call) RunAndReturn(run func(string, map[string]string) ([]byte, error)) *TokenService_Build_Call

type TokenService_Expecter

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

func (*TokenService_Expecter) Build

func (_e *TokenService_Expecter) Build(subjectID interface{}, metadata interface{}) *TokenService_Build_Call

Build is a helper method to define mock.On call

  • subjectID string
  • metadata map[string]string

func (*TokenService_Expecter) GetPublicKeySet

GetPublicKeySet is a helper method to define mock.On call

func (*TokenService_Expecter) Parse

func (_e *TokenService_Expecter) Parse(ctx interface{}, userToken interface{}) *TokenService_Parse_Call

Parse is a helper method to define mock.On call

  • ctx context.Context
  • userToken []byte

type TokenService_GetPublicKeySet_Call

type TokenService_GetPublicKeySet_Call struct {
	*mock.Call
}

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

func (*TokenService_GetPublicKeySet_Call) Return

func (*TokenService_GetPublicKeySet_Call) Run

func (*TokenService_GetPublicKeySet_Call) RunAndReturn

type TokenService_Parse_Call

type TokenService_Parse_Call struct {
	*mock.Call
}

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

func (*TokenService_Parse_Call) Return

func (_c *TokenService_Parse_Call) Return(_a0 string, _a1 map[string]interface{}, _a2 error) *TokenService_Parse_Call

func (*TokenService_Parse_Call) Run

func (_c *TokenService_Parse_Call) Run(run func(ctx context.Context, userToken []byte)) *TokenService_Parse_Call

func (*TokenService_Parse_Call) RunAndReturn

func (_c *TokenService_Parse_Call) RunAndReturn(run func(context.Context, []byte) (string, map[string]interface{}, error)) *TokenService_Parse_Call

type UserService

type UserService struct {
	mock.Mock
}

UserService is an autogenerated mock type for the UserService type

func NewUserService

func NewUserService(t interface {
	mock.TestingT
	Cleanup(func())
}) *UserService

NewUserService creates a new instance of UserService. 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 (*UserService) Create

func (_m *UserService) Create(_a0 context.Context, _a1 user.User) (user.User, error)

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

func (*UserService) EXPECT

func (_m *UserService) EXPECT() *UserService_Expecter

func (*UserService) GetByID

func (_m *UserService) GetByID(ctx context.Context, id string) (user.User, error)

GetByID provides a mock function with given fields: ctx, id

func (*UserService) Update

func (_m *UserService) Update(ctx context.Context, toUpdate user.User) (user.User, error)

Update provides a mock function with given fields: ctx, toUpdate

type UserService_Create_Call

type UserService_Create_Call struct {
	*mock.Call
}

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

func (*UserService_Create_Call) Return

func (*UserService_Create_Call) Run

func (*UserService_Create_Call) RunAndReturn

type UserService_Expecter

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

func (*UserService_Expecter) Create

func (_e *UserService_Expecter) Create(_a0 interface{}, _a1 interface{}) *UserService_Create_Call

Create is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 user.User

func (*UserService_Expecter) GetByID

func (_e *UserService_Expecter) GetByID(ctx interface{}, id interface{}) *UserService_GetByID_Call

GetByID is a helper method to define mock.On call

  • ctx context.Context
  • id string

func (*UserService_Expecter) Update

func (_e *UserService_Expecter) Update(ctx interface{}, toUpdate interface{}) *UserService_Update_Call

Update is a helper method to define mock.On call

  • ctx context.Context
  • toUpdate user.User

type UserService_GetByID_Call

type UserService_GetByID_Call struct {
	*mock.Call
}

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

func (*UserService_GetByID_Call) Return

func (*UserService_GetByID_Call) Run

func (*UserService_GetByID_Call) RunAndReturn

type UserService_Update_Call

type UserService_Update_Call struct {
	*mock.Call
}

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

func (*UserService_Update_Call) Return

func (*UserService_Update_Call) Run

func (_c *UserService_Update_Call) Run(run func(ctx context.Context, toUpdate user.User)) *UserService_Update_Call

func (*UserService_Update_Call) RunAndReturn

Jump to

Keyboard shortcuts

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