configtype

package
v4.68.2 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MPL-2.0 Imports: 7 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Duration

type Duration struct {
	// contains filtered or unexported fields
}

Duration is a wrapper around time.Duration that should be used in config when a duration type is required. We wrap the time.Duration type so that the spec can be extended in the future to support other types of durations (e.g. a duration that is specified in days).

func NewDuration

func NewDuration(d time.Duration) Duration

func (*Duration) Duration

func (d *Duration) Duration() time.Duration

func (Duration) Equal

func (d Duration) Equal(other Duration) bool

func (Duration) JSONSchema added in v4.15.0

func (Duration) JSONSchema() *jsonschema.Schema

func (*Duration) MarshalJSON

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

func (*Duration) UnmarshalJSON

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

type Time added in v4.68.0

type Time struct {
	// contains filtered or unexported fields
}

Time is a wrapper around time.Time that should be used in config when a time type is required. We wrap the time.Time type so that the spec can be extended in the future to support other types of times

func ParseTime added in v4.68.0

func ParseTime(s string) (Time, error)

func (Time) AsTime added in v4.68.0

func (t Time) AsTime(now time.Time) time.Time

func (Time) IsZero added in v4.68.0

func (t Time) IsZero() bool

func (Time) JSONSchema added in v4.68.0

func (Time) JSONSchema() *jsonschema.Schema

func (Time) MarshalJSON added in v4.68.0

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

func (Time) String added in v4.68.0

func (t Time) String() string

func (*Time) UnmarshalJSON added in v4.68.0

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

Jump to

Keyboard shortcuts

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