types

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const LWTimestampFormat = "2006-01-02 15:04:05"

LWTimestampFormat is Liquid Web's timestamp format.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlexInt

type FlexInt int

FlexInt was shamelessly stolen from Chris to handle inconsistencies in the API returning numerical versus string IDs.

func (*FlexInt) String

func (fi *FlexInt) String() string

func (*FlexInt) UnmarshalJSON

func (fi *FlexInt) UnmarshalJSON(b []byte) error

UnmarshalJSON handles the unmarshalling of the FlexInt type.

type IPAddr

type IPAddr struct {
	net.IP
}

IPAddr uses net.IP but supports Marshal/Unmarshal.

func (*IPAddr) MarshalJSON

func (ip *IPAddr) MarshalJSON() ([]byte, error)

MarshalJSON marshalls the IPAddr type.

func (*IPAddr) String

func (ip *IPAddr) String() string

String returns a string representation of the IP.

func (*IPAddr) UnmarshalJSON

func (ip *IPAddr) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the IPAddr type.

type NumericalBoolean

type NumericalBoolean bool

NumericalBoolean handles booleans in the API being returned as

func (*NumericalBoolean) UnmarshalJSON

func (nb *NumericalBoolean) UnmarshalJSON(d []byte) error

UnmarshalJSON handles the unmarshalling of the NumericalBoolean type.

type Timestamp

type Timestamp struct {
	time.Time
}

Timestamp implements Liquid Web's custom timestamp format.

func NewTimestamp

func NewTimestamp(s string) (*Timestamp, error)

NewTimestamp accepts a string and returns a new Timestamp.

func (*Timestamp) MarshalJSON

func (t *Timestamp) MarshalJSON() ([]byte, error)

MarshalJSON marshalls the Timestamp type.

func (*Timestamp) String

func (t *Timestamp) String() string

String returns the Timestamp in Liquid Web's timestamp format.

func (*Timestamp) UnmarshalJSON

func (t *Timestamp) UnmarshalJSON(b []byte) error

UnmarshalJSON parses Liquid Web's timestamp format.

Jump to

Keyboard shortcuts

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