base64

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package base64 provides a byte slice type that marshals into json as a raw (no padding) base64url value.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Value

type Value []byte

Value is a base64url encoded json object,

func NewValue

func NewValue(b []byte) *Value

NewValue returns a pointer to a Value, cast from the given byte slice. This is a convenience function, handling the address creation that a direct cast would not allow.

func (*Value) MarshalJSON

func (bv *Value) MarshalJSON() ([]byte, error)

MarshalJSON returns the ba64url encoding of bv for JSON representation.

func (*Value) UnmarshalJSON

func (bv *Value) UnmarshalJSON(b []byte) error

UnmarshalJSON sets bv to the bytes represented in the base64url encoding b.

Jump to

Keyboard shortcuts

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