mocks_repository_oauth

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2025 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OauthRepositoryMock

type OauthRepositoryMock struct {
	mock.Mock
}

OauthRepositoryMock is an autogenerated mock type for the OauthRepositoryInterface type

func NewOauthRepositoryMock

func NewOauthRepositoryMock(t interface {
	mock.TestingT
	Cleanup(func())
}) *OauthRepositoryMock

NewOauthRepositoryMock creates a new instance of OauthRepositoryMock. 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 (*OauthRepositoryMock) CleanTokenStore

func (_m *OauthRepositoryMock) CleanTokenStore(ctx context.Context) error

CleanTokenStore provides a mock function with given fields: ctx

func (*OauthRepositoryMock) CreateAuthCode

func (_m *OauthRepositoryMock) CreateAuthCode(ctx context.Context, code string, clientID string, scope string, user *ent.User, expiresAt time.Time) (*ent.Oauth2Code, error)

CreateAuthCode provides a mock function with given fields: ctx, code, clientID, scope, user, expiresAt

func (*OauthRepositoryMock) CreateToken

func (_m *OauthRepositoryMock) CreateToken(ctx context.Context, accessToken string, refreshToken string, clientID string, scope string, expiresAt time.Time, user *ent.User) (*ent.Oauth2Token, error)

CreateToken provides a mock function with given fields: ctx, accessToken, refreshToken, clientID, scope, expiresAt, user

func (*OauthRepositoryMock) DeleteAuthCode

func (_m *OauthRepositoryMock) DeleteAuthCode(ctx context.Context, code string) error

DeleteAuthCode provides a mock function with given fields: ctx, code

func (*OauthRepositoryMock) EXPECT

func (*OauthRepositoryMock) GetAuthCode

func (_m *OauthRepositoryMock) GetAuthCode(ctx context.Context, code string) (*ent.Oauth2Code, error)

GetAuthCode provides a mock function with given fields: ctx, code

func (*OauthRepositoryMock) GetByAccessToken

func (_m *OauthRepositoryMock) GetByAccessToken(ctx context.Context, accessToken string) (*ent.Oauth2Token, error)

GetByAccessToken provides a mock function with given fields: ctx, accessToken

func (*OauthRepositoryMock) GetByRefreshToken

func (_m *OauthRepositoryMock) GetByRefreshToken(ctx context.Context, refreshToken string) (*ent.Oauth2Token, error)

GetByRefreshToken provides a mock function with given fields: ctx, refreshToken

func (*OauthRepositoryMock) GetOrGenerateJWTPrivateKey

func (_m *OauthRepositoryMock) GetOrGenerateJWTPrivateKey(ctx context.Context) (*rsa.PrivateKey, []byte, error)

GetOrGenerateJWTPrivateKey provides a mock function with given fields: ctx

func (*OauthRepositoryMock) RevokeAccessToken

func (_m *OauthRepositoryMock) RevokeAccessToken(ctx context.Context, accessToken string) error

RevokeAccessToken provides a mock function with given fields: ctx, accessToken

func (*OauthRepositoryMock) RevokeRefreshToken

func (_m *OauthRepositoryMock) RevokeRefreshToken(ctx context.Context, refreshToken string) error

RevokeRefreshToken provides a mock function with given fields: ctx, refreshToken

type OauthRepositoryMock_CleanTokenStore_Call

type OauthRepositoryMock_CleanTokenStore_Call struct {
	*mock.Call
}

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

func (*OauthRepositoryMock_CleanTokenStore_Call) Return

func (*OauthRepositoryMock_CleanTokenStore_Call) Run

func (*OauthRepositoryMock_CleanTokenStore_Call) RunAndReturn

type OauthRepositoryMock_CreateAuthCode_Call

type OauthRepositoryMock_CreateAuthCode_Call struct {
	*mock.Call
}

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

func (*OauthRepositoryMock_CreateAuthCode_Call) Return

