repository

package
v0.0.0-...-ee0ddec Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package repository is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IRepository

type IRepository interface {
	CreateTransaction(ctx context.Context, transaction *entity.Transaction) (*entity.Transaction, error)
	GetAccountByID(ctx context.Context, accountID string) (*entity.Account, error)
	CreateAccount(ctx context.Context, account *entity.Account) (*entity.Account, error)
}

type MockIRepository

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

MockIRepository is a mock of IRepository interface.

func NewMockIRepository

func NewMockIRepository(ctrl *gomock.Controller) *MockIRepository

NewMockIRepository creates a new mock instance.

func (*MockIRepository) CreateAccount

func (m *MockIRepository) CreateAccount(ctx context.Context, account *entity.Account) (*entity.Account, error)

CreateAccount mocks base method.

func (*MockIRepository) CreateTransaction

func (m *MockIRepository) CreateTransaction(ctx context.Context, transaction *entity.Transaction) (*entity.Transaction, error)

CreateTransaction mocks base method.

func (*MockIRepository) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockIRepository) GetAccountByID

func (m *MockIRepository) GetAccountByID(ctx context.Context, accountID string) (*entity.Account, error)

GetAccountByID mocks base method.

type MockIRepositoryMockRecorder

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

MockIRepositoryMockRecorder is the mock recorder for MockIRepository.

func (*MockIRepositoryMockRecorder) CreateAccount

func (mr *MockIRepositoryMockRecorder) CreateAccount(ctx, account any) *gomock.Call

CreateAccount indicates an expected call of CreateAccount.

func (*MockIRepositoryMockRecorder) CreateTransaction

func (mr *MockIRepositoryMockRecorder) CreateTransaction(ctx, transaction any) *gomock.Call

CreateTransaction indicates an expected call of CreateTransaction.

func (*MockIRepositoryMockRecorder) GetAccountByID

func (mr *MockIRepositoryMockRecorder) GetAccountByID(ctx, accountID any) *gomock.Call

GetAccountByID indicates an expected call of GetAccountByID.

type Repository

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

func New

func New(db *sqlx.DB, timeoutInMs int) *Repository

func (*Repository) CreateAccount

func (r *Repository) CreateAccount(ctx context.Context, account *entity.Account) (*entity.Account, error)

func (*Repository) CreateTransaction

func (r *Repository) CreateTransaction(ctx context.Context, txn *entity.Transaction) (*entity.Transaction, error)

func (*Repository) GetAccountByID

func (r *Repository) GetAccountByID(ctx context.Context, accountID string) (*entity.Account, error)

Jump to

Keyboard shortcuts

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