serialization

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EpochTime

type EpochTime time.Time

EpochTime is a type used for unmarshaling timestamps represented in epoch time. Its underlying type is time.Time.

func (EpochTime) Equal

func (e EpochTime) Equal(u EpochTime) bool

Equal provides a comparator for the EpochTime type.

func (EpochTime) MarshalJSON

func (e EpochTime) MarshalJSON() ([]byte, error)

MarshalJSON is responsible for marshaling the EpochTime type.

func (EpochTime) String added in v0.30.2

func (e EpochTime) String() string

String returns the time formatted using the format string

func (*EpochTime) UnmarshalJSON

func (e *EpochTime) UnmarshalJSON(s []byte) error

UnmarshalJSON is responsible for unmarshaling the EpochTime type.

type MapStringInterface added in v0.12.0

type MapStringInterface map[string]interface{}

MapStringInterface is used for custom unmarshaling of fields that have potentially dynamic types. E.g. when a field can be a string or an object/map

func (*MapStringInterface) UnmarshalJSON added in v0.12.0

func (c *MapStringInterface) UnmarshalJSON(data []byte) error

UnmarshalJSON is a custom unmarshal method to guard against fields that can have more than one type returned from an API.

Jump to

Keyboard shortcuts

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