func (*OauthRepositoryMock_CreateAuthCode_Call) Run

func (_c *OauthRepositoryMock_CreateAuthCode_Call) Run(run func(ctx context.Context, code string, clientID string, scope string, user *ent.User, expiresAt time.Time)) *OauthRepositoryMock_CreateAuthCode_Call

func (*OauthRepositoryMock_CreateAuthCode_Call) RunAndReturn

type OauthRepositoryMock_CreateToken_Call

type OauthRepositoryMock_CreateToken_Call struct {
	*mock.Call
}

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

func (*OauthRepositoryMock_CreateToken_Call) Return

func (*OauthRepositoryMock_CreateToken_Call) Run

func (_c *OauthRepositoryMock_CreateToken_Call) Run(run func(ctx context.Context, accessToken string, refreshToken string, clientID string, scope string, expiresAt time.Time, user *ent.User)) *OauthRepositoryMock_CreateToken_Call

func (*OauthRepositoryMock_CreateToken_Call) RunAndReturn

type OauthRepositoryMock_DeleteAuthCode_Call

type OauthRepositoryMock_DeleteAuthCode_Call struct {
	*mock.Call
}

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

func (*OauthRepositoryMock_DeleteAuthCode_Call) Return

func (*OauthRepositoryMock_DeleteAuthCode_Call) Run

func (*OauthRepositoryMock_DeleteAuthCode_Call) RunAndReturn

type OauthRepositoryMock_Expecter

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

func (*OauthRepositoryMock_Expecter) CleanTokenStore

func (_e *OauthRepositoryMock_Expecter) CleanTokenStore(ctx interface{}) *OauthRepositoryMock_CleanTokenStore_Call

CleanTokenStore is a helper method to define mock.On call

  • ctx context.Context

func (*OauthRepositoryMock_Expecter) CreateAuthCode

func (_e *OauthRepositoryMock_Expecter) CreateAuthCode(ctx interface{}, code interface{}, clientID interface{}, scope interface{}, user interface{}, expiresAt interface{}) *OauthRepositoryMock_CreateAuthCode_Call

CreateAuthCode is a helper method to define mock.On call

  • ctx context.Context
  • code string
  • clientID string
  • scope string
  • user *ent.User
  • expiresAt time.Time

func (*OauthRepositoryMock_Expecter) CreateToken

func (_e *OauthRepositoryMock_Expecter) CreateToken(ctx interface{}, accessToken interface{}, refreshToken interface{}, clientID interface{}, scope interface{}, expiresAt interface{}, user interface{}) *OauthRepositoryMock_CreateToken_Call

CreateToken is a helper method to define mock.On call

  • ctx context.Context
  • accessToken string
  • refreshToken string
  • clientID string
  • scope string
  • expiresAt time.Time
  • user *ent.User

func (*OauthRepositoryMock_Expecter) DeleteAuthCode

func (_e *OauthRepositoryMock_Expecter) DeleteAuthCode(ctx interface{}, code interface{}) *OauthRepositoryMock_DeleteAuthCode_Call

DeleteAuthCode is a helper method to define mock.On call

  • ctx context.Context
  • code string

func (*OauthRepositoryMock_Expecter) GetAuthCode

func (_e *OauthRepositoryMock_Expecter) GetAuthCode(ctx interface{}, code interface{}) *OauthRepositoryMock_GetAuthCode_Call

GetAuthCode is a helper method to define mock.On call

  • ctx context.Context
  • code string

func (*OauthRepositoryMock_Expecter) GetByAccessToken

func (_e *OauthRepositoryMock_Expecter) GetByAccessToken(ctx interface{}, accessToken interface{}) *OauthRepositoryMock_GetByAccessToken_Call

GetByAccessToken is a helper method to define mock.On call

  • ctx context.Context
  • accessToken string

func (*OauthRepositoryMock_Expecter) GetByRefreshToken

