backup

package
v0.0.0-...-72177e3 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractWorldArchiveIfNeeded

func ExtractWorldArchiveIfNeeded() error

func GetLastWorldHash

func GetLastWorldHash(config *runner.Config) (string, bool, error)

func PrepareUploadData

func PrepareUploadData(options UploadOptions) error

func RemoveLastWorldHash

func RemoveLastWorldHash(config *runner.Config) error

func SaveLastWorldHash

func SaveLastWorldHash(config *runner.Config, hash string) error

Types

type BackupService

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

func New

func New(awsAccessKey, awsSecretKey, s3Endpoint, bucket string) *BackupService

func (*BackupService) DownloadWorldData

func (self *BackupService) DownloadWorldData(config *runner.Config) error

func (*BackupService) GetLatestKey

func (self *BackupService) GetLatestKey(world string) (string, error)

func (*BackupService) RemoveOldBackups

func (self *BackupService) RemoveOldBackups(config *runner.Config) error

func (*BackupService) UploadWorldData

func (self *BackupService) UploadWorldData(config *runner.Config, options UploadOptions) error

type ProgressReader

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

func (*ProgressReader) Read

func (self *ProgressReader) Read(buf []byte) (int, error)

type ProgressWriter

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

func (*ProgressWriter) Write

func (self *ProgressWriter) Write(buf []byte) (int, error)

type UploadOptions

type UploadOptions struct {
	TmpFileName string
	SourceDir   string
}

Jump to

Keyboard shortcuts

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