types

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: AGPL-3.0, AGPL-3.0-or-later Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Duration

type Duration struct {
	time.Duration `validate:"required"`
}

Duration is a wrapper type that parses time duration from text.

func NewDuration

func NewDuration(duration time.Duration) Duration

NewDuration returns Duration wrapper

func (Duration) JSONSchema

func (Duration) JSONSchema() *jsonschema.Schema

JSONSchema returns a custom schema to be used for the JSON Schema generation of this type

func (*Duration) UnmarshalText

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

UnmarshalText unmarshalls time duration from text.

Jump to

Keyboard shortcuts

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