process

package
v0.29.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompleteProcess

func CompleteProcess(app *pocketbase.PocketBase, id string, message string)

CompleteProcess marks a process as completed

func CreateProcess

func CreateProcess(app *pocketbase.PocketBase, name, description, typz, state string, data map[string]any, customID string) string

CreateProcess creates a new process with progress tracking

func FailProcess

func FailProcess(app *pocketbase.PocketBase, id string, errorMsg string)

FailProcess marks a process as failed with an error message

func GetProcess

func GetProcess(app *pocketbase.PocketBase, id string) (*models.Record, error)

func RegisterInDB

func RegisterInDB(app *pocketbase.PocketBase, input, data any, name, typz, state string) string

func SetState

func SetState(app *pocketbase.PocketBase, id, state string)

func UpdateProgress

func UpdateProgress(app *pocketbase.PocketBase, id string, progress ProgressUpdate)

UpdateProgress updates the progress of a process

Types

type ProcessInput

type ProcessInput struct {
	Completed int    `json:"completed"`
	Total     int    `json:"total"`
	Progress  int    `json:"progress"`
	Message   string `json:"message"`
	Error     string `json:"error"`
}

ProcessInput represents the input field structure for a process

type ProgressUpdate

type ProgressUpdate struct {
	Completed int
	Total     int
	Message   string
	Error     string
	State     string
}

ProgressUpdate represents progress information for updating a process

type RunCommandData

type RunCommandData struct {
	ID         string `db:"id,omitempty" json:"id,omitempty"`
	SaveTo     string `db:"save_to,omitempty" json:"save_to,omitempty"`
	Data       string `db:"data,omitempty" json:"data,omitempty"`
	Command    string `db:"command,omitempty" json:"command,omitempty"`
	Collection string `db:"collection,omitempty" json:"collection,omitempty"`
	Filename   string `db:"filename,omitempty" json:"filename,omitempty"`
}

func (*RunCommandData) Scan

func (d *RunCommandData) Scan(value interface{}) error

Jump to

Keyboard shortcuts

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