user

package
v0.0.0-...-482c23a Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package user is a generated GoMock package.

Package user is a generated GoMock package.

Package user is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewResource

func NewResource(db DBRepository, cache CacheRepository) resource

Types

type CacheRepository

type CacheRepository interface {
	SetUser(user redispool.User)
	GetUserByID(id int64) redispool.User
}

type DBRepository

type DBRepository interface {
	GetUserByID(id int64) pgsqlx.User
}

type MockCacheRepository

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

MockCacheRepository is a mock of CacheRepository interface

func NewMockCacheRepository

func NewMockCacheRepository(ctrl *gomock.Controller) *MockCacheRepository

NewMockCacheRepository creates a new mock instance

func (*MockCacheRepository) EXPECT

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

func (*MockCacheRepository) GetUserByID

func (m *MockCacheRepository) GetUserByID(id int64) redispool.User

GetUserByID mocks base method

func (*MockCacheRepository) SetUser

func (m *MockCacheRepository) SetUser(user redispool.User)

SetUser mocks base method

type MockCacheRepositoryMockRecorder

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

MockCacheRepositoryMockRecorder is the mock recorder for MockCacheRepository

func (*MockCacheRepositoryMockRecorder) GetUserByID

func (mr *MockCacheRepositoryMockRecorder) GetUserByID(id interface{}) *gomock.Call

GetUserByID indicates an expected call of GetUserByID

func (*MockCacheRepositoryMockRecorder) SetUser

func (mr *MockCacheRepositoryMockRecorder) SetUser(user interface{}) *gomock.Call

SetUser indicates an expected call of SetUser

type MockDBRepository

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

MockDBRepository is a mock of DBRepository interface

func NewMockDBRepository

func NewMockDBRepository(ctrl *gomock.Controller) *MockDBRepository

NewMockDBRepository creates a new mock instance

func (*MockDBRepository) EXPECT

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

func (*MockDBRepository) GetUserByID

func (m *MockDBRepository) GetUserByID(id int64) pgsqlx.User

GetUserByID mocks base method

type MockDBRepositoryMockRecorder

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

MockDBRepositoryMockRecorder is the mock recorder for MockDBRepository

func (*MockDBRepositoryMockRecorder) GetUserByID

func (mr *MockDBRepositoryMockRecorder) GetUserByID(id interface{}) *gomock.Call

GetUserByID indicates an expected call of GetUserByID

type MockService

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

MockService is a mock of Service interface

func NewMockService

func NewMockService(ctrl *gomock.Controller) *MockService

NewMockService creates a new mock instance

func (*MockService) EXPECT

func (m *MockService) EXPECT() *MockServiceMockRecorder

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

func (*MockService) GetUserByID

func (m *MockService) GetUserByID(id int64) entity.User

GetUserByID mocks base method

type MockServiceMockRecorder

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

MockServiceMockRecorder is the mock recorder for MockService

func (*MockServiceMockRecorder) GetUserByID

func (mr *MockServiceMockRecorder) GetUserByID(id interface{}) *gomock.Call

GetUserByID indicates an expected call of GetUserByID

type Resource

type Resource interface {
	GetUserByIDDB(id int64) entity.User

	GetUserByIDCache(id int64) entity.User
	SetUserCache(user entity.User) error
}

type Service

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

func NewService

func NewService(rsc Resource) Service

func (Service) GetUserByID

func (svc Service) GetUserByID(id int64) entity.User

Jump to

Keyboard shortcuts

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