mock

package
v0.0.0-...-c53624e Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountUseCase

type AccountUseCase struct {
	OnCreate     func(ctx context.Context, accountInput usecase.AccountCreateInput) (*usecase.AccountCreateOutput, error)
	OnFetch      func(ctx context.Context) ([]usecase.AccountFetchOutput, error)
	OnGetBalance func(ctx context.Context, id model.AccountID) (*usecase.AccountBalanceOutput, error)
}

AccountUseCase mocks an usecase.AccountUseCase.

func (AccountUseCase) Create

Create returns the result of OnCreate.

func (AccountUseCase) Fetch

Fetch returns the result of OnFetch.

func (AccountUseCase) GetBalance

GetBalance returns the result of OnGetBalance.

type AuthUseCase

type AuthUseCase struct {
	OnLogin     func(ctx context.Context, loginInput usecase.AuthLoginInput) (*usecase.AuthTokenOutput, error)
	OnAuthorize func(ctx context.Context, accessToken string) (*jwt.RegisteredClaims, error)
}

AuthUseCase mocks an usecase.AuthUseCase.

func (AuthUseCase) Authorize

func (mAuthUC AuthUseCase) Authorize(ctx context.Context, accessToken string) (*jwt.RegisteredClaims, error)

Authorize executes Authorize.

func (AuthUseCase) Login

func (mAuthUC AuthUseCase) Login(ctx context.Context, loginInput usecase.AuthLoginInput) (*usecase.AuthTokenOutput, error)

Login executes OnLogin.

type TransferUseCase

type TransferUseCase struct {
	OnCreate func(ctx context.Context, transferInput usecase.TransferCreateInput) (*usecase.TransferCreateOutput, error)
	OnFetch  func(ctx context.Context, accountID model.AccountID) ([]usecase.TransferFetchOutput, error)
}

TransferUseCase mocks an usecase.TransferUseCase.

func (TransferUseCase) Create

Create returns the result of OnCreate.

func (TransferUseCase) Fetch

func (mTrfUC TransferUseCase) Fetch(ctx context.Context, accountID model.AccountID) ([]usecase.TransferFetchOutput, error)

Fetch returns the result of OnFetch.

Jump to

Keyboard shortcuts

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