content

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: MIT Imports: 13 Imported by: 0

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