mock

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OauthUseCaseMock

type OauthUseCaseMock struct {
	MockCreateOauthClientFn      func(ctx context.Context, input dto.OauthClientInput) (*domain.OauthClient, error)
	MockFositeProviderFn         func() fosite.OAuth2Provider
	MockGenerateUserAuthTokensFn func(ctx context.Context, userID string) (*oauth.AuthTokens, error)
	MockRefreshAutTokenFn        func(ctx context.Context, refreshToken string) (*oauth.AuthTokens, error)
}

OauthUseCaseMock mocks the implementation of oauth usecase

func NewOauthUseCaseMock

func NewOauthUseCaseMock() *OauthUseCaseMock

NewOauthUseCaseMock initializes a new instance mock of the oauth usecase

func (*OauthUseCaseMock) CreateOauthClient

func (u *OauthUseCaseMock) CreateOauthClient(ctx context.Context, input dto.OauthClientInput) (*domain.OauthClient, error)

CreateOauthClient is the resolver for the createOauthClient field.

func (*OauthUseCaseMock) FositeProvider

func (u *OauthUseCaseMock) FositeProvider() fosite.OAuth2Provider

func (*OauthUseCaseMock) GenerateUserAuthTokens

func (u *OauthUseCaseMock) GenerateUserAuthTokens(ctx context.Context, userID string) (*oauth.AuthTokens, error)

func (*OauthUseCaseMock) RefreshAuthToken

func (u *OauthUseCaseMock) RefreshAuthToken(ctx context.Context, refreshToken string) (*oauth.AuthTokens, error)

RefreshAuthToken mocks the implementation of RefreshAuthToken method

Jump to

Keyboard shortcuts

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