Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Arguments ¶
type Arguments struct { ListTargets *ListTargetsCmd `arg:"subcommand:list-targets"` Initialise *InitialiseCmd `arg:"subcommand:init"` Info *InfoCmd `arg:"subcommand:info"` List *ListCmd `arg:"subcommand:list"` Create *CreateCmd `arg:"subcommand:create"` ExportKey *ExportKeyCmd `arg:"subcommand:export-key"` ImportKey *ImportKeyCmd `arg:"subcommand:import-key"` Clean *CleanCmd `arg:"subcommand:clean"` ConfigFile string `arg:"-c,--config-file"` }
Arguments struct defines the CLI Interface
type BorgTarget ¶
BorgTarget holds the ARCHIVE:REPO target specified as CLI argument
func (*BorgTarget) UnmarshalText ¶
func (t *BorgTarget) UnmarshalText(b []byte) error
UnmarshalText parses the ARCHIVE:REPO bytestring into BorgTarget fields
type CleanCmd ¶
type CleanCmd struct{}
clean ----------------------------------------------------------------------------
type CreateCmd ¶
type CreateCmd struct {
Target BorgTarget `arg:"required,positional"`
}
create ----------------------------------------------------------------------------
type ExportKeyCmd ¶
type ExportKeyCmd struct {
Target BorgTarget `arg:"required,positional"`
}
export-key ----------------------------------------------------------------------------
type ImportKeyCmd ¶
type ImportKeyCmd struct { Target SingleBorgTarget `arg:"required,positional"` Keyfile string `arg:"required"` PasswordFile string `arg:"--password-file"` }
import-key ----------------------------------------------------------------------------
type InfoCmd ¶
type InfoCmd struct {
Target BorgTarget `arg:"required,positional"`
}
info ----------------------------------------------------------------------------
type InitialiseCmd ¶
type InitialiseCmd struct {
Target BorgTarget `arg:"required,positional"`
}
initialise ----------------------------------------------------------------------------
type ListCmd ¶
type ListCmd struct {
Target BorgTarget `arg:"required,positional"`
}
list ----------------------------------------------------------------------------
type ListTargetsCmd ¶
type ListTargetsCmd struct {
Format string `arg:"-F,--format" default:"text"`
}
list-targets ----------------------------------------------------------------------------
type RunnableCommand ¶
RunnableCommand is the interface which all subcommands implement. This allows all subcommands to have a .Run() method with a consistent signature. Subcommand-specific args are passed into the real command function by their respective implementations
type SingleBorgTarget ¶
type SingleBorgTarget BorgTarget
SingleBorgTarget is the same as BorgTarget except fails during Unmarshal if any field is unset
func (*SingleBorgTarget) UnmarshalText ¶
func (t *SingleBorgTarget) UnmarshalText(b []byte) error