services

package
v0.0.0-...-099a909 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlackIpService

type BlackIpService interface {
	GetAll(page, size int) []models.Blackip
	CountAll() int64
	Search(ip string) []models.Blackip
	Get(id int) *models.Blackip
	Update(blackip *models.Blackip, columns []string) error
	Create(blackip *models.Blackip) error
	GetByIp(ip string) *models.Blackip
}

func NewBlackIpService

func NewBlackIpService() BlackIpService

type CodeService

type CodeService interface {
	GetAll(page, size int) []models.Code
	CountAll() int64
	CountByGift(giftId int) int64
	Search(giftId int) []models.Code
	Get(id int) *models.Code
	Delete(id int) error
	Update(code *models.Code, columns []string) error
	Create(code *models.Code) error
	NextUsingCode(giftId, codeId int) *models.Code
	UpdateByCode(code *models.Code, columns []string) error
}

func NewCodeService

func NewCodeService() CodeService

type GiftService

type GiftService interface {
	GetAll(useCache bool) []models.Gift
	CountAll() int64
	//Search(country string) []models.LtGift
	Get(id int, useCache bool) *models.Gift
	Delete(id int) error
	Update(data *models.Gift, columns []string) error
	Create(data *models.Gift) error
	GetAllUse(useCache bool) []models.ObjGiftPrize
	IncrLeftNum(id, num int) (int64, error)
	DecrLeftNum(id, num int) (int64, error)
}

func NewGiftService

func NewGiftService() GiftService

type ResultService

type ResultService interface {
	GetAll(page, size int) []models.Result
	CountAll() int64
	GetNewPrize(size int, giftIds []int) []models.Result
	SearchByGift(giftId, page, size int) []models.Result
	SearchByUser(uid, page, size int) []models.Result
	CountByGift(giftId int) int64
	CountByUser(uid int) int64
	Get(id int) *models.Result
	Delete(id int) error
	Update(user *models.Result, columns []string) error
	Create(result *models.Result) error
}

func NewResultService

func NewResultService() ResultService

type UserService

type UserService interface {
	GetAll(page, size int) []models.User
	CountAll() int64
	Get(id int) *models.User
	Update(user *models.User, columns []string) error
	Create(user *models.User) error
}

func NewUserService

func NewUserService() UserService

type UserdayService

type UserdayService interface {
	GetAll(page, size int) []models.Userday
	CountAll() int64
	Search(uid, day int) []models.Userday
	Count(uid, day int) int
	Get(id int) *models.Userday
	Update(user *models.Userday, columns []string) error
	Create(user *models.Userday) error
	GetUserToday(uid int) *models.Userday
}

func NewUserdayService

func NewUserdayService() UserdayService

Jump to

Keyboard shortcuts

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