base64

package
v0.0.0-...-cda2eac Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: GPL-3.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

View Source
const (
	EncodeStd    = "trellis::algo::encodeStd"
	EncodeRawStd = "trellis::algo::encodeRawStd"
	EncodeURL    = "trellis::algo::encodeURL"
	EncodeRawURL = "trellis::algo::encodeRawURL"
)

default base64 encoders

Variables

This section is empty.

Functions

func Decode

func Decode(encoder string, src []byte, opts ...Option) ([]byte, error)

Decode decode bytes with encoder

func DecodeString

func DecodeString(encoder string, s string, opts ...Option) ([]byte, error)

DecodeString decode string with encoder

func Encode

func Encode(encoder string, src []byte, opts ...Option) string

Encode encode bytes with encoder

func EncodeString

func EncodeString(encoder string, src string, opts ...Option) string

EncodeString encode string with encoder

func NewEncoding

func NewEncoding(encoder string, opts ...Option) *base64.Encoding

NewEncoding get base64 encoding with input encoder

func NewEncodingWithPadding

func NewEncodingWithPadding(encoder string, padding rune) *base64.Encoding

NewEncodingWithPadding get encoding with encoder and padding

Types

type Option

type Option func(*Options)

func Padding

func Padding(padding rune) Option

type Options

type Options struct {
	Padding *rune
}

Jump to

Keyboard shortcuts

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