archive

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Archiver

type Archiver interface {
	Extract(archiveFile string, targetDir string, replacements map[string]interface{}) error
	LoadManifestFile(src string) ([]byte, error)
}

Archiver handles archive files.

type Processor

type Processor interface {
	Process(content []byte, target io.Writer, replacements map[string]interface{}) error
}

Processor replaces placeholders in text content with values.

type TemplateProcessor

type TemplateProcessor struct {
}

TemplateProcessor replaces placeholders in text content with values using Go's templating functionality.

func (*TemplateProcessor) Process

func (tp *TemplateProcessor) Process(content []byte, target io.Writer, replacements map[string]interface{}) error

Process performs placeholder replacement.

type ZIPArchiver

type ZIPArchiver struct {
	Processor Processor
}

ZIPArchiver handles ZIP archive files.

func (*ZIPArchiver) Extract

func (a *ZIPArchiver) Extract(archiveFile string, targetDir string, replacements map[string]interface{}) error

Extract expands the contents of a ZIP file.

func (*ZIPArchiver) LoadManifestFile

func (a *ZIPArchiver) LoadManifestFile(src string) ([]byte, error)

LoadManifestFile loads the manifest from a ZIP file.

Jump to

Keyboard shortcuts

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