Documentation ¶
Index ¶
- type RepoMock
- func (r *RepoMock) Delete(id string) participant.Error
- func (r *RepoMock) Get(id string) (*participant.Participant, participant.Error)
- func (r *RepoMock) GetAll() ([]*participant.Participant, participant.Error)
- func (r *RepoMock) Save(participant participant.Participant) (*participant.Participant, participant.Error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RepoMock ¶
type RepoMock struct { SaveHandler func(participant participant.Participant) (*participant.Participant, participant.Error) GetHandler func(id string) (*participant.Participant, participant.Error) GetAllHandler func() ([]*participant.Participant, participant.Error) DeleteHandler func(id string) participant.Error }
RepoMock is used to mock Participant Repository. Inject the desired behaviour.
func (*RepoMock) Delete ¶
func (r *RepoMock) Delete(id string) participant.Error
Delete mocks participant.Repository Delete.
func (*RepoMock) Get ¶
func (r *RepoMock) Get(id string) (*participant.Participant, participant.Error)
Get mocks participant.Repository Get.
func (*RepoMock) GetAll ¶
func (r *RepoMock) GetAll() ([]*participant.Participant, participant.Error)
GetAll mocks participant.Repository GetAll.
func (*RepoMock) Save ¶
func (r *RepoMock) Save(participant participant.Participant) (*participant.Participant, participant.Error)
Save mocks participant.Repository Save.
Click to show internal directories.
Click to hide internal directories.