Documentation ¶
Index ¶
- Variables
- func CheckErr(err error, str string, v ...interface{})
- func DeferClose(closer io.Closer, str string, v ...interface{}) bool
- func PrintErr(err error, str string, v ...interface{}) bool
- func ReadHashFromFile(filename string) ([]*chainhash.Hash, error)
- func SetupProgressbar(size uint64, description string) *progressbar.ProgressBar
- type EnumValue
- type HashSorter
- type LanguageValue
- type OffsetReader
- func (o *OffsetReader) Offset() int64
- func (o *OffsetReader) Position() int64
- func (o *OffsetReader) Read(p []byte) (n int, err error)
- func (o *OffsetReader) ReadAt(p []byte, off int64) (n int, err error)
- func (o *OffsetReader) ReadByte() (byte, error)
- func (o *OffsetReader) Seek(offset int64, whence int) (int64, error)
- type OffsetWriter
- type ProxmoxDateTimeValue
Constants ¶
This section is empty.
Variables ¶
var ( SrcRepo = cli.StringFlag{ Name: "src-repo", Value: "admin@127.0.0.1:datastore", Usage: "Source repo url", Required: true, } SrcNamespace = cli.StringFlag{ Name: "src-namespace", Usage: "Source datastore namespace", } SrcPassword = cli.StringFlag{ Name: "src-password", Usage: "Source repo password", Required: true, } SrcFingerprint = cli.StringFlag{ Name: "src-fingerprint", Usage: "Source repo fingerprint", Required: true, } SrcKeyFile = cli.StringFlag{ Name: "src-keyfile", Usage: "Source key file", } SrcKeyPassword = cli.StringFlag{ Name: "src-keypassword", Usage: "Source key password", } DstRepo = cli.StringFlag{ Name: "dst-repo", Value: "admin@127.0.0.1:datastore", Usage: "Destination repo url", Required: true, } DstNamespace = cli.StringFlag{ Name: "dst-namespace", Usage: "Destination datastore namespace", } DstPassword = cli.StringFlag{ Name: "dst-password", Usage: "Destination repo password", Required: true, } DstFingerprint = cli.StringFlag{ Name: "dst-fingerprint", Usage: "Destination repo fingerprint", Required: true, } DstKeyFile = cli.StringFlag{ Name: "dst-keyfile", Usage: "Destination key file", } DstKeyPassword = cli.StringFlag{ Name: "dst-keypassword", Usage: "Destination key password", } BackupType = cli.GenericFlag{ Name: "backup-type", Value: &EnumValue{ Enum: []string{"host", "vm", "ct"}, Default: "vm", }, Usage: "backup type", } BackupId = cli.StringFlag{ Name: "backup-id", Usage: "backup id", Required: true, } BackupTime = cli.GenericFlag{ Name: "backup-time", Value: &ProxmoxDateTimeValue{Default: 0}, Usage: "backup time", Required: true, } )
Functions ¶
func SetupProgressbar ¶
Types ¶
type HashSorter ¶
func (HashSorter) Len ¶
func (s HashSorter) Len() int
func (HashSorter) Less ¶
func (s HashSorter) Less(i, j int) bool
func (HashSorter) Swap ¶
func (s HashSorter) Swap(i, j int)
type LanguageValue ¶
func (*LanguageValue) Set ¶
func (e *LanguageValue) Set(value string) error
func (LanguageValue) String ¶
func (e LanguageValue) String() string
func (LanguageValue) Value ¶
func (e LanguageValue) Value() language.Tag
type OffsetReader ¶
type OffsetReader struct {
// contains filtered or unexported fields
}
OffsetReader implements Read, and ReadAt on a section of an underlying io.ReaderAt. The main difference between io.SectionReader and OffsetReader is that NewOffsetReadSeeker does not require the user to know the number of readable bytes.
It also partially implements Seek, where the implementation panics if io.SeekEnd is passed. This is because, OffsetReader does not know the end of the file therefore cannot seek relative to it.
func NewOffsetReadSeeker ¶
func NewOffsetReadSeeker(r io.ReaderAt, off int64) *OffsetReader
NewOffsetReadSeeker returns an OffsetReader that reads from r starting offset offset off and stops with io.EOF when r reaches its end. The Seek function will panic if whence io.SeekEnd is passed.
func (*OffsetReader) Offset ¶
func (o *OffsetReader) Offset() int64
func (*OffsetReader) Position ¶
func (o *OffsetReader) Position() int64
Position returns the current position of this reader relative to the initial offset.
func (*OffsetReader) ReadByte ¶
func (o *OffsetReader) ReadByte() (byte, error)
type OffsetWriter ¶
type OffsetWriter struct {
// contains filtered or unexported fields
}
An OffsetWriter maps writes at offset base to offset base+off in the underlying writer.
func NewOffsetWriter ¶
func NewOffsetWriter(w io.WriterAt, off int64) *OffsetWriter
NewOffsetWriter returns an OffsetWriter that writes to w starting at offset off.
type ProxmoxDateTimeValue ¶
type ProxmoxDateTimeValue struct { Default uint64 // contains filtered or unexported fields }
func (*ProxmoxDateTimeValue) Set ¶
func (e *ProxmoxDateTimeValue) Set(value string) error
func (*ProxmoxDateTimeValue) String ¶
func (e *ProxmoxDateTimeValue) String() string
func (*ProxmoxDateTimeValue) Value ¶
func (e *ProxmoxDateTimeValue) Value() uint64