Documentation
¶
Overview ¶
Package mock_person is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DatabaseError = errors.DefineError(prefix, 100, "fething data, error :%s") NotFoundError = errors.DefineError(prefix, 101, "Person not found") )
View Source
var StatusCodes errors.StatusCodeList = map[string]errors.StatusCode{ DatabaseError.Code(): {Error: DatabaseError, StatusCode: 500, ErrorCode: 100}, NotFoundError.Code(): {Error: NotFoundError, StatusCode: 404, ErrorCode: 101}, }
Functions ¶
This section is empty.
Types ¶
type Contribution ¶
type Contribution struct { Mentor string `json:"mentor"` ProjectAdress string `json:"project_adress"` Goal string `json:"goal"` Slug string `json:"slug"` Contributors []struct { Username string `json:"username"` GithubAddress string `json:"github_address"` Avatar string `json:"avatar"` FmnURL string `json:"fmn_url"` } `json:"contributions"` // contains filtered or unexported fields }
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) EXPECT ¶
func (m *MockRepository) EXPECT() *MockRepositoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockRepository) Get ¶
func (m *MockRepository) Get(arg0 context.Context, arg1 *mongoextentions.Query, arg2 *pagination.Pages) ([]*Person, error)
Get mocks base method.
type MockRepositoryMockRecorder ¶
type MockRepositoryMockRecorder struct {
// contains filtered or unexported fields
}
MockRepositoryMockRecorder is the mock recorder for MockRepository.
func (*MockRepositoryMockRecorder) Get ¶
func (mr *MockRepositoryMockRecorder) Get(arg0, arg1, arg2 interface{}) *gomock.Call
Get indicates an expected call of Get.
type Person ¶
type Person struct { RegisteredAt string `json:"registered_at"` Name string `json:"name"` TwitterHandle string `json:"twitter_handle"` Github string `json:"github"` Linkedin string `json:"linkedin"` Interests string `json:"interests"` Goals string `json:"goals"` Mentor string `json:"mentor"` Slug string `json:"slug"` Avatar string `json:"avatar"` DisplayInterests string `json:"displayInterests"` IsHireable bool `json:"isHireable"` Mentorships []string `json:"mentorships"` Contributions []Contribution `json:"contributors"` }
type Repository ¶
type Repository interface {
Get(context.Context, *mongohelper.Query, *pagination.Pages) ([]*Person, error)
}
func NewRepository ¶
func NewRepository(database *mongo.Database) Repository
Source Files
¶
Click to show internal directories.
Click to hide internal directories.