emotes

package
v0.0.0-...-9d6c436 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MAX_UPLOAD_SIZE   = 2621440  // 2.5MB
	MAX_LOSSLESS_SIZE = 256000.0 // 250KB
	MAX_FRAMES        = 750
	MAX_WIDTH         = 1000
	MAX_HEIGHT        = 1000
	MAX_TAGS          = 6
)

Variables

This section is empty.

Functions

func New

func New(gCtx global.Context) rest.Route

Types

type EmoteJobEvent

type EmoteJobEvent struct {
	JobID     primitive.ObjectID
	Type      EmoteJobEventType
	Timestamp time.Time
}

type EmoteJobEventType

type EmoteJobEventType string
const (
	EmoteJobEventTypeStarted            EmoteJobEventType = "started"
	EmoteJobEventTypeDownloaded         EmoteJobEventType = "downloaded"
	EmoteJobEventTypeStageOne           EmoteJobEventType = "stage-one"
	EmoteJobEventTypeStageOneComplete   EmoteJobEventType = "stage-one-complete"
	EmoteJobEventTypeStageTwo           EmoteJobEventType = "stage-two"
	EmoteJobEventTypeStageTwoComplete   EmoteJobEventType = "stage-two-complete"
	EmoteJobEventTypeStageThree         EmoteJobEventType = "stage-three"
	EmoteJobEventTypeStageThreeComplete EmoteJobEventType = "stage-three-complete"
	EmoteJobEventTypeCompleted          EmoteJobEventType = "completed"
	EmoteJobEventTypeCleaned            EmoteJobEventType = "cleaned"
)

type EmoteProcessingListener

type EmoteProcessingListener struct {
	Ctx global.Context
}

func (*EmoteProcessingListener) HandleResultEvent

func (epl *EmoteProcessingListener) HandleResultEvent(evt *EmoteResultEvent) error

func (*EmoteProcessingListener) HandleUpdateEvent

func (epl *EmoteProcessingListener) HandleUpdateEvent(evt *EmoteJobEvent) error

func (*EmoteProcessingListener) Listen

func (epl *EmoteProcessingListener) Listen()

type EmoteResultEvent

type EmoteResultEvent struct {
	JobID   primitive.ObjectID `json:"job_id"`
	Success bool               `json:"success"`
	Files   []EmoteResultFile  `json:"files"`
	Error   string             `json:"error"`
}

type EmoteResultFile

type EmoteResultFile struct {
	Name        string `json:"name"`
	Size        int64  `json:"size"`
	ContentType string `json:"content_type"`
	Animated    bool   `json:"animated"`
	TimeTaken   int    `json:"time_taken"`
	Width       int32  `json:"width"`
	Height      int32  `json:"height"`
}

type Route

type Route struct {
	Ctx global.Context
}

func (*Route) Config

func (r *Route) Config() rest.RouteConfig

func (*Route) Handler

func (r *Route) Handler(ctx *rest.Ctx) rest.APIError

Emote Search @Summary Search Emotes @Description Search for emotes @Tags emotes @Produce json @Param query query string false "search by emote name / tags" @Success 200 {array} model.Emote @Router /emotes [get]

Jump to

Keyboard shortcuts

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