user

package
v0.0.0-...-b2f9ab3 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package user is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMysqlRepo

func NewMysqlRepo(dsn string) (*mysqlRepo, error)

Types

type MockRepository

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

MockRepository is a mock of Repository interface.

func NewMockRepository

func NewMockRepository(ctrl *gomock.Controller) *MockRepository

NewMockRepository creates a new mock instance.

func (*MockRepository) CheckUserExists

func (m *MockRepository) CheckUserExists(userID uint) (bool, error)

CheckUserExists mocks base method.

func (*MockRepository) CreateUser

func (m *MockRepository) CreateUser() (*models.User, error)

CreateUser mocks base method.

func (*MockRepository) EXPECT

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

func (*MockRepository) GetUserBalance

func (m *MockRepository) GetUserBalance(userID uint) (float64, error)

GetUserBalance mocks base method.

func (*MockRepository) SetUserBalance

func (m *MockRepository) SetUserBalance(userID uint, balance float64) (float64, error)

SetUserBalance mocks base method.

type MockRepositoryMockRecorder

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

MockRepositoryMockRecorder is the mock recorder for MockRepository.

func (*MockRepositoryMockRecorder) CheckUserExists

func (mr *MockRepositoryMockRecorder) CheckUserExists(userID interface{}) *gomock.Call

CheckUserExists indicates an expected call of CheckUserExists.

func (*MockRepositoryMockRecorder) CreateUser

func (mr *MockRepositoryMockRecorder) CreateUser() *gomock.Call

CreateUser indicates an expected call of CreateUser.

func (*MockRepositoryMockRecorder) GetUserBalance

func (mr *MockRepositoryMockRecorder) GetUserBalance(userID interface{}) *gomock.Call

GetUserBalance indicates an expected call of GetUserBalance.

func (*MockRepositoryMockRecorder) SetUserBalance

func (mr *MockRepositoryMockRecorder) SetUserBalance(userID, balance interface{}) *gomock.Call

SetUserBalance indicates an expected call of SetUserBalance.

type Repository

type Repository interface {
	CreateUser() (*models.User, error)
	CheckUserExists(userID uint) (bool, error)
	SetUserBalance(userID uint, balance float64) (float64, error)
	GetUserBalance(userID uint) (float64, error)
}

Jump to

Keyboard shortcuts

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