world

package
v0.0.0-...-c7882bd Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrepareUploadData

func PrepareUploadData() error

Types

type Decompressor

type Decompressor interface {
	ToDecompressed(io.Reader) (io.Reader, error)
}

type ExtractionPipeline

type ExtractionPipeline struct {
	D Decompressor
	U Unarchiver
	C *FileCreator
}

func (*ExtractionPipeline) Run

func (p *ExtractionPipeline) Run(r io.Reader) error

type FileCreator

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

func NewFileCreator

func NewFileCreator(outDir string) (*FileCreator, error)

func (*FileCreator) CreateFile

func (c *FileCreator) CreateFile(path string, isDir bool, content io.Reader) error

func (*FileCreator) Finalize

func (c *FileCreator) Finalize() error

type TarUnarchiver

type TarUnarchiver struct{}

func (*TarUnarchiver) Unarchive

func (*TarUnarchiver) Unarchive(r io.Reader, c *FileCreator) error

type Unarchiver

type Unarchiver interface {
	Unarchive(io.Reader, *FileCreator) error
}

type WorldService

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

func New

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

func (*WorldService) DownloadWorldData

func (w *WorldService) DownloadWorldData(config *runner.Config) error

func (*WorldService) GetLatestKey

func (w *WorldService) GetLatestKey(world string) (string, error)

func (*WorldService) RemoveOldBackups

func (w *WorldService) RemoveOldBackups(config *runner.Config) error

func (*WorldService) UploadWorldData

func (w *WorldService) UploadWorldData(config *runner.Config) (string, error)

type XZDecompressor

type XZDecompressor struct{}

func (*XZDecompressor) ToDecompressed

func (*XZDecompressor) ToDecompressed(r io.Reader) (io.Reader, error)

type ZipUnarchiver

type ZipUnarchiver struct{}

func (*ZipUnarchiver) Unarchive

func (z *ZipUnarchiver) Unarchive(r io.Reader, c *FileCreator) error

type ZstdDecompressor

type ZstdDecompressor struct{}

func (*ZstdDecompressor) ToDecompressed

func (*ZstdDecompressor) ToDecompressed(r io.Reader) (io.Reader, error)

Jump to

Keyboard shortcuts

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