Versions in this module Expand all Collapse all v1 v1.0.0 Jun 26, 2023 Changes in this version + const ASCIIDecoder + const Base64Decoder + const HexDecoder + const Latin1Decoder + const RawBase64Decoder + const RawURLBase64Decoder + const StdBase64Decoder + const TextDecoder + const ULIDDecoder + const URLBase64Decoder + const UTF8Decoder + const UUIDDecoder + const VersionMajor + const VersionMinor + const VersionPatch + const VersionReleaseLevel + const VersionReleaseNumber + var BuildDate string + var ErrEmptyPipeline = errors.New("the pipeline has no transformation steps") + var ErrNoData = errors.New("data cannot be empty or nil") + var ErrOverwrite = errors.New("this operation will overwrite existing data") + var ErrUnknownB64Scheme = errors.New("unknown base64 encoding scheme") + var ErrUnknownStepType = errors.New("initialize a pipeline with a string or Decoder") + var GitVersion string + func DecoderNames() []string + func RegisterDecoder(name string, constructor DecoderConstructor, aliases ...string) + func Version() string + type Base64 struct + Scheme Base64Scheme + func NewBase64(scheme Base64Scheme) *Base64 + func (b Base64) DecodeBinary(in []byte) (Encoder, error) + func (b Base64) DecodeString(in string) (_ Encoder, err error) + func (b Base64) EncodeBinary() ([]byte, error) + func (b Base64) EncodeString() (string, error) + type Base64Scheme uint8 + const B64SchemeRawStd + const B64SchemeRawURL + const B64SchemeStd + const B64SchemeURL + func (b Base64Scheme) String() string + type Decoder interface + DecodeBinary func(data []byte) (Encoder, error) + DecodeString func(data string) (Encoder, error) + func NewDecoder(name string) (Decoder, error) + type DecoderConstructor func() Decoder + type Encoder interface + EncodeBinary func() (data []byte, err error) + EncodeString func() (data string, err error) + type Hex struct + func (h Hex) DecodeBinary(in []byte) (Encoder, error) + func (h Hex) DecodeString(in string) (_ Encoder, err error) + func (h Hex) EncodeBinary() ([]byte, error) + func (h Hex) EncodeString() (string, error) + type MultiPipeline struct + func NewMulti(steps ...string) (_ *MultiPipeline, err error) + func (p *MultiPipeline) Bin2Bin(name string, in []byte) (_ []byte, err error) + func (p *MultiPipeline) Bin2Str(name string, in []byte) (out string, err error) + func (p *MultiPipeline) MustBin2Str(name string, in []byte) string + func (p *MultiPipeline) Str2Bin(name, in string) (out []byte, err error) + func (p *MultiPipeline) Str2Str(name, in string) (out string, err error) + type Pipeline struct + func New(steps ...any) (_ *Pipeline, err error) + func (p *Pipeline) Bin2Bin(in []byte) (_ []byte, err error) + func (p *Pipeline) Bin2Str(in []byte) (out string, err error) + func (p *Pipeline) Str2Bin(in string) (out []byte, err error) + func (p *Pipeline) Str2Str(in string) (out string, err error) + type Text struct + Encoding TextEncoding + func NewText(encoding TextEncoding) *Text + func (u Text) DecodeBinary(in []byte) (_ Encoder, err error) + func (u Text) DecodeString(in string) (_ Encoder, err error) + func (u Text) EncodeBinary() ([]byte, error) + func (u Text) EncodeString() (_ string, err error) + type TextEncoding uint8 + const ASCIIEncoding + const Latin1Encoding + const UTF8Encoding + func (b TextEncoding) String() string + type ULID struct + ULID ulid.ULID + func (u ULID) DecodeBinary(in []byte) (_ Encoder, err error) + func (u ULID) DecodeString(in string) (_ Encoder, err error) + func (u ULID) EncodeBinary() ([]byte, error) + func (u ULID) EncodeString() (string, error) + type UUID struct + UUID uuid.UUID + func (u UUID) DecodeBinary(in []byte) (_ Encoder, err error) + func (u UUID) DecodeString(in string) (_ Encoder, err error) + func (u UUID) EncodeBinary() ([]byte, error) + func (u UUID) EncodeString() (string, error)