encoder

package
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Base64EncoderNormalMode = 1
	Base64EncoderFlatMode   = 2
)

Variables

View Source
var DefaultBase64Encoder = Base64Encoder{/* contains filtered or unexported fields */}
View Source
var DefaultBase64FlatEncoder = Base64Encoder{/* contains filtered or unexported fields */}
View Source
var DefaultJSUnicodeEncoder = JSUnicodeEncoder{/* contains filtered or unexported fields */}
View Source
var DefaultPlainEncoder = PlainEncoder{/* contains filtered or unexported fields */}
View Source
var DefaultURLEncoder = URLEncoder{/* contains filtered or unexported fields */}
View Source
var DefaultXMLEntityEncoder = XMLEntityEncoder{/* contains filtered or unexported fields */}
View Source
var Encoders map[string]Encoder

Functions

func Apply

func Apply(encoderName, data string) (string, error)

Types

type Base64Encoder

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

func (Base64Encoder) Encode

func (enc Base64Encoder) Encode(data string) (string, error)

func (Base64Encoder) GetName

func (enc Base64Encoder) GetName() string

type Encoder

type Encoder interface {
	GetName() string
	Encode(data string) (string, error)
}

type JSUnicodeEncoder

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

func (JSUnicodeEncoder) Encode

func (enc JSUnicodeEncoder) Encode(data string) (string, error)

func (JSUnicodeEncoder) GetName

func (enc JSUnicodeEncoder) GetName() string

type PlainEncoder

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

func (PlainEncoder) Encode

func (enc PlainEncoder) Encode(data string) (string, error)

func (PlainEncoder) GetName

func (enc PlainEncoder) GetName() string

type URLEncoder

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

func (URLEncoder) Encode

func (enc URLEncoder) Encode(data string) (string, error)

func (URLEncoder) GetName

func (enc URLEncoder) GetName() string

type XMLEntityEncoder

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

func (XMLEntityEncoder) Encode

func (enc XMLEntityEncoder) Encode(data string) (string, error)

func (XMLEntityEncoder) GetName

func (enc XMLEntityEncoder) GetName() string

Jump to

Keyboard shortcuts

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