content

package
v2.0.0-...-f0a18de Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2020 License: MIT Imports: 13 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	io.WriterTo

	// Transcode is an transcoding content from the specified encoding to UTF-8
	Transcode(e encoding.Encoding) Interface

	// Transform is an transforming content using a custom function
	Transform(fn TransformFunc) Interface

	// String Return content as string
	String() (string, error)

	// Bytes Return content as []byte
	Bytes() ([]byte, error)

	// UnmarshalJSON Decoding content like JSON
	UnmarshalJSON(o interface{}) error

	// UnmarshalXML Decoding content like XML
	UnmarshalXML(o interface{}) error

	// UnTar Разархивация контента методом TAR
	UnTar() Interface

	// UnZip Разархивация контента методом ZIP (извлекается только первый файл)
	UnZip() Interface

	// UnGzip Разархивация контента методом GZIP
	UnGzip() Interface

	// UnFlate Разархивация контента методом FLATE
	UnFlate() Interface

	// BackToBegin Returns the content reading pointer to the beginning
	// This allows you to repeat the work with content
	BackToBegin() error
}

Interface is an interface of package

func New

New creates a new object and return interface

type TransformFunc

type TransformFunc func(r io.Reader) (io.Reader, error)

TransformFunc is an func for streaming content conversion

Jump to

Keyboard shortcuts

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