service

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiscordService

type DiscordService interface {
	Service
	Persist(profileCh <-chan model.MojangProfile, memberCh <-chan model.DiscordMember, playerCh <-chan model.HypixelPlayer) <-chan string

	CheckIfAlreadyVerified(input *api.DiscordVerifyRequest) <-chan *api.DiscordVerifyRequest
	VerifyHypixelSocials(member <-chan model.DiscordMember, player <-chan model.HypixelPlayerResponse) (<-chan model.DiscordMember, <-chan model.HypixelPlayer)
	FetchHypixelPlayer(inputCh <-chan model.MojangProfile) (<-chan model.HypixelPlayerResponse, <-chan model.MojangProfile)
	FetchMojangProfile(inputCh <-chan *api.DiscordVerifyRequest) (<-chan model.MojangProfile, <-chan model.DiscordMember)
	GiveXP(member <-chan model.DiscordMember, xp <-chan float64) <-chan model.DiscordMember
	GetJWT(input *api.DiscordBotLoginRequest) <-chan string
	CheckDaily(member <-chan model.DiscordMember) <-chan float64
	GetMember(id string) <-chan model.DiscordMember
	StrToInt(input string) <-chan int
	GetLeaderboard(page <-chan int) <-chan api.DiscordLeaderboardResponse
}

func NewDiscordService

func NewDiscordService(db *surreal_wrap.DB, config *conf.Config) DiscordService

type Service

type Service interface {
	InjectErrorChan() <-chan error
	InjectContext(ctx context.Context) context.CancelFunc
	Pipeline(run func(), repos ...repository.Repository)
}

Jump to

Keyboard shortcuts

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