ranklists

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Controller

type Controller interface {
	GetRankList(c *gin.Context)
}

func NewController

func NewController(logger *zap.Logger, s Service) Controller

type InitRanklistGroupFn

type InitRanklistGroupFn func(r *gin.RouterGroup)

func CreateInitControllersFn

func CreateInitControllersFn(pc Controller) InitRanklistGroupFn

type Repository

type Repository interface {
	CreateRankList() (p *models.RankList, err error)
	CreateRankListModel(id uint64) (*models.RankListModel, error)
	CreateRankListRecord(rl *models.RankList, account *models.Account, key string, value interface{}) (*models.RankListRecord, error)
	GetRankList(id uint64) (*models.RankList, error)
	GetRankListsByProblem(problem *models.Problem) ([]*models.RankList, error)
}

func NewRepository

func NewRepository(logger *zap.Logger, db *gorm.DB) Repository

type Service

type Service interface {
	GetRankList(id uint64) (*models.RankList, error)
	GetRankListsByProblem(problem *models.Problem) ([]*models.RankList, error)
}

func NewService

func NewService(logger *zap.Logger, Repository Repository) Service

Jump to

Keyboard shortcuts

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