Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound error when record not found ErrNotFound = fmt.Errorf("record Not Found") // ErrUnableToMarshalJSON error when json payload corrupt ErrUnableToMarshalJSON = fmt.Errorf("json payload corrupt") // ErrUpdateFailed error when update fails ErrUpdateFailed = fmt.Errorf("db update error") // ErrInsertFailed error when insert fails ErrInsertFailed = fmt.Errorf("db insert error") // ErrDeleteFailed error when delete fails ErrDeleteFailed = fmt.Errorf("db delete error") // ErrBadParams error when bad params passed in ErrBadParams = fmt.Errorf("bad params error") )
Functions ¶
Types ¶
type PlayerRepository ¶
type PlayerRepository struct {
// contains filtered or unexported fields
}
func NewPlayerRepository ¶
func NewPlayerRepository(db *gorm.DB) *PlayerRepository
func (*PlayerRepository) GetPlayerByName ¶
func (repository *PlayerRepository) GetPlayerByName(name string) (*models.Player, error)
type PlayerRepositoryWithCircuitBreaker ¶
type PlayerRepositoryWithCircuitBreaker struct {
PlayerRepository interfaces.IPlayerRepository
}
func (*PlayerRepositoryWithCircuitBreaker) GetPlayerByName ¶
func (repository *PlayerRepositoryWithCircuitBreaker) GetPlayerByName(name string) (*models.Player, error)
Click to show internal directories.
Click to hide internal directories.