dtv

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: MIT Imports: 30 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
	Channel    string
	Genre      string
	KanaMatch  bool
	FuzzyMatch bool
	RegexMatch bool
	ThreadID   string
}

func (*AutoSearch) IsMatchProgram

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

func (*AutoSearch) IsMatchService

func (a *AutoSearch) IsMatchService(serviceName string) bool

type AutoSearchProgram

type AutoSearchProgram struct {
	Title     string
	TitleKana string
	Genre     string
	GenreKana string
	EndAt     int64
}

func NewAutoSearchProgram

func NewAutoSearchProgram(p db.Program) *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,
	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) CreateAutoSearch added in v0.14.0

func (dtv *DTVUsecase) CreateAutoSearch(userID string, name string, title string, channel string, genre string, kanaSearch bool, fuzzySearch bool, regexSearch bool, record bool) error

func (*DTVUsecase) DeleteAutoSearch added in v0.14.0

func (dtv *DTVUsecase) DeleteAutoSearch(ctx context.Context, threadID string) error

func (*DTVUsecase) InitializeServiceChannels

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

func (*DTVUsecase) ListAutoSearchForServiceName

func (dtv *DTVUsecase) ListAutoSearchForServiceName(ctx context.Context, serviceName string) ([]*AutoSearch, error)

func (*DTVUsecase) ListChannelNames added in v0.14.0

func (dtv *DTVUsecase) ListChannelNames() ([]string, 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