values

package
v0.0.0-...-b7efc31 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package values provides Go value wrappers that can encode/decode from JSON.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Time

type Time time.Time

Time provides a Time type that can encode/decode from JSON integers representing Unix Epoch. Implements json.Marshaller and json.Unmarshaller.

func (Time) MarshalJSON

func (t Time) MarshalJSON() ([]byte, error)

func (Time) String

func (t Time) String() string

func (Time) Time

func (t Time) Time() time.Time

Time returns the Go native time.Time.

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(s []byte) error

type URL

type URL url.URL

URL provides a URL type that can encode/decode from JSON strings. Implements json.Marshaller and json.Unmarshaller.

func (*URL) MarshalJSON

func (u *URL) MarshalJSON() ([]byte, error)

func (*URL) String

func (u *URL) String() string

func (*URL) URL

func (u *URL) URL() *url.URL

URL returns the Go native *url.URL.

func (*URL) UnmarshalJSON

func (u *URL) UnmarshalJSON(s []byte) error

Jump to

Keyboard shortcuts

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