types

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const DateFormat = "2006-01-02"

DateFormat represents a Go time format that matches the OpenAPI date.

Variables

This section is empty.

Functions

This section is empty.

Types

type Date

type Date struct {
	time.Time
}

Date represents a time that must conform DateFormat.

Date implements the JSON.Marshaler and JSON.Unmarshaler interfaces, and validates that date matches DateFormat.

func (Date) MarshalJSON

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

MarshalJSON implements the json.Marshaler interface.

func (Date) String

func (d Date) String() string

func (*Date) UnmarshalJSON

func (d *Date) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

type Email

type Email string

Email represents a string that must conform to an email format.

Email implements the JSON.Marshaler and JSON.Unmarshaler interfaces, and validates that the email matches the email format.

func (Email) MarshalJSON

func (e Email) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Email) UnmarshalJSON

func (e *Email) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

Jump to

Keyboard shortcuts

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