decoders

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2018 License: BSD-3-Clause Imports: 1 Imported by: 4

Documentation

Overview

Package decoders provides functions to decode encoded-string.

It allows developers to register custom encodings, that can be used in json-schema for validation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, d Decoder)

Register registers Decoder object for given encoding.

Types

type Decoder

type Decoder func(string) ([]byte, error)

The Decoder type is a function, that returns the bytes represented by encoded string.

func Get

func Get(name string) (Decoder, bool)

Get returns Decoder object for given encoding, if found.

Jump to

Keyboard shortcuts

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