file

package
v3.6.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 12 Imported by: 4

Documentation

Index

Constants

View Source
const (
	GZipImplEnvVarKey = "GZIP_IMPLEMENTATION"
	GZIP              = "GZip"
	PGZIP             = "PGZip"
)

Variables

This section is empty.

Functions

func CompressContent

func CompressContent(content []byte) []byte

CompressContent will compress the byte array using zip writer

func CompressEncodeString

func CompressEncodeString(content string) string

CompressEncodeString will return the compressed string with base64 encoded

func DecodeDecompressString

func DecodeDecompressString(content string) (string, error)

DecodeDecompressString will return decode and decompress the

func DecompressContent

func DecompressContent(content []byte) ([]byte, error)

DecompressContent will return the uncompressed content

func ExistsInTar

func ExistsInTar(sourcePath string, tarReader TarReader) bool

ExistsInTar return true if file or directory exists in tar

func GetGzipReader added in v3.1.0

func GetGzipReader(reader io.Reader) (io.ReadCloser, error)

GetGzipReader gets the GzipReader based on `GZipImplEnvVarKey` environment variable.

func WalkManifests added in v3.4.7

func WalkManifests(root string, fn func(path string, data []byte) error) error

WalkManifests is based on filepath.Walk but will only walk through Kubernetes manifests

Types

type TarReader

type TarReader interface {
	Next() (*tar.Header, error)
}

Jump to

Keyboard shortcuts

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