Documentation ¶
Overview ¶
Package preference is a generated GoMock package.
Package preference is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultRepo ¶
type DefaultRepo struct { gorm.Model UserID uint Name string Visibility string DefaultBranch string }
DefaultRepo represents an entity model used to store & retrieve user's default repo to/from database.
type MockRepo ¶
type MockRepo struct {
// contains filtered or unexported fields
}
MockRepo is a mock of Repo interface.
func NewMockRepo ¶
func NewMockRepo(ctrl *gomock.Controller) *MockRepo
NewMockRepo creates a new mock instance.
func (*MockRepo) EXPECT ¶
func (m *MockRepo) EXPECT() *MockRepoMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockRepo) GetByUserID ¶
func (m *MockRepo) GetByUserID(userID uint) (DefaultRepo, error)
GetByUserID mocks base method.
func (*MockRepo) Save ¶
func (m *MockRepo) Save(defaultRepo DefaultRepo) error
Save mocks base method.
type MockRepoMockRecorder ¶
type MockRepoMockRecorder struct {
// contains filtered or unexported fields
}
MockRepoMockRecorder is the mock recorder for MockRepo.
func (*MockRepoMockRecorder) GetByUserID ¶
func (mr *MockRepoMockRecorder) GetByUserID(userID interface{}) *gomock.Call
GetByUserID indicates an expected call of GetByUserID.
func (*MockRepoMockRecorder) Save ¶
func (mr *MockRepoMockRecorder) Save(defaultRepo interface{}) *gomock.Call
Save indicates an expected call of Save.
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) GetByUserID ¶
func (m *MockService) GetByUserID(userID uint) (DefaultRepo, error)
GetByUserID mocks base method.
func (*MockService) Save ¶
func (m *MockService) Save(defaultRepo DefaultRepo) error
Save mocks base method.
type MockServiceMockRecorder ¶
type MockServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockServiceMockRecorder is the mock recorder for MockService.
func (*MockServiceMockRecorder) GetByUserID ¶
func (mr *MockServiceMockRecorder) GetByUserID(userID interface{}) *gomock.Call
GetByUserID indicates an expected call of GetByUserID.
func (*MockServiceMockRecorder) Save ¶
func (mr *MockServiceMockRecorder) Save(defaultRepo interface{}) *gomock.Call
Save indicates an expected call of Save.
type Repo ¶
type Repo interface { Save(defaultRepo DefaultRepo) error GetByUserID(userID uint) (DefaultRepo, error) }
Repo represents a preference repository. It provides methods retrieve and save the user preferences from database.
func NewRepository ¶
NewRepository creates and returns a new instance of preference repository.
type Service ¶
type Service interface { Save(defaultRepo DefaultRepo) error GetByUserID(userID uint) (DefaultRepo, error) }
Service represents a preference service. It provides methods to manager user preferences.
func NewService ¶
NewService creates and return a new preference service.