timestamp

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ANSICwithTZ

type ANSICwithTZ time.Time

Like time.ANSIC but with MST

func (*ANSICwithTZ) MarshalJSON

func (ts *ANSICwithTZ) MarshalJSON() ([]byte, error)

func (*ANSICwithTZ) String

func (ts *ANSICwithTZ) String() string

func (*ANSICwithTZ) UnmarshalJSON

func (ts *ANSICwithTZ) UnmarshalJSON(text []byte) (err error)

type FluentdTimestamp added in v1.0.1

type FluentdTimestamp time.Time

func (*FluentdTimestamp) MarshalJSON added in v1.0.1

func (ts *FluentdTimestamp) MarshalJSON() ([]byte, error)

func (*FluentdTimestamp) String added in v1.0.1

func (ts *FluentdTimestamp) String() string

func (*FluentdTimestamp) UnmarshalJSON added in v1.0.1

func (ts *FluentdTimestamp) UnmarshalJSON(jsonBytes []byte) (err error)

type RFC3339

type RFC3339 time.Time

func Now added in v1.0.0

func Now() RFC3339

func Parse

func Parse(layout, value string) (RFC3339, error)

use these functions to parse all incoming dates to ensure UTC consistency

func Unix

func Unix(sec int64, nsec int64) RFC3339

func (*RFC3339) MarshalJSON

func (ts *RFC3339) MarshalJSON() ([]byte, error)

func (*RFC3339) String

func (ts *RFC3339) String() string

func (*RFC3339) UnmarshalJSON

func (ts *RFC3339) UnmarshalJSON(jsonBytes []byte) (err error)

type SuricataTimestamp added in v1.1.0

type SuricataTimestamp time.Time

func (*SuricataTimestamp) MarshalJSON added in v1.1.0

func (ts *SuricataTimestamp) MarshalJSON() ([]byte, error)

func (*SuricataTimestamp) String added in v1.1.0

func (ts *SuricataTimestamp) String() string

func (*SuricataTimestamp) UnmarshalJSON added in v1.1.0

func (ts *SuricataTimestamp) UnmarshalJSON(jsonBytes []byte) (err error)

type UnixFloat added in v1.0.1

type UnixFloat time.Time

UnixFloat for JSON timestamps that are in unix seconds + fractions of a second

func (*UnixFloat) MarshalJSON added in v1.0.1

func (ts *UnixFloat) MarshalJSON() ([]byte, error)

func (*UnixFloat) String added in v1.0.1

func (ts *UnixFloat) String() string

func (*UnixFloat) UnmarshalJSON added in v1.0.1

func (ts *UnixFloat) UnmarshalJSON(jsonBytes []byte) (err error)

type UnixMillisecond added in v0.3.0

type UnixMillisecond time.Time

UnixMillisecond for JSON timestamps that are in unix epoch milliseconds

func (*UnixMillisecond) MarshalJSON added in v0.3.0

func (ts *UnixMillisecond) MarshalJSON() ([]byte, error)

func (*UnixMillisecond) String added in v0.3.0

func (ts *UnixMillisecond) String() string

func (*UnixMillisecond) UnmarshalJSON added in v0.3.0

func (ts *UnixMillisecond) UnmarshalJSON(jsonBytes []byte) (err error)

Jump to

Keyboard shortcuts

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