user

package
v0.0.0-...-db83385 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2024 License: MIT Imports: 2 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 MockRepository

type MockRepository struct {
	mock.Mock
}

MockRepository is an autogenerated mock type for the Repository type

func NewMockRepository

func NewMockRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockRepository

NewMockRepository creates a new instance of MockRepository. 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 (*MockRepository) DeleteOne

func (_m *MockRepository) DeleteOne(ctx context.Context, userId int64) error

DeleteOne provides a mock function with given fields: ctx, userId

func (*MockRepository) EXPECT

func (*MockRepository) GetAll

func (_m *MockRepository) GetAll(ctx context.Context) ([]*User, error)

GetAll provides a mock function with given fields: ctx

func (*MockRepository) GetOneById

func (_m *MockRepository) GetOneById(ctx context.Context, userId int64) (*User, error)

GetOneById provides a mock function with given fields: ctx, userId

func (*MockRepository) InsertMany

func (_m *MockRepository) InsertMany(ctx context.Context, users []User) error

InsertMany provides a mock function with given fields: ctx, users

func (*MockRepository) InsertOne

func (_m *MockRepository) InsertOne(ctx context.Context, user User) (*User, error)

InsertOne provides a mock function with given fields: ctx, user

func (*MockRepository) UpdateOneById

func (_m *MockRepository) UpdateOneById(ctx context.Context, userId int64, user User) error

UpdateOneById provides a mock function with given fields: ctx, userId, user

type MockRepository_DeleteOne_Call

type MockRepository_DeleteOne_Call struct {
	*mock.Call
}

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

func (*MockRepository_DeleteOne_Call) Return

func (*MockRepository_DeleteOne_Call) Run

func (*MockRepository_DeleteOne_Call) RunAndReturn

type MockRepository_Expecter

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

func (*MockRepository_Expecter) DeleteOne

func (_e *MockRepository_Expecter) DeleteOne(ctx interface{}, userId interface{}) *MockRepository_DeleteOne_Call

DeleteOne is a helper method to define mock.On call

  • ctx context.Context
  • userId int64

func (*MockRepository_Expecter) GetAll

func (_e *MockRepository_Expecter) GetAll(ctx interface{}) *MockRepository_GetAll_Call

GetAll is a helper method to define mock.On call

  • ctx context.Context

func (*MockRepository_Expecter) GetOneById

func (_e *MockRepository_Expecter) GetOneById(ctx interface{}, userId interface{}) *MockRepository_GetOneById_Call

GetOneById is a helper method to define mock.On call

  • ctx context.Context
  • userId int64

func (*MockRepository_Expecter) InsertMany

func (_e *MockRepository_Expecter) InsertMany(ctx interface{}, users interface{}) *MockRepository_InsertMany_Call

InsertMany is a helper method to define mock.On call

  • ctx context.Context
  • users []User

func (*MockRepository_Expecter) InsertOne

func (_e *MockRepository_Expecter) InsertOne(ctx interface{}, user interface{}) *MockRepository_InsertOne_Call

InsertOne is a helper method to define mock.On call

  • ctx context.Context
  • user User

func (*MockRepository_Expecter) UpdateOneById

func (_e *MockRepository_Expecter) UpdateOneById(ctx interface{}, userId interface{}, user interface{}) *MockRepository_UpdateOneById_Call

UpdateOneById is a helper method to define mock.On call

  • ctx context.Context
  • userId int64
  • user User

type MockRepository_GetAll_Call

type MockRepository_GetAll_Call struct {
	*mock.Call
}

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

func (*MockRepository_GetAll_Call) Return

func (*MockRepository_GetAll_Call) Run

func (*MockRepository_GetAll_Call) RunAndReturn

type MockRepository_GetOneById_Call

type MockRepository_GetOneById_Call struct {
	*mock.Call
}

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

func (*MockRepository_GetOneById_Call) Return

func (*MockRepository_GetOneById_Call) Run

func (*MockRepository_GetOneById_Call) RunAndReturn

type MockRepository_InsertMany_Call

type MockRepository_InsertMany_Call struct {
	*mock.Call
}

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

func (*MockRepository_InsertMany_Call) Return

func (*MockRepository_InsertMany_Call) Run

func (*MockRepository_InsertMany_Call) RunAndReturn

type MockRepository_InsertOne_Call

type MockRepository_InsertOne_Call struct {
	*mock.Call
}

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

func (*MockRepository_InsertOne_Call) Return

func (*MockRepository_InsertOne_Call) Run

func (*MockRepository_InsertOne_Call) RunAndReturn

type MockRepository_UpdateOneById_Call

type MockRepository_UpdateOneById_Call struct {
	*mock.Call
}

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

func (*MockRepository_UpdateOneById_Call) Return

func (*MockRepository_UpdateOneById_Call) Run

func (*MockRepository_UpdateOneById_Call) RunAndReturn

type MockUsecase

type MockUsecase struct {
	mock.Mock
}

MockUsecase is an autogenerated mock type for the Usecase type

func NewMockUsecase

