forms

package
v0.0.0-...-1746241 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: MIT Imports: 8 Imported by: 2 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

This section is empty.

Types

type BackupCreate

type BackupCreate struct {
	Name string `form:"name" json:"name"`
	// contains filtered or unexported fields
}

func NewBackupCreate

func NewBackupCreate(app core.App, createBackup CreateBackupFunc) *BackupCreate

func (*BackupCreate) SetContext

func (form *BackupCreate) SetContext(ctx context.Context)

func (*BackupCreate) Submit

func (form *BackupCreate) Submit(interceptors ...forms.InterceptorFunc[string]) error

func (*BackupCreate) Validate

func (form *BackupCreate) Validate() error

type BackupUpload

type BackupUpload struct {
	File *filesystem.File `json:"file"`
	// contains filtered or unexported fields
}

BackupUpload is a request form for uploading a new app backup.

func NewBackupUpload

func NewBackupUpload(app core.App) *BackupUpload

NewBackupUpload creates new BackupUpload request form.

func (*BackupUpload) SetContext

func (form *BackupUpload) SetContext(ctx context.Context)

SetContext replaces the default form upload context with the provided one.

func (*BackupUpload) Submit

func (form *BackupUpload) Submit(interceptors ...forms.InterceptorFunc[*filesystem.File]) error

Submit validates the form and upload the backup file.

You can optionally provide a list of InterceptorFunc to further modify the form behavior before uploading the backup.

func (*BackupUpload) Validate

func (form *BackupUpload) Validate() error

Validate makes the form validatable by implementing validation.Validatable interface.

type CreateBackupFunc

type CreateBackupFunc func(ctx context.Context, name string) error

Jump to

Keyboard shortcuts

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