Documentation ¶
Overview ¶
Package repository is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CharacterRepository ¶
CharacterRepository struct for db connection
func (*CharacterRepository) Close ¶
func (repository *CharacterRepository) Close()
Close the DB connection
func (*CharacterRepository) Create ¶
func (repository *CharacterRepository) Create(character *Character) error
Create saves a character in db
func (*CharacterRepository) GetCharacterByDiscordUserID ¶
func (repository *CharacterRepository) GetCharacterByDiscordUserID(discordUserID string) (*Character, error)
GetCharacterByDiscordUserID get a character by its discord user id (unique)
type CharacterRepositoryInterface ¶
type CharacterRepositoryInterface interface { Create(character *Character) error GetCharacterByDiscordUserID(discordUserID string) (*Character, error) }
CharacterRepositoryInterface interface for functions for character repository
type MockCharacterRepositoryInterface ¶
type MockCharacterRepositoryInterface struct {
// contains filtered or unexported fields
}
MockCharacterRepositoryInterface is a mock of CharacterRepositoryInterface interface
func NewMockCharacterRepositoryInterface ¶
func NewMockCharacterRepositoryInterface(ctrl *gomock.Controller) *MockCharacterRepositoryInterface
NewMockCharacterRepositoryInterface creates a new mock instance
func (*MockCharacterRepositoryInterface) Create ¶
func (m *MockCharacterRepositoryInterface) Create(character *Character) error
Create mocks base method
func (*MockCharacterRepositoryInterface) EXPECT ¶
func (m *MockCharacterRepositoryInterface) EXPECT() *MockCharacterRepositoryInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockCharacterRepositoryInterface) GetCharacterByDiscordUserID ¶
func (m *MockCharacterRepositoryInterface) GetCharacterByDiscordUserID(discordUserID string) (*Character, error)
GetCharacterByDiscordUserID mocks base method
type MockCharacterRepositoryInterfaceMockRecorder ¶
type MockCharacterRepositoryInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockCharacterRepositoryInterfaceMockRecorder is the mock recorder for MockCharacterRepositoryInterface
func (*MockCharacterRepositoryInterfaceMockRecorder) Create ¶
func (mr *MockCharacterRepositoryInterfaceMockRecorder) Create(character interface{}) *gomock.Call
Create indicates an expected call of Create
func (*MockCharacterRepositoryInterfaceMockRecorder) GetCharacterByDiscordUserID ¶
func (mr *MockCharacterRepositoryInterfaceMockRecorder) GetCharacterByDiscordUserID(discordUserID interface{}) *gomock.Call
GetCharacterByDiscordUserID indicates an expected call of GetCharacterByDiscordUserID