encodingx

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromBase64

func FromBase64(s string) ([]byte, error)

func FromBase64ToString

func FromBase64ToString(s string) (string, error)

func FromJsonTo

func FromJsonTo(from []byte, to any) error

func StringToBase64

func StringToBase64(s string) string

func ToBase64

func ToBase64(bs []byte) string

func ToJson

func ToJson(v any) (string, error)

func ToJsonBytes

func ToJsonBytes(v any) ([]byte, error)

Types

type Base32Encoder

type Base32Encoder struct{}

func (Base32Encoder) Decode

func (Base32Encoder) Decode(s string) ([]byte, error)

func (Base32Encoder) Encode

func (Base32Encoder) Encode(bs []byte) (string, error)

type Base64Encoder

type Base64Encoder struct{}

func (Base64Encoder) Decode

func (Base64Encoder) Decode(s string) ([]byte, error)

func (Base64Encoder) Encode

func (Base64Encoder) Encode(bs []byte) (string, error)

type IStrEncoding

type IStrEncoding interface {
	Encode([]byte) (string, error)
	Decode(string) ([]byte, error)
}

func NewBase32Encoder

func NewBase32Encoder() IStrEncoding

func NewBase64Encoder

func NewBase64Encoder() IStrEncoding

Jump to

Keyboard shortcuts

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