contract

package
v0.0.0-...-cb1e3f4 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2022 License: Unlicense Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheManager

type CacheManager interface {
	ClientPool() *redis.Client
	Prefix() string

	Get(key string) ([]byte, error)
	Set(key string, data []byte) error

	GetJSON(key string, data interface{}) error
	SetJSON(key string, data interface{}) error

	GetExpiration(key string) (time.Duration, error)
	SetExpiration(key string, expiration time.Duration) error

	Invalidate(key string) error
	CleanAll() error
}

type ChampRepo

type ChampRepo interface {
	Find() ([]entity.Champ, error)
	FindBySlug(slug string) (entity.Champ, error)
}

type ChampService

type ChampService interface {
	Find() ([]entity.Champ, error)
	FindBySlug(slug string) (entity.Champ, error)
}

type DataManager

type DataManager interface {
	RepoManager
	Begin() (TransactionManager, error)
	Close() error
}

type RepoManager

type RepoManager interface {
	Champ() ChampRepo
	Team() TeamRepo
	Trophy() TrophyRepo
}

type ScraperService

type ScraperService interface {
	ScrapeAndUpdate() error
}

type TeamRepo

type TeamRepo interface {
	Find() ([]entity.Team, error)
	FindByAbbr(abbr string) (entity.Team, error)
}

type TeamService

type TeamService interface {
	Find() ([]entity.Team, error)
	FindByAbbr(abbr string) (entity.Team, error)
}

type TransactionManager

type TransactionManager interface {
	RepoManager
	Rollback() error
	Commit() error
}

type TrophyRepo

type TrophyRepo interface {
	FindByTeamID(teamID uint32) ([]entity.Trophy, error)
	BulkInsertByTeams(teams []entity.Team) error
	Delete() error
}

Jump to

Keyboard shortcuts

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