service

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterDiscordV1

func RegisterDiscordV1(i IDiscordV1)

func RegisterInteractionsV1

func RegisterInteractionsV1(i IInteractionsV1)

func RegisterSubmitV1

func RegisterSubmitV1(i ISubmitV1)

func RegisterTaskV1

func RegisterTaskV1(i ITaskV1)

Types

type IDiscordV1

type IDiscordV1 interface {
	Open(ctx context.Context) (*discordgo.Session, error)
	Close(ctx context.Context, session *discordgo.Session) error
}

func DiscordV1

func DiscordV1() IDiscordV1

type IInteractionsV1

type IInteractionsV1 interface {
	Interactions(ctx context.Context, interactionsReq, result interface{}) error
}

func InteractionsV1

func InteractionsV1() IInteractionsV1

type ISubmitV1

type ISubmitV1 interface {
	Imagine(ctx context.Context, imagine model.Imagine) (*model.SubmitRes, error)
	Change(ctx context.Context, change model.Change) (*model.SubmitRes, error)
}

func SubmitV1

func SubmitV1() ISubmitV1

type ITaskV1

type ITaskV1 interface {
	NewTask(ctx context.Context, action, prompt string, index ...int) (string, error)
	TaskHandler(ctx context.Context, taskType, messageId, messageContent string, components []discordgo.MessageComponent, messageAttachment *discordgo.MessageAttachment)
	GetTask(ctx context.Context, taskId string) *model.Task
	Fetch(ctx context.Context, taskId string) *model.FetchRes
}

func TaskV1

func TaskV1() ITaskV1

Jump to

Keyboard shortcuts

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