func (_e *OauthRepositoryMock_Expecter) GetByRefreshToken(ctx interface{}, refreshToken interface{}) *OauthRepositoryMock_GetByRefreshToken_Call

GetByRefreshToken is a helper method to define mock.On call

  • ctx context.Context
  • refreshToken string

func (*OauthRepositoryMock_Expecter) GetOrGenerateJWTPrivateKey

func (_e *OauthRepositoryMock_Expecter) GetOrGenerateJWTPrivateKey(ctx interface{}) *OauthRepositoryMock_GetOrGenerateJWTPrivateKey_Call

GetOrGenerateJWTPrivateKey is a helper method to define mock.On call

  • ctx context.Context

func (*OauthRepositoryMock_Expecter) RevokeAccessToken

func (_e *OauthRepositoryMock_Expecter) RevokeAccessToken(ctx interface{}, accessToken interface{}) *OauthRepositoryMock_RevokeAccessToken_Call

RevokeAccessToken is a helper method to define mock.On call

  • ctx context.Context
  • accessToken string

func (*OauthRepositoryMock_Expecter) RevokeRefreshToken

func (_e *OauthRepositoryMock_Expecter) RevokeRefreshToken(ctx interface{}, refreshToken interface{}) *OauthRepositoryMock_RevokeRefreshToken_Call

RevokeRefreshToken is a helper method to define mock.On call

  • ctx context.Context
  • refreshToken string

type OauthRepositoryMock_GetAuthCode_Call

type OauthRepositoryMock_GetAuthCode_Call struct {
	*mock.Call
}

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

func (*OauthRepositoryMock_GetAuthCode_Call) Return

func (*OauthRepositoryMock_GetAuthCode_Call) Run

func (*OauthRepositoryMock_GetAuthCode_Call) RunAndReturn

type OauthRepositoryMock_GetByAccessToken_Call

type OauthRepositoryMock_GetByAccessToken_Call struct {
	*mock.Call
}

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

func (*OauthRepositoryMock_GetByAccessToken_Call) Return

func (*OauthRepositoryMock_GetByAccessToken_Call) Run

func (*OauthRepositoryMock_GetByAccessToken_Call) RunAndReturn

type OauthRepositoryMock_GetByRefreshToken_Call

type OauthRepositoryMock_GetByRefreshToken_Call struct {
	*mock.Call
}

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

func (*OauthRepositoryMock_GetByRefreshToken_Call) Return

func (*OauthRepositoryMock_GetByRefreshToken_Call) Run

func (*OauthRepositoryMock_GetByRefreshToken_Call) RunAndReturn

type OauthRepositoryMock_GetOrGenerateJWTPrivateKey_Call

type OauthRepositoryMock_GetOrGenerateJWTPrivateKey_Call struct {
	*mock.Call
}

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

func (*OauthRepositoryMock_GetOrGenerateJWTPrivateKey_Call) Return

func (*OauthRepositoryMock_GetOrGenerateJWTPrivateKey_Call) Run

func (*OauthRepositoryMock_GetOrGenerateJWTPrivateKey_Call) RunAndReturn

type OauthRepositoryMock_RevokeAccessToken_Call

type OauthRepositoryMock_RevokeAccessToken_Call struct {
	*mock.Call
}

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

func (*OauthRepositoryMock_RevokeAccessToken_Call) Return

func (*OauthRepositoryMock_RevokeAccessToken_Call) Run

func (*OauthRepositoryMock_RevokeAccessToken_Call) RunAndReturn

type OauthRepositoryMock_RevokeRefreshToken_Call

type OauthRepositoryMock_RevokeRefreshToken_Call struct {
	*mock.Call
}

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

func (*OauthRepositoryMock_RevokeRefreshToken_Call) Return

func (*OauthRepositoryMock_RevokeRefreshToken_Call) Run

func (*OauthRepositoryMock_RevokeRefreshToken_Call) RunAndReturn

Jump to

Keyboard shortcuts

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