repositories

package
v0.0.0-...-4af8f9e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

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

func Copy

func Copy(dst interface{}, src interface{}) error

Copy a src struct into a destination struct

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL