encoder

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2022 License: Apache-2.0 Imports: 7 Imported by: 3 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base64Encoder

type Base64Encoder struct{}

Base64Encoder implements the Encoder interface by delegating to the encoding/base64 base64 encoding strategy.

func NewBase64Encoder

func NewBase64Encoder() *Base64Encoder

NewBase64Encoder constructs an Encoder that implements a base64 encoding as specified by the encoding/base64 package.

func (*Base64Encoder) Decode

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

func (*Base64Encoder) Encode

func (b *Base64Encoder) Encode(val []byte) (string, error)

type Encoder

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

type Noop

type Noop struct{}

func NewNoopEncoder

func NewNoopEncoder() *Noop

func (Noop) Decode

func (n Noop) Decode(s string) ([]byte, error)

func (Noop) Encode

func (n Noop) Encode(data []byte) (string, error)

type TokenEncrypter

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

func NewTokenEncrypter

func NewTokenEncrypter(key string) (*TokenEncrypter, error)

func (TokenEncrypter) Decode

func (e TokenEncrypter) Decode(s string) ([]byte, error)

func (TokenEncrypter) Encode

func (e TokenEncrypter) Encode(data []byte) (string, error)

Jump to

Keyboard shortcuts

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