mocks

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockAnalyzer

type MockAnalyzer struct {
	mock.Mock
}

MockAnalyzer is an autogenerated mock type for the Analyzer type

func NewMockAnalyzer

func NewMockAnalyzer(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockAnalyzer

NewMockAnalyzer creates a new instance of MockAnalyzer. 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 (*MockAnalyzer) AddRule

func (_mock *MockAnalyzer) AddRule(r rules.Rule)

AddRule provides a mock function for the type MockAnalyzer

func (*MockAnalyzer) EXPECT

func (_m *MockAnalyzer) EXPECT() *MockAnalyzer_Expecter

func (*MockAnalyzer) Errors

func (_mock *MockAnalyzer) Errors() []string

Errors provides a mock function for the type MockAnalyzer

func (*MockAnalyzer) KnownRoles

func (_mock *MockAnalyzer) KnownRoles() []string

KnownRoles provides a mock function for the type MockAnalyzer

func (*MockAnalyzer) MatchesRule

func (_mock *MockAnalyzer) MatchesRule(ri *rules.RequestInfo) *rules.Rule

MatchesRule provides a mock function for the type MockAnalyzer

func (*MockAnalyzer) Rules

func (_mock *MockAnalyzer) Rules() []rules.Rule

Rules provides a mock function for the type MockAnalyzer

func (*MockAnalyzer) WriteConfig

func (_mock *MockAnalyzer) WriteConfig() error

WriteConfig provides a mock function for the type MockAnalyzer

type MockAnalyzer_AddRule_Call

type MockAnalyzer_AddRule_Call struct {
	*mock.Call
}

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

func (*MockAnalyzer_AddRule_Call) Return

func (*MockAnalyzer_AddRule_Call) Run

func (*MockAnalyzer_AddRule_Call) RunAndReturn

func (_c *MockAnalyzer_AddRule_Call) RunAndReturn(run func(r rules.Rule)) *MockAnalyzer_AddRule_Call

type MockAnalyzer_Errors_Call

type MockAnalyzer_Errors_Call struct {
	*mock.Call
}

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

func (*MockAnalyzer_Errors_Call) Return

func (*MockAnalyzer_Errors_Call) Run

func (*MockAnalyzer_Errors_Call) RunAndReturn

func (_c *MockAnalyzer_Errors_Call) RunAndReturn(run func() []string) *MockAnalyzer_Errors_Call

type MockAnalyzer_Expecter

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

func (*MockAnalyzer_Expecter) AddRule

func (_e *MockAnalyzer_Expecter) AddRule(r interface{}) *MockAnalyzer_AddRule_Call

AddRule is a helper method to define mock.On call

  • r rules.Rule

func (*MockAnalyzer_Expecter) Errors

Errors is a helper method to define mock.On call

func (*MockAnalyzer_Expecter) KnownRoles

KnownRoles is a helper method to define mock.On call

func (*MockAnalyzer_Expecter) MatchesRule

func (_e *MockAnalyzer_Expecter) MatchesRule(ri interface{}) *MockAnalyzer_MatchesRule_Call

MatchesRule is a helper method to define mock.On call

  • ri *rules.RequestInfo

func (*MockAnalyzer_Expecter) Rules

Rules is a helper method to define mock.On call

func (*MockAnalyzer_Expecter) WriteConfig

WriteConfig is a helper method to define mock.On call

type MockAnalyzer_KnownRoles_Call

type MockAnalyzer_KnownRoles_Call struct {
	*mock.Call
}

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

func (*MockAnalyzer_KnownRoles_Call) Return

func (*MockAnalyzer_KnownRoles_Call) Run

func (*MockAnalyzer_KnownRoles_Call) RunAndReturn

func (_c *MockAnalyzer_KnownRoles_Call) RunAndReturn(run func() []string) *MockAnalyzer_KnownRoles_Call

type MockAnalyzer_MatchesRule_Call

type MockAnalyzer_MatchesRule_Call struct {
	*mock.Call
}

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

func (*MockAnalyzer_MatchesRule_Call) Return

func (*MockAnalyzer_MatchesRule_Call) Run

func (*MockAnalyzer_MatchesRule_Call) RunAndReturn

type MockAnalyzer_Rules_Call

type MockAnalyzer_Rules_Call struct {
	*mock.Call
}

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

func (*MockAnalyzer_Rules_Call) Return

func (*MockAnalyzer_Rules_Call) Run

func (_c *MockAnalyzer_Rules_Call) Run(run func()) *MockAnalyzer_Rules_Call

func (*MockAnalyzer_Rules_Call) RunAndReturn

func (_c *MockAnalyzer_Rules_Call) RunAndReturn(run func() []rules.Rule) *MockAnalyzer_Rules_Call

type MockAnalyzer_WriteConfig_Call

type MockAnalyzer_WriteConfig_Call struct {
	*mock.Call
}

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

func (*MockAnalyzer_WriteConfig_Call) Return

func (*MockAnalyzer_WriteConfig_Call) Run

func (*MockAnalyzer_WriteConfig_Call) RunAndReturn

type MockDB

type MockDB struct {
	mock.Mock
}

MockDB is an autogenerated mock type for the DB type

func NewMockDB

func NewMockDB(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockDB

NewMockDB creates a new instance of MockDB. 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 (*MockDB) Close

func (_mock *MockDB) Close() error

Close provides a mock function for the type MockDB

func (*MockDB) CreateUser

func (_mock *MockDB) CreateUser(ctx context.Context, user1 *user.User) error

CreateUser provides a mock function for the type MockDB

func (*MockDB) DeleteKey

func (_mock *MockDB) DeleteKey(ctx context.Context, keyID string) error

DeleteKey provides a mock function for the type MockDB

func (*MockDB) DeleteUser

func (_mock *MockDB) DeleteUser(ctx context.Context, userId string) error

DeleteUser provides a mock function for the type MockDB

func (*MockDB) EXPECT

func (_m *MockDB) EXPECT() *MockDB_Expecter

func (*MockDB) FindKeyById

func (_mock *MockDB) FindKeyById(ctx context.Context, keyID string) (user.Passkey, error)

FindKeyById provides a mock function for the type MockDB

func (*MockDB) FindUserByCredentialInfo

func (_mock *MockDB) FindUserByCredentialInfo(ctx context.Context, rid []byte, handle []byte) (*user.User, error)

FindUserByCredentialInfo provides a mock function for the type MockDB

func (*MockDB) GetAllUsers

func (_mock *MockDB) GetAllUsers(ctx context.Context) ([]*user.AdminListUser, error)

GetAllUsers provides a mock function for the type MockDB

func (*MockDB) GetUserByGuid

func (_mock *MockDB) GetUserByGuid(ctx context.Context, guid string) (*user.User, error)

GetUserByGuid provides a mock function for the type MockDB

func (*MockDB) GetUserByUsername

func (_mock *MockDB) GetUserByUsername(ctx context.Context, username string) (*user.User, error)

GetUserByUsername provides a mock function for the type MockDB

func (*MockDB) NeedsSetup

func (_mock *MockDB) NeedsSetup(ctx context.Context) (bool, error)

NeedsSetup provides a mock function for the type MockDB

func (*MockDB) SaveCredentialForUser

func (_mock *MockDB) SaveCredentialForUser(ctx context.Context, userId string, credential *webauthn.Credential) error

SaveCredentialForUser provides a mock function for the type MockDB

func (*MockDB) SaveUser

func (_mock *MockDB) SaveUser(ctx context.Context, user1 *user.User) error

SaveUser provides a mock function for the type MockDB

func (*MockDB) SetUserEnabled

func (_mock *MockDB) SetUserEnabled(ctx context.Context, userId string, enabled bool) error

SetUserEnabled provides a mock function for the type MockDB

func (*MockDB) UpdateCredentialOnLogin

func (_mock *MockDB) UpdateCredentialOnLogin(ctx context.Context, credential *webauthn.Credential) error

UpdateCredentialOnLogin provides a mock function for the type MockDB

func (*MockDB) UpdateKeyName

func (_mock *MockDB) UpdateKeyName(ctx context.Context, keyID string, name *string) error

UpdateKeyName provides a mock function for the type MockDB

func (*MockDB) UpdatePassword

func (_mock *MockDB) UpdatePassword(ctx context.Context, user1 *user.User) error

UpdatePassword provides a mock function for the type MockDB

func (*MockDB) UpdateTOTPSeed

func (_mock *MockDB) UpdateTOTPSeed(ctx context.Context, userID string, secret string) error

UpdateTOTPSeed provides a mock function for the type MockDB

type MockDB_Close_Call

type MockDB_Close_Call struct {
	*mock.Call
}

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

func (*MockDB_Close_Call) Return

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

func (*MockDB_Close_Call) Run

func (_c *MockDB_Close_Call) Run(run func()) *MockDB_Close_Call

func (*MockDB_Close_Call) RunAndReturn

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

type MockDB_CreateUser_Call

type MockDB_CreateUser_Call struct {
	*mock.Call
}

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

func (*MockDB_CreateUser_Call) Return

func (*MockDB_CreateUser_Call) Run

func (_c *MockDB_CreateUser_Call) Run(run func(ctx context.Context, user1 *user.User)) *MockDB_CreateUser_Call

func (*MockDB_CreateUser_Call) RunAndReturn

func (_c *MockDB_CreateUser_Call) RunAndReturn(run func(ctx context.Context, user1 *user.User) error) *MockDB_CreateUser_Call

type MockDB_DeleteKey_Call

type MockDB_DeleteKey_Call struct {
	*mock.Call
}

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

func (*MockDB_DeleteKey_Call) Return

func (*MockDB_DeleteKey_Call) Run

func (_c *MockDB_DeleteKey_Call) Run(run func(ctx context.Context, keyID string)) *MockDB_DeleteKey_Call

func (*MockDB_DeleteKey_Call) RunAndReturn

func (_c *MockDB_DeleteKey_Call) RunAndReturn(run func(ctx context.Context, keyID string) error) *MockDB_DeleteKey_Call

type MockDB_DeleteUser_Call

type MockDB_DeleteUser_Call struct {
	*mock.Call
}

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

func (*MockDB_DeleteUser_Call) Return

func (*MockDB_DeleteUser_Call) Run

func (_c *MockDB_DeleteUser_Call) Run(run func(ctx context.Context, userId string)) *MockDB_DeleteUser_Call

func (*MockDB_DeleteUser_Call) RunAndReturn

func (_c *MockDB_DeleteUser_Call) RunAndReturn(run func(ctx context.Context, userId string) error) *MockDB_DeleteUser_Call

type MockDB_Expecter

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

func (*MockDB_Expecter) Close

func (_e *MockDB_Expecter) Close() *MockDB_Close_Call

Close is a helper method to define mock.On call

func (*MockDB_Expecter) CreateUser

func (_e *MockDB_Expecter) CreateUser(ctx interface{}, user1 interface{}) *MockDB_CreateUser_Call

CreateUser is a helper method to define mock.On call

  • ctx context.Context
  • user1 *user.User

func (*MockDB_Expecter) DeleteKey

func (_e *MockDB_Expecter) DeleteKey(ctx interface{}, keyID interface{}) *MockDB_DeleteKey_Call

DeleteKey is a helper method to define mock.On call

  • ctx context.Context
  • keyID string

func (*MockDB_Expecter) DeleteUser

func (_e *MockDB_Expecter) DeleteUser(ctx interface{}, userId interface{}) *MockDB_DeleteUser_Call

DeleteUser is a helper method to define mock.On call

  • ctx context.Context
  • userId string

func (*MockDB_Expecter) FindKeyById

func (_e *MockDB_Expecter) FindKeyById(ctx interface{}, keyID interface{}) *MockDB_FindKeyById_Call

FindKeyById is a helper method to define mock.On call

  • ctx context.Context
  • keyID string

func (*MockDB_Expecter) FindUserByCredentialInfo

func (_e *MockDB_Expecter) FindUserByCredentialInfo(ctx interface{}, rid interface{}, handle interface{}) *MockDB_FindUserByCredentialInfo_Call

FindUserByCredentialInfo is a helper method to define mock.On call

  • ctx context.Context
  • rid []byte
  • handle []byte

func (*MockDB_Expecter) GetAllUsers

func (_e *MockDB_Expecter) GetAllUsers(ctx interface{}) *MockDB_GetAllUsers_Call

GetAllUsers is a helper method to define mock.On call

  • ctx context.Context

func (*MockDB_Expecter) GetUserByGuid

func (_e *MockDB_Expecter) GetUserByGuid(ctx interface{}, guid interface{}) *MockDB_GetUserByGuid_Call

GetUserByGuid is a helper method to define mock.On call

  • ctx context.Context
  • guid string

func (*MockDB_Expecter) GetUserByUsername

func (_e *MockDB_Expecter) GetUserByUsername(ctx interface{}, username interface{}) *MockDB_GetUserByUsername_Call

GetUserByUsername is a helper method to define mock.On call

  • ctx context.Context
  • username string

func (*MockDB_Expecter) NeedsSetup

func (_e *MockDB_Expecter) NeedsSetup(ctx interface{}) *MockDB_NeedsSetup_Call

NeedsSetup is a helper method to define mock.On call

  • ctx context.Context

func (*MockDB_Expecter) SaveCredentialForUser

func (_e *MockDB_Expecter) SaveCredentialForUser(ctx interface{}, userId interface{}, credential interface{}) *MockDB_SaveCredentialForUser_Call

SaveCredentialForUser is a helper method to define mock.On call

  • ctx context.Context
  • userId string
  • credential *webauthn.Credential

func (*MockDB_Expecter) SaveUser

func (_e *MockDB_Expecter) SaveUser(ctx interface{}, user1 interface{}) *MockDB_SaveUser_Call

SaveUser is a helper method to define mock.On call

  • ctx context.Context
  • user1 *user.User

func (*MockDB_Expecter) SetUserEnabled

func (_e *MockDB_Expecter) SetUserEnabled(ctx interface{}, userId interface{}, enabled interface{}) *MockDB_SetUserEnabled_Call

SetUserEnabled is a helper method to define mock.On call

  • ctx context.Context
  • userId string
  • enabled bool

func (*MockDB_Expecter) UpdateCredentialOnLogin

func (_e *MockDB_Expecter) UpdateCredentialOnLogin(ctx interface{}, credential interface{}) *MockDB_UpdateCredentialOnLogin_Call

UpdateCredentialOnLogin is a helper method to define mock.On call

  • ctx context.Context
  • credential *webauthn.Credential

func (*MockDB_Expecter) UpdateKeyName

func (_e *MockDB_Expecter) UpdateKeyName(ctx interface{}, keyID interface{}, name interface{}) *MockDB_UpdateKeyName_Call

UpdateKeyName is a helper method to define mock.On call

  • ctx context.Context
  • keyID string
  • name *string

func (*MockDB_Expecter) UpdatePassword

func (_e *MockDB_Expecter) UpdatePassword(ctx interface{}, user1 interface{}) *MockDB_UpdatePassword_Call

UpdatePassword is a helper method to define mock.On call

  • ctx context.Context
  • user1 *user.User

func (*MockDB_Expecter) UpdateTOTPSeed

func (_e *MockDB_Expecter) UpdateTOTPSeed(ctx interface{}, userID interface{}, secret interface{}) *MockDB_UpdateTOTPSeed_Call

UpdateTOTPSeed is a helper method to define mock.On call

  • ctx context.Context
  • userID string
  • secret string

type MockDB_FindKeyById_Call

type MockDB_FindKeyById_Call struct {
	*mock.Call
}

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

func (*MockDB_FindKeyById_Call) Return

func (*MockDB_FindKeyById_Call) Run

func (_c *MockDB_FindKeyById_Call) Run(run func(ctx context.Context, keyID string)) *MockDB_FindKeyById_Call

func (*MockDB_FindKeyById_Call) RunAndReturn

func (_c *MockDB_FindKeyById_Call) RunAndReturn(run func(ctx context.Context, keyID string) (user.Passkey, error)) *MockDB_FindKeyById_Call

type MockDB_FindUserByCredentialInfo_Call

type MockDB_FindUserByCredentialInfo_Call struct {
	*mock.Call
}

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

func (*MockDB_FindUserByCredentialInfo_Call) Return

func (*MockDB_FindUserByCredentialInfo_Call) Run

func (*MockDB_FindUserByCredentialInfo_Call) RunAndReturn

type MockDB_GetAllUsers_Call

type MockDB_GetAllUsers_Call struct {
	*mock.Call
}

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

func (*MockDB_GetAllUsers_Call) Return

func (_c *MockDB_GetAllUsers_Call) Return(adminListUsers []*user.AdminListUser, err error) *MockDB_GetAllUsers_Call

func (*MockDB_GetAllUsers_Call) Run

func (*MockDB_GetAllUsers_Call) RunAndReturn

type MockDB_GetUserByGuid_Call

type MockDB_GetUserByGuid_Call struct {
	*mock.Call
}

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

func (*MockDB_GetUserByGuid_Call) Return

func (*MockDB_GetUserByGuid_Call) Run

func (*MockDB_GetUserByGuid_Call) RunAndReturn

func (_c *MockDB_GetUserByGuid_Call) RunAndReturn(run func(ctx context.Context, guid string) (*user.User, error)) *MockDB_GetUserByGuid_Call

type MockDB_GetUserByUsername_Call

type MockDB_GetUserByUsername_Call struct {
	*mock.Call
}

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

func (*MockDB_GetUserByUsername_Call) Return

func (*MockDB_GetUserByUsername_Call) Run

func (*MockDB_GetUserByUsername_Call) RunAndReturn

func (_c *MockDB_GetUserByUsername_Call) RunAndReturn(run func(ctx context.Context, username string) (*user.User, error)) *MockDB_GetUserByUsername_Call

type MockDB_NeedsSetup_Call

type MockDB_NeedsSetup_Call struct {
	*mock.Call
}

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

func (*MockDB_NeedsSetup_Call) Return

func (*MockDB_NeedsSetup_Call) Run

func (*MockDB_NeedsSetup_Call) RunAndReturn

func (_c *MockDB_NeedsSetup_Call) RunAndReturn(run func(ctx context.Context) (bool, error)) *MockDB_NeedsSetup_Call

type MockDB_SaveCredentialForUser_Call

type MockDB_SaveCredentialForUser_Call struct {
	*mock.Call
}

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

func (*MockDB_SaveCredentialForUser_Call) Return

func (*MockDB_SaveCredentialForUser_Call) Run

func (*MockDB_SaveCredentialForUser_Call) RunAndReturn

type MockDB_SaveUser_Call

type MockDB_SaveUser_Call struct {
	*mock.Call
}

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

func (*MockDB_SaveUser_Call) Return

func (*MockDB_SaveUser_Call) Run

func (_c *MockDB_SaveUser_Call) Run(run func(ctx context.Context, user1 *user.User)) *MockDB_SaveUser_Call

func (*MockDB_SaveUser_Call) RunAndReturn

func (_c *MockDB_SaveUser_Call) RunAndReturn(run func(ctx context.Context, user1 *user.User) error) *MockDB_SaveUser_Call

type MockDB_SetUserEnabled_Call

type MockDB_SetUserEnabled_Call struct {
	*mock.Call
}

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

func (*MockDB_SetUserEnabled_Call) Return

func (*MockDB_SetUserEnabled_Call) Run

func (_c *MockDB_SetUserEnabled_Call) Run(run func(ctx context.Context, userId string, enabled bool)) *MockDB_SetUserEnabled_Call

func (*MockDB_SetUserEnabled_Call) RunAndReturn

func (_c *MockDB_SetUserEnabled_Call) RunAndReturn(run func(ctx context.Context, userId string, enabled bool) error) *MockDB_SetUserEnabled_Call

type MockDB_UpdateCredentialOnLogin_Call

type MockDB_UpdateCredentialOnLogin_Call struct {
	*mock.Call
}

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

func (*MockDB_UpdateCredentialOnLogin_Call) Return

func (*MockDB_UpdateCredentialOnLogin_Call) Run

func (*MockDB_UpdateCredentialOnLogin_Call) RunAndReturn

type MockDB_UpdateKeyName_Call

type MockDB_UpdateKeyName_Call struct {
	*mock.Call
}

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

func (*MockDB_UpdateKeyName_Call) Return

func (*MockDB_UpdateKeyName_Call) Run

func (_c *MockDB_UpdateKeyName_Call) Run(run func(ctx context.Context, keyID string, name *string)) *MockDB_UpdateKeyName_Call

func (*MockDB_UpdateKeyName_Call) RunAndReturn

func (_c *MockDB_UpdateKeyName_Call) RunAndReturn(run func(ctx context.Context, keyID string, name *string) error) *MockDB_UpdateKeyName_Call

type MockDB_UpdatePassword_Call

type MockDB_UpdatePassword_Call struct {
	*mock.Call
}

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

func (*MockDB_UpdatePassword_Call) Return

func (*MockDB_UpdatePassword_Call) Run

func (*MockDB_UpdatePassword_Call) RunAndReturn

func (_c *MockDB_UpdatePassword_Call) RunAndReturn(run func(ctx context.Context, user1 *user.User) error) *MockDB_UpdatePassword_Call

type MockDB_UpdateTOTPSeed_Call

type MockDB_UpdateTOTPSeed_Call struct {
	*mock.Call
}

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

func (*MockDB_UpdateTOTPSeed_Call) Return

func (*MockDB_UpdateTOTPSeed_Call) Run

func (_c *MockDB_UpdateTOTPSeed_Call) Run(run func(ctx context.Context, userID string, secret string)) *MockDB_UpdateTOTPSeed_Call

func (*MockDB_UpdateTOTPSeed_Call) RunAndReturn

func (_c *MockDB_UpdateTOTPSeed_Call) RunAndReturn(run func(ctx context.Context, userID string, secret string) error) *MockDB_UpdateTOTPSeed_Call

type MockDockerAPI

type MockDockerAPI struct {
	mock.Mock
}

MockDockerAPI is an autogenerated mock type for the dockerAPI type

func NewMockDockerAPI

func NewMockDockerAPI(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockDockerAPI

NewMockDockerAPI creates a new instance of MockDockerAPI. 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 (*MockDockerAPI) ClientVersion

func (_mock *MockDockerAPI) ClientVersion() string

ClientVersion provides a mock function for the type MockDockerAPI

func (*MockDockerAPI) Close

func (_mock *MockDockerAPI) Close() error

Close provides a mock function for the type MockDockerAPI

func (*MockDockerAPI) ContainerInspect

func (_mock *MockDockerAPI) ContainerInspect(ctx context.Context, containerID string) (container.InspectResponse, error)

ContainerInspect provides a mock function for the type MockDockerAPI

func (*MockDockerAPI) ContainerList

func (_mock *MockDockerAPI) ContainerList(ctx context.Context, options container.ListOptions) ([]container.Summary, error)

ContainerList provides a mock function for the type MockDockerAPI

func (*MockDockerAPI) DaemonHost

func (_mock *MockDockerAPI) DaemonHost() string

DaemonHost provides a mock function for the type MockDockerAPI

func (*MockDockerAPI) EXPECT

func (_m *MockDockerAPI) EXPECT() *MockDockerAPI_Expecter

func (*MockDockerAPI) Events

func (_mock *MockDockerAPI) Events(ctx context.Context, options events.ListOptions) (<-chan events.Message, <-chan error)

Events provides a mock function for the type MockDockerAPI

type MockDockerAPI_ClientVersion_Call

type MockDockerAPI_ClientVersion_Call struct {
	*mock.Call
}

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

func (*MockDockerAPI_ClientVersion_Call) Return

func (*MockDockerAPI_ClientVersion_Call) Run

func (*MockDockerAPI_ClientVersion_Call) RunAndReturn

type MockDockerAPI_Close_Call

type MockDockerAPI_Close_Call struct {
	*mock.Call
}

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

func (*MockDockerAPI_Close_Call) Return

func (*MockDockerAPI_Close_Call) Run

func (*MockDockerAPI_Close_Call) RunAndReturn

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

type MockDockerAPI_ContainerInspect_Call

type MockDockerAPI_ContainerInspect_Call struct {
	*mock.Call
}

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

func (*MockDockerAPI_ContainerInspect_Call) Return

func (*MockDockerAPI_ContainerInspect_Call) Run

func (*MockDockerAPI_ContainerInspect_Call) RunAndReturn

type MockDockerAPI_ContainerList_Call

type MockDockerAPI_ContainerList_Call struct {
	*mock.Call
}

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

func (*MockDockerAPI_ContainerList_Call) Return

func (*MockDockerAPI_ContainerList_Call) Run

func (*MockDockerAPI_ContainerList_Call) RunAndReturn

type MockDockerAPI_DaemonHost_Call

type MockDockerAPI_DaemonHost_Call struct {
	*mock.Call
}

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

func (*MockDockerAPI_DaemonHost_Call) Return

func (*MockDockerAPI_DaemonHost_Call) Run

func (*MockDockerAPI_DaemonHost_Call) RunAndReturn

type MockDockerAPI_Events_Call

type MockDockerAPI_Events_Call struct {
	*mock.Call
}

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

func (*MockDockerAPI_Events_Call) Return

func (_c *MockDockerAPI_Events_Call) Return(messageCh <-chan events.Message, errCh <-chan error) *MockDockerAPI_Events_Call

func (*MockDockerAPI_Events_Call) Run

func (*MockDockerAPI_Events_Call) RunAndReturn

func (_c *MockDockerAPI_Events_Call) RunAndReturn(run func(ctx context.Context, options events.ListOptions) (<-chan events.Message, <-chan error)) *MockDockerAPI_Events_Call

type MockDockerAPI_Expecter

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

func (*MockDockerAPI_Expecter) ClientVersion

ClientVersion is a helper method to define mock.On call

func (*MockDockerAPI_Expecter) Close

Close is a helper method to define mock.On call

func (*MockDockerAPI_Expecter) ContainerInspect

func (_e *MockDockerAPI_Expecter) ContainerInspect(ctx interface{}, containerID interface{}) *MockDockerAPI_ContainerInspect_Call

ContainerInspect is a helper method to define mock.On call

  • ctx context.Context
  • containerID string

func (*MockDockerAPI_Expecter) ContainerList

func (_e *MockDockerAPI_Expecter) ContainerList(ctx interface{}, options interface{}) *MockDockerAPI_ContainerList_Call

ContainerList is a helper method to define mock.On call

  • ctx context.Context
  • options container.ListOptions

func (*MockDockerAPI_Expecter) DaemonHost

DaemonHost is a helper method to define mock.On call

func (*MockDockerAPI_Expecter) Events

func (_e *MockDockerAPI_Expecter) Events(ctx interface{}, options interface{}) *MockDockerAPI_Events_Call

Events is a helper method to define mock.On call

  • ctx context.Context
  • options events.ListOptions

type MockLoginLimiter

type MockLoginLimiter struct {
	mock.Mock
}

MockLoginLimiter is an autogenerated mock type for the LoginLimiter type

func NewMockLoginLimiter

func NewMockLoginLimiter(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockLoginLimiter

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

func (*MockLoginLimiter) IsAccountLocked

func (_mock *MockLoginLimiter) IsAccountLocked(key string) bool

IsAccountLocked provides a mock function for the type MockLoginLimiter

func (*MockLoginLimiter) MarkFailedAttempt

func (_mock *MockLoginLimiter) MarkFailedAttempt(key string) (int, error)

MarkFailedAttempt provides a mock function for the type MockLoginLimiter

func (*MockLoginLimiter) MarkSuccessfulAttempt

func (_mock *MockLoginLimiter) MarkSuccessfulAttempt(key string)

MarkSuccessfulAttempt provides a mock function for the type MockLoginLimiter

type MockLoginLimiter_Expecter

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

func (*MockLoginLimiter_Expecter) IsAccountLocked

func (_e *MockLoginLimiter_Expecter) IsAccountLocked(key interface{}) *MockLoginLimiter_IsAccountLocked_Call

IsAccountLocked is a helper method to define mock.On call

  • key string

func (*MockLoginLimiter_Expecter) MarkFailedAttempt

func (_e *MockLoginLimiter_Expecter) MarkFailedAttempt(key interface{}) *MockLoginLimiter_MarkFailedAttempt_Call

MarkFailedAttempt is a helper method to define mock.On call

  • key string

func (*MockLoginLimiter_Expecter) MarkSuccessfulAttempt

func (_e *MockLoginLimiter_Expecter) MarkSuccessfulAttempt(key interface{}) *MockLoginLimiter_MarkSuccessfulAttempt_Call

MarkSuccessfulAttempt is a helper method to define mock.On call

  • key string

type MockLoginLimiter_IsAccountLocked_Call

type MockLoginLimiter_IsAccountLocked_Call struct {
	*mock.Call
}

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

func (*MockLoginLimiter_IsAccountLocked_Call) Return

func (*MockLoginLimiter_IsAccountLocked_Call) Run

func (*MockLoginLimiter_IsAccountLocked_Call) RunAndReturn

type MockLoginLimiter_MarkFailedAttempt_Call

type MockLoginLimiter_MarkFailedAttempt_Call struct {
	*mock.Call
}

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

func (*MockLoginLimiter_MarkFailedAttempt_Call) Return

func (*MockLoginLimiter_MarkFailedAttempt_Call) Run

func (*MockLoginLimiter_MarkFailedAttempt_Call) RunAndReturn

type MockLoginLimiter_MarkSuccessfulAttempt_Call

type MockLoginLimiter_MarkSuccessfulAttempt_Call struct {
	*mock.Call
}

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

func (*MockLoginLimiter_MarkSuccessfulAttempt_Call) Return

func (*MockLoginLimiter_MarkSuccessfulAttempt_Call) Run

func (*MockLoginLimiter_MarkSuccessfulAttempt_Call) RunAndReturn

type MockPasswordValidator added in v0.0.6

type MockPasswordValidator struct {
	mock.Mock
}

MockPasswordValidator is an autogenerated mock type for the PasswordValidator type

func NewMockPasswordValidator added in v0.0.6

func NewMockPasswordValidator(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockPasswordValidator

NewMockPasswordValidator creates a new instance of MockPasswordValidator. 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 (*MockPasswordValidator) EXPECT added in v0.0.6

func (*MockPasswordValidator) Validate added in v0.0.6

func (_mock *MockPasswordValidator) Validate(ctx context.Context, username string, password string, sourceIP string) (*user.User, error)

Validate provides a mock function for the type MockPasswordValidator

type MockPasswordValidator_Expecter added in v0.0.6

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

func (*MockPasswordValidator_Expecter) Validate added in v0.0.6

func (_e *MockPasswordValidator_Expecter) Validate(ctx interface{}, username interface{}, password interface{}, sourceIP interface{}) *MockPasswordValidator_Validate_Call

Validate is a helper method to define mock.On call

  • ctx context.Context
  • username string
  • password string
  • sourceIP string

type MockPasswordValidator_Validate_Call added in v0.0.6

type MockPasswordValidator_Validate_Call struct {
	*mock.Call
}

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

func (*MockPasswordValidator_Validate_Call) Return added in v0.0.6

func (*MockPasswordValidator_Validate_Call) Run added in v0.0.6

func (_c *MockPasswordValidator_Validate_Call) Run(run func(ctx context.Context, username string, password string, sourceIP string)) *MockPasswordValidator_Validate_Call

func (*MockPasswordValidator_Validate_Call) RunAndReturn added in v0.0.6

func (_c *MockPasswordValidator_Validate_Call) RunAndReturn(run func(ctx context.Context, username string, password string, sourceIP string) (*user.User, error)) *MockPasswordValidator_Validate_Call

Jump to

Keyboard shortcuts

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