dtv

package
v0.13.11 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2023 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoSearch

type AutoSearch struct {
	Title          string            `yaml:"タイトル"`
	Channel        string            `yaml:"チャンネル"`
	Genre          string            `yaml:"ジャンル"`
	NotifyUsers    []*discordgo.User `yaml:"-"`
	RecordingUsers []*discordgo.User `yaml:"-"`
	ThreadID       string            `yaml:"-"`
}

func (*AutoSearch) IsMatchProgram

func (a *AutoSearch) IsMatchProgram(program *AutoSearchProgram, fuzzyMatch bool) bool

func (*AutoSearch) IsMatchService

func (a *AutoSearch) IsMatchService(serviceName string, kanaMatch bool, fuzzyMatch bool) bool

type AutoSearchProgram

type AutoSearchProgram struct {
	Title string
	Genre string
	EndAt int64
}

func NewAutoSearchProgram

func NewAutoSearchProgram(p db.Program, kanaMatch bool) *AutoSearchProgram

type DTVUsecase

type DTVUsecase struct {
	// contains filtered or unexported fields
}

func NewDTVUsecase

func NewDTVUsecase(
	cfg config.Config,
	asynqClient *asynq.Client,
	inspector *asynq.Inspector,
	discordClient *discord_client.DiscordClient,
	mirakcClient *mirakc_client.MirakcClient,
	scheduler *gocron.Scheduler,
	queries *db.Queries,
	logger *zap.Logger,
	kanaMatch bool,
	fuzzyMatch bool,
	gpt *gpt.GPTClient,
	meili *meili.MeiliSearchClient,
) (*DTVUsecase, error)

func (*DTVUsecase) CheckCompletedTask

func (dtv *DTVUsecase) CheckCompletedTask(ctx context.Context) error

func (*DTVUsecase) CheckFailedTask

func (dtv *DTVUsecase) CheckFailedTask(ctx context.Context) error

func (*DTVUsecase) CheckUpdateTask

func (dtv *DTVUsecase) CheckUpdateTask(ctx context.Context, version string) error

func (*DTVUsecase) InitializeServiceChannels

func (dtv *DTVUsecase) InitializeServiceChannels(ctx context.Context) error

func (*DTVUsecase) ListAutoSearchForServiceName

func (dtv *DTVUsecase) ListAutoSearchForServiceName(serviceName string) ([]*AutoSearch, error)

func (*DTVUsecase) OnOkEmojiAdd

func (dtv *DTVUsecase) OnOkEmojiAdd(ctx context.Context, reaction *discordgo.MessageReactionAdd) error

func (*DTVUsecase) OnProgramsUpdated

func (dtv *DTVUsecase) OnProgramsUpdated(ctx context.Context, serviceId uint) error

func (*DTVUsecase) OnRecordingEmojiAdd

func (dtv *DTVUsecase) OnRecordingEmojiAdd(ctx context.Context, reaction *discordgo.MessageReactionAdd) error

func (*DTVUsecase) OnRecordingEmojiRemove

func (dtv *DTVUsecase) OnRecordingEmojiRemove(ctx context.Context, reaction *discordgo.MessageReactionRemove) error

func (*DTVUsecase) OnRecordingFailed

func (dtv *DTVUsecase) OnRecordingFailed(ctx context.Context, programId int64, reason string) error

func (*DTVUsecase) OnRecordingStarted

func (dtv *DTVUsecase) OnRecordingStarted(ctx context.Context, programId int64) error

func (*DTVUsecase) OnRecordingStopped

func (dtv *DTVUsecase) OnRecordingStopped(ctx context.Context, programId int64) error

func (*DTVUsecase) Reindex added in v0.13.0

func (dtv *DTVUsecase) Reindex(ctx context.Context) error

type GitHubRelease

type GitHubRelease struct {
	TagName string `json:"tag_name"`
	Body    string `json:"body"`
}

Jump to

Keyboard shortcuts

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