setup

package
v0.0.0-...-63b66d1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBootImage

func CreateBootImage(w DirWriter) error

func NewBase64Reader

func NewBase64Reader(r io.Reader) io.Reader

func NewGZipReader

func NewGZipReader(r io.Reader) (io.Reader, error)

func NewStringReader

func NewStringReader(s string) io.Reader

func TarExtract

func TarExtract(r io.Reader, w DirWriter) error

func TarGzExtract

func TarGzExtract(r io.Reader, w DirWriter) error

func TarGzFileExtract

func TarGzFileExtract(tarFile string, w DirWriter) error

Types

type DirReader

type DirReader interface {
	SelectFile(name string) (FileInfo, error)
	OpenFile() (io.ReadCloser, error)
}

type DirSeqReader

type DirSeqReader interface {
	NextFile() (FileInfo, error)
	OpenFile() (io.ReadCloser, error)
}

func NewTarReader

func NewTarReader(r io.Reader) DirSeqReader

type DirWriter

type DirWriter interface {
	CreateFile(fi FileInfo) (io.WriteCloser, error)
	Close() error
}

func NewFileWriter

func NewFileWriter(dir string) (DirWriter, error)

func NewZipWriter

func NewZipWriter(w io.Writer) (DirWriter, error)

type FileInfo

type FileInfo struct {
	Type     FileType
	Name     string
	Linkname string
	Size     int64
	Mode     int64
}

type FileType

type FileType int64
const (
	FileTypeUnkonwn FileType = iota
	FileTypeFile
	FileTypeDir
	FileTypeSoftlink
)

type Settings

type Settings struct {
	Alpine  SettingsAlpine
	Network SettingsNetwork
	WLAN    SettingsWLAN
	SSH     SettingsSSH
}

type SettingsAlpine

type SettingsAlpine struct {
	Version string
	Arch    string
}

type SettingsNetwork

type SettingsNetwork struct {
	Hostname string
}

type SettingsSSH

type SettingsSSH struct {
	AuthorizedKeys string
}

type SettingsWLAN

type SettingsWLAN struct {
	SSID     string
	Password string
}

type TarReader

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

func (*TarReader) NextFile

func (r *TarReader) NextFile() (fi FileInfo, err error)

func (*TarReader) OpenFile

func (r *TarReader) OpenFile() (io.ReadCloser, error)

type TarWriter

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

func NewTarWriter

func NewTarWriter(w io.Writer) (tw *TarWriter, err error)

func (*TarWriter) AddBuffer

func (tw *TarWriter) AddBuffer(filename string, data []byte, mode int64) error
func (tw *TarWriter) AddLink(filename, linkname string, mode int64) error

func (*TarWriter) Close

func (tw *TarWriter) Close() error

func (*TarWriter) CreateFile

func (tw *TarWriter) CreateFile(filename string, mode, size int64) (io.Writer, error)

Jump to

Keyboard shortcuts

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