model

package
v2.3.72 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 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"`

	User *User `json:"user"`
}

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"`
}

type User added in v2.3.64

type User struct {
	ID         int     `json:"id"`
	Login      string  `json:"login"`
	FirstName  string  `json:"first_name"`
	SecondName *string `json:"second_name"`
	LastName   *string `json:"last_name"`
}

func (User) TableName added in v2.3.64

func (m User) TableName() string

Jump to

Keyboard shortcuts

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