model

package
v2.3.49 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusPending = "pending"
	StatusRunning = "running"
	StatusStopped = "stopped"
	StatusFailed  = "failed"
	StatusSuccess = "success"
)
View Source
const (
	TaskMessageType = "tasks"
)
View Source
const (
	TaskStatusChangedMessageAction = "status-changed"
)

Variables

Functions

This section is empty.

Types

type Task

type Task struct {
	ID        int       `json:"id"`
	Name      string    `json:"name"`
	Type      string    `json:"type"`
	UserID    int       `json:"user_id"`
	Status    string    `json:"status"`
	Output    []byte    `json:"output"`
	Input     []byte    `json:"input"`
	FileSize  *int64    `json:"file_size" gorm:"-"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

func (Task) FilePath

func (m Task) FilePath() string

func (Task) TableName

func (m Task) TableName() string

type TaskMessage added in v2.3.40

type TaskMessage struct {
	Status string `json:"status"`
	Id     int    `json:"id"`
	Name   string `json:"name"`
	Type   string `json:"type"`
}

Jump to

Keyboard shortcuts

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