duration

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ViperDecoderHook

func ViperDecoderHook() libmap.DecodeHookFuncType

Types

type Duration

type Duration time.Duration

func Days

func Days(i int64) Duration

func Hours

func Hours(i int64) Duration

func Minutes

func Minutes(i int64) Duration

func Parse

func Parse(s string) (Duration, error)

func ParseByte

func ParseByte(p []byte) (Duration, error)

func ParseDuration

func ParseDuration(d time.Duration) Duration

func Seconds

func Seconds(i int64) Duration

func (Duration) Days

func (d Duration) Days() int64

func (Duration) MarshalCBOR

func (d Duration) MarshalCBOR() ([]byte, error)

func (Duration) MarshalJSON

func (d Duration) MarshalJSON() ([]byte, error)

func (Duration) MarshalTOML

func (d Duration) MarshalTOML() ([]byte, error)

func (Duration) MarshalText

func (d Duration) MarshalText() ([]byte, error)

func (Duration) MarshalYAML

func (d Duration) MarshalYAML() (interface{}, error)

func (Duration) String

func (d Duration) String() string

func (Duration) Time

func (d Duration) Time() time.Duration

func (*Duration) UnmarshalCBOR

func (d *Duration) UnmarshalCBOR(bytes []byte) error

func (*Duration) UnmarshalJSON

func (d *Duration) UnmarshalJSON(bytes []byte) error

func (*Duration) UnmarshalTOML

func (d *Duration) UnmarshalTOML(i interface{}) error

func (*Duration) UnmarshalText

func (d *Duration) UnmarshalText(bytes []byte) error

func (*Duration) UnmarshalYAML

func (d *Duration) UnmarshalYAML(value *yaml.Node) error

Jump to

Keyboard shortcuts

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