encoding

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package encoding defines interfaces shared by other packages that convert data to and from byte-level and textual representations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeBase64OrJSON added in v0.11.0

func DecodeBase64OrJSON(in string, out interface{}) error

DecodeBase64OrJSON decodes a JSON string that can optionally be base64 encoded.

Types

type MarshalUnmarshaler

type MarshalUnmarshaler interface {
	Marshaler
	Unmarshaler
}

MarshalUnmarshaler can both Marshal and Unmarshal a struct into and from a set of bytes.

type Marshaler

type Marshaler interface {
	Marshal(interface{}) ([]byte, error)
}

Marshaler encodes a struct into a set of bytes.

type Unmarshaler

type Unmarshaler interface {
	Unmarshal([]byte, interface{}) error
}

Unmarshaler decodes a set of bytes and returns a struct.

Directories

Path Synopsis
Package jws represents content secured with digitalsignatures using JSON-based data structures as specified by rfc7515
Package jws represents content secured with digitalsignatures using JSON-based data structures as specified by rfc7515
Package mock implements a mock implementation of MarshalUnmarshaler.
Package mock implements a mock implementation of MarshalUnmarshaler.

Jump to

Keyboard shortcuts

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