assets

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssetToFS

func AssetToFS(asset *model.Asset) (afero.Fs, error)

AssetToFS converts a model.Asset to an in-memory filesystem (afero.Fs). It creates directories and files based on the Asset's Files, preserving file modes and content.

func Compress

func Compress(in io.Reader, out io.Writer) error

func Decompress

func Decompress(in io.Reader, out io.Writer) error

func DirToAsset

func DirToAsset(root string) (*model.Asset, error)

DirToAsset converts a directory to an Asset. Because git only preserves +x attributes, we add broad permissions which are then stripped by the umask.

Types

type ReadCounter

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

func NewReadCounter

func NewReadCounter(r io.Reader) *ReadCounter

func (*ReadCounter) Count

func (rc *ReadCounter) Count() int64

func (*ReadCounter) Read

func (rc *ReadCounter) Read(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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