Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AWSConfig ¶
type AWSConfig struct {
AccessKey string `name:"access-key" env:"AWS_ACCESS_KEY_ID" help:"AWS access key ID (s3://)." optional:""`
SecretKey string `name:"secret-key" env:"AWS_SECRET_ACCESS_KEY" help:"AWS secret access key (s3://)." optional:""`
SessionToken string `name:"session-token" env:"AWS_SESSION_TOKEN" help:"AWS session token for temporary credentials (s3://)." optional:""`
Region string `name:"region" env:"AWS_REGION,AWS_DEFAULT_REGION" help:"AWS region." optional:""`
Profile string `name:"profile" env:"AWS_PROFILE" help:"AWS credentials profile (s3://)." optional:""`
Endpoint string `name:"endpoint" help:"S3-compatible endpoint URL, e.g. http://localhost:9000 (s3://)." optional:""`
}
type BackendsCommand ¶
type BackendsCommand struct{}
type ClientCommands ¶
type ClientCommands struct {
Volumes BackendsCommand `cmd:"" name:"volumes" help:"Return list of volumes." group:"SERVER"`
List ListCommand `cmd:"" name:"ls" help:"List objects." group:"OBJECTS"`
Get GetCommand `cmd:"" name:"cat" help:"Download an object." group:"OBJECTS"`
Head HeadCommand `cmd:"" name:"head" help:"Get object metadata." group:"OBJECTS"`
Delete DeleteCommand `cmd:"" name:"rm" help:"Delete an object or prefix." group:"OBJECTS"`
Upload UploadCommand `cmd:"" name:"upload" help:"Upload a file or directory." group:"OBJECTS"`
Download DownloadCommand `cmd:"" name:"download" help:"Download an object to a file or directory." group:"OBJECTS"`
}
type DeleteCommand ¶
type DeleteCommand struct {
Volume string `name:"volume" short:"v" help:"Backend volume name (saved as default for future commands)." optional:""`
Path string `arg:"" name:"path" help:"Object path or prefix"`
Recursive bool `name:"recursive" short:"r" help:"Delete all objects under path, including subdirectories"`
}
type DownloadCommand ¶
type DownloadCommand struct {
Volume string `name:"volume" short:"v" help:"Backend volume name (saved as default for future commands)." optional:""`
Path string `arg:"" name:"path" help:"Local directory to download into (defaults to current directory)." optional:""`
Prefix string `name:"prefix" short:"p" help:"Remote path prefix to download (e.g. backups/2026)."`
Force bool `name:"force" short:"f" help:"Download every file even when the local copy appears up to date."`
}
type GetCommand ¶
type HeadCommand ¶
type ListCommand ¶
type ListCommand struct {
Volume string `name:"volume" short:"v" help:"Backend volume name (saved as default for future commands)." optional:""`
Path string `arg:"" name:"path" help:"Path prefix to list" optional:"" default:"/"`
Recursive bool `name:"recursive" short:"r" help:"List recursively"`
Limit int `name:"limit" short:"n" help:"Maximum number of objects to return (default: all)."`
Offset int `name:"offset" help:"Number of objects to skip (for pagination)." default:"0"`
}
type RunServerCommand ¶
type RunServerCommand struct {
Backend []string `arg:"" name:"backend" help:"Backend URL (e.g. mem://name, file://name/path, s3://bucket)." optional:""`
AWS AWSConfig `embed:"" prefix:"aws."`
queue.PostgresFlags `embed:"" prefix:"pg."`
queue.Queue `embed:"" prefix:"queue."`
cmd.RunServer
}
func (*RunServerCommand) OptsForBackend ¶
type ServerCommands ¶
type ServerCommands struct {
Run RunServerCommand `cmd:"" name:"run" help:"Run HTTP server." group:"SERVER"`
}
type UploadCommand ¶
type UploadCommand struct {
Volume string `name:"volume" short:"v" help:"Backend volume name (saved as default for future commands)." optional:""`
Path string `arg:"" name:"path" help:"Local file or directory to upload (defaults to current directory)." optional:""`
Prefix string `name:"prefix" short:"p" help:"Remote path prefix (e.g. backups/2026)."`
Hidden bool `name:"hidden" help:"Include files and directories whose names begin with '.'."`
Force bool `name:"force" short:"f" help:"Upload every file even when the remote copy appears up to date."`
}
Click to show internal directories.
Click to hide internal directories.