timeconv

package
v0.1.12 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Seconds

type Seconds time.Duration

Seconds type is wrapper for time.Duration sent in seconds with fast (un)marshal functions

func (*Seconds) Duration

func (s *Seconds) Duration() time.Duration

func (Seconds) MarshalJSON

func (s Seconds) MarshalJSON() ([]byte, error)

func (*Seconds) UnmarshalJSON

func (s *Seconds) UnmarshalJSON(b []byte) error

type Timestamp

type Timestamp struct {
	time.Time
}

Timestamp type is time.Time wrapper with null support and optimized (un)marshal functions

func (Timestamp) MarshalJSON

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

func (*Timestamp) UnmarshalJSON

func (t *Timestamp) UnmarshalJSON(date []byte) (err error)

Jump to

Keyboard shortcuts

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