func NewMockUsecase(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockUsecase

NewMockUsecase creates a new instance of MockUsecase. 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 (*MockUsecase) DeleteOne

func (_m *MockUsecase) DeleteOne(ctx context.Context, userId int64) error

DeleteOne provides a mock function with given fields: ctx, userId

func (*MockUsecase) EXPECT

func (_m *MockUsecase) EXPECT() *MockUsecase_Expecter

func (*MockUsecase) GetAll

func (_m *MockUsecase) GetAll(ctx context.Context) ([]*User, error)

GetAll provides a mock function with given fields: ctx

func (*MockUsecase) GetOneById

func (_m *MockUsecase) GetOneById(ctx context.Context, userId int64) (*User, error)

GetOneById provides a mock function with given fields: ctx, userId

func (*MockUsecase) InsertMany

func (_m *MockUsecase) InsertMany(ctx context.Context, users []User) error

InsertMany provides a mock function with given fields: ctx, users

func (*MockUsecase) InsertOne

func (_m *MockUsecase) InsertOne(ctx context.Context, user User) (*User, error)

InsertOne provides a mock function with given fields: ctx, user

func (*MockUsecase) UpdateOneById

func (_m *MockUsecase) UpdateOneById(ctx context.Context, userId int64, user User) error

UpdateOneById provides a mock function with given fields: ctx, userId, user

type MockUsecase_DeleteOne_Call

type MockUsecase_DeleteOne_Call struct {
	*mock.Call
}

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

func (*MockUsecase_DeleteOne_Call) Return

func (*MockUsecase_DeleteOne_Call) Run

func (*MockUsecase_DeleteOne_Call) RunAndReturn

type MockUsecase_Expecter

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

func (*MockUsecase_Expecter) DeleteOne

func (_e *MockUsecase_Expecter) DeleteOne(ctx interface{}, userId interface{}) *MockUsecase_DeleteOne_Call

DeleteOne is a helper method to define mock.On call

  • ctx context.Context
  • userId int64

func (*MockUsecase_Expecter) GetAll

func (_e *MockUsecase_Expecter) GetAll(ctx interface{}) *MockUsecase_GetAll_Call

GetAll is a helper method to define mock.On call

  • ctx context.Context

func (*MockUsecase_Expecter) GetOneById

func (_e *MockUsecase_Expecter) GetOneById(ctx interface{}, userId interface{}) *MockUsecase_GetOneById_Call

GetOneById is a helper method to define mock.On call

  • ctx context.Context
  • userId int64

func (*MockUsecase_Expecter) InsertMany

func (_e *MockUsecase_Expecter) InsertMany(ctx interface{}, users interface{}) *MockUsecase_InsertMany_Call

InsertMany is a helper method to define mock.On call

  • ctx context.Context
  • users []User

func (*MockUsecase_Expecter) InsertOne

func (_e *MockUsecase_Expecter) InsertOne(ctx interface{}, user interface{}) *MockUsecase_InsertOne_Call

InsertOne is a helper method to define mock.On call

  • ctx context.Context
  • user User

func (*MockUsecase_Expecter) UpdateOneById

func (_e *MockUsecase_Expecter) UpdateOneById(ctx interface{}, userId interface{}, user interface{}) *MockUsecase_UpdateOneById_Call

UpdateOneById is a helper method to define mock.On call

  • ctx context.Context
  • userId int64
  • user User

type MockUsecase_GetAll_Call

type MockUsecase_GetAll_Call struct {
	*mock.Call
}

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

func (*MockUsecase_GetAll_Call) Return

func (_c *MockUsecase_GetAll_Call) Return(_a0 []*User, _a1 error) *MockUsecase_GetAll_Call

func (*MockUsecase_GetAll_Call) Run

func (*MockUsecase_GetAll_Call) RunAndReturn

func (_c *MockUsecase_GetAll_Call) RunAndReturn(run func(context.Context) ([]*User, error)) *MockUsecase_GetAll_Call

type MockUsecase_GetOneById_Call

type MockUsecase_GetOneById_Call struct {
	*mock.Call
}

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

func (*MockUsecase_GetOneById_Call) Return

func (*MockUsecase_GetOneById_Call) Run

func (*MockUsecase_GetOneById_Call) RunAndReturn

type MockUsecase_InsertMany_Call

type MockUsecase_InsertMany_Call struct {
	*mock.Call
}

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

func (*MockUsecase_InsertMany_Call) Return

func (*MockUsecase_InsertMany_Call) Run

func (*MockUsecase_InsertMany_Call) RunAndReturn

type MockUsecase_InsertOne_Call

type MockUsecase_InsertOne_Call struct {
	*mock.Call
}

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

func (*MockUsecase_InsertOne_Call) Return

func (*MockUsecase_InsertOne_Call) Run

func (*MockUsecase_InsertOne_Call) RunAndReturn

type MockUsecase_UpdateOneById_Call

type MockUsecase_UpdateOneById_Call struct {
	*mock.Call
}

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

func (*MockUsecase_UpdateOneById_Call) Return

func (*MockUsecase_UpdateOneById_Call) Run

func (*MockUsecase_UpdateOneById_Call) RunAndReturn

type Repository

type Repository interface {
	GetAll(ctx context.Context) ([]*User, error)
	GetOneById(ctx context.Context, userId int64) (*User, error)
	InsertOne(ctx context.Context, user User) (*User, error)
	InsertMany(ctx context.Context, users []User) error
	DeleteOne(ctx context.Context, userId int64) error
	UpdateOneById(ctx context.Context, userId int64, user User) error
}

type Usecase

type Usecase interface {
	GetAll(ctx context.Context) ([]*User, error)
	GetOneById(ctx context.Context, userId int64) (*User, error)
	InsertOne(ctx context.Context, user User) (*User, error)
	InsertMany(ctx context.Context, users []User) error
	DeleteOne(ctx context.Context, userId int64) error
	UpdateOneById(ctx context.Context, userId int64, user User) error
}

type User

type User struct {
	Id    int64
	Email string
	Name  string
	About string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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