backup

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: MIT Imports: 9 Imported by: 0

README

backup

type BackupMetadata
type BackupMetadata struct {
	Date       time.Time `json:"timestamp"`
	FileFormat string    `json:"format"`
	FilePath   string    `json:"path"`
	Stores     []string  `json:"stores,omitempty"`
	Checksum   Checksum  `json:"checksum,omitempty"`
	Size       int64     `json:"size,omitempty"`
}
func (BackupMetadata) Format
func (bm BackupMetadata) Format() string
func (BackupMetadata) Path
func (bm BackupMetadata) Path() string
func (BackupMetadata) Timestamp
func (bm BackupMetadata) Timestamp() time.Time
type Checksum
type Checksum struct {
	Type  string `json:"type"`
	Value string `json:"value"`
}
type Format
type Format string
const (
	FormatTarGz Format = "tar.gz"
	FormatTar   Format = "tar"
	FormatZip   Format = "zip"
)
type TarGzBackup
type TarGzBackup struct {
}
func NewTarGzBackup
func NewTarGzBackup(inPath string, outPath string, stores []string, extraData ...[]byte) (*TarGzBackup, error)
func (*TarGzBackup) Format
func (tgz *TarGzBackup) Format() string
func (*TarGzBackup) Metadata
func (tgz *TarGzBackup) Metadata() BackupMetadata

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupMetadata

type BackupMetadata struct {
	Date       time.Time `json:"timestamp"`
	FileFormat string    `json:"format"`
	FilePath   string    `json:"path"`
	Stores     []string  `json:"stores,omitempty"`
	Checksum   Checksum  `json:"checksum,omitempty"`
	Size       int64     `json:"size,omitempty"`
}

func (BackupMetadata) Format

func (bm BackupMetadata) Format() string

func (BackupMetadata) Path

func (bm BackupMetadata) Path() string

func (BackupMetadata) Timestamp

func (bm BackupMetadata) Timestamp() time.Time

type Checksum

type Checksum struct {
	Type  string `json:"type"`
	Value string `json:"value"`
}

type Format

type Format string
const (
	FormatTarGz Format = "tar.gz"
	FormatTar   Format = "tar"
	FormatZip   Format = "zip"
)

type TarGzBackup

type TarGzBackup struct {
	// contains filtered or unexported fields
}

func NewTarGzBackup

func NewTarGzBackup(inPath string, outPath string, stores []string, extraData ...[]byte) (*TarGzBackup, error)

func (*TarGzBackup) Format

func (tgz *TarGzBackup) Format() string

func (*TarGzBackup) Metadata

func (tgz *TarGzBackup) Metadata() BackupMetadata

Jump to

Keyboard shortcuts

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