Documentation
¶
Index ¶
- func CompleteProcess(app *pocketbase.PocketBase, id string, message string)
- func CreateProcess(app *pocketbase.PocketBase, name, description, typz, state string, ...) string
- func FailProcess(app *pocketbase.PocketBase, id string, errorMsg string)
- func GetProcess(app *pocketbase.PocketBase, id string) (*models.Record, error)
- func RegisterInDB(app *pocketbase.PocketBase, input, data any, name, typz, state string) string
- func SetState(app *pocketbase.PocketBase, id, state string)
- func UpdateProgress(app *pocketbase.PocketBase, id string, progress ProgressUpdate)
- type ProcessInput
- type ProgressUpdate
- type RunCommandData
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 ¶
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
Click to show internal directories.
Click to hide internal directories.