outlined

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: May 16, 2020 License: BSD-2-Clause, CC0-1.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssetReaderFactory

type AssetReaderFactory func(start, size int64) func() (reader iocommon.ReadSeekCloser, err error)
type Header struct {
	*xbcommon.FileInfo

	SysPath string
	// contains filtered or unexported fields
}

func NewHeader

func NewHeader(fileInfo *xbcommon.FileInfo, sysPath string) *Header

func (*Header) Compressed

func (a *Header) Compressed(storeSize int64) *Header

func (*Header) Digest

func (a *Header) Digest() *[sha256.Size]byte

func (*Header) DigestReader

func (a *Header) DigestReader() func() [sha256.Size]byte

func (*Header) IsCompressed

func (a *Header) IsCompressed() bool

func (*Header) LoadDigest

func (a *Header) LoadDigest(allW ...io.Writer) error

func (*Header) Marshal

func (a *Header) Marshal(w io.Writer) (err error)

func (*Header) Unmarshal

func (a *Header) Unmarshal(r io.Reader) (err error)

type Headers

type Headers []*Header

func (Headers) Append

func (headers Headers) Append(pth string, wrap ...func(w io.WriteCloser) io.WriteCloser) (err error)

func (Headers) AppendGz

func (headers Headers) AppendGz(pth string) (err error)

func (Headers) AppendW added in v0.0.3

func (headers Headers) AppendW(w io.Writer) (err error)

func (Headers) Assets

func (headers Headers) Assets(readerFactory AssetReaderFactory) (assets []xbcommon.Asset)

func (Headers) EachAssets

func (headers Headers) EachAssets(readerFactory AssetReaderFactory, cb func(i int, asset xbcommon.Asset))

func (Headers) Store

func (headers Headers) Store(w io.Writer) (err error)

func (Headers) StoreFile

func (headers Headers) StoreFile(pth string, wrap ...func(w io.WriteCloser) io.WriteCloser) (err error)

func (Headers) StoreFileGz

func (headers Headers) StoreFileGz(pth string) (err error)

type Outlined

type Outlined struct {
	Headers     Headers
	HeadersSize int64
	Path        string
	Len         int
	Hash        [sha256.Size]byte
	BuildDate   time.Time
	StartPos    int64
}

func New

func New() *Outlined

func OpenFile

func OpenFile(pth string, ended ...bool) (outlined *Outlined, err error)

func (*Outlined) Assets

func (outlined *Outlined) Assets(readerFactory ...AssetReaderFactory) (assets []xbcommon.Asset)

func (*Outlined) AssetsMap

func (outlined *Outlined) AssetsMap(readerFactory ...AssetReaderFactory) (assets map[string]xbcommon.Asset)

func (*Outlined) EachAsset

func (outlined *Outlined) EachAsset(cb func(i int, asset xbcommon.Asset), readerFactory ...AssetReaderFactory)

func (*Outlined) Read

func (outlined *Outlined) Read(r io.Reader) (err error)

func (*Outlined) ReadFile

func (outlined *Outlined) ReadFile(pth string, ended ...bool) (err error)

func (*Outlined) ReaderFactory

func (outlined *Outlined) ReaderFactory(start, size int64) func() (reader iocommon.ReadSeekCloser, err error)

func (*Outlined) Uncompress

func (outlined *Outlined) Uncompress(pth string) (n int64, err error)

Jump to

Keyboard shortcuts

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