internal

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DateUSRepresentation represents a full-date as specified by RFC3339
	// See: http://goo.gl/xXOvVd
	DateUSRepresentation = "2006-01-02"
)

Variables

This section is empty.

Functions

func IsDate

func IsDate(str string) bool

IsDate returns true when the string is a valid date

Types

type BestDay

type BestDay struct {

	// date
	Date Date `json:"date,omitempty"`

	// total seconds
	TotalSeconds float64 `json:"total_seconds,omitempty"`
}

BestDay best day swagger:model best_day

func (*BestDay) MarshalBinary

func (m *BestDay) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*BestDay) UnmarshalBinary

func (m *BestDay) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*BestDay) Validate

func (m *BestDay) Validate(formats strfmt.Registry) error

Validate validates this best day

type Date

type Date time.Time

Date represents a date from the API

swagger:type date(us)

func (*Date) DeepCopy

func (in *Date) DeepCopy() *Date

DeepCopy copies the receiver into a new Date.

func (*Date) DeepCopyInto

func (in *Date) DeepCopyInto(out *Date)

DeepCopyInto copies the reciever and writes its value into out.

func (*Date) GetBSON

func (d *Date) GetBSON() (interface{}, error)

GetBSON returns the Date as a bson.M{} map.

func (Date) MarshalEasyJSON

func (d Date) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON writes the Date to a easyjson.Writer

func (Date) MarshalJSON

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

MarshalJSON returns the Date as JSON

func (Date) MarshalText

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

MarshalText serializes this date type to string

func (*Date) Scan

func (d *Date) Scan(raw interface{}) error

Scan scans a Date value from database driver type.

func (*Date) SetBSON

func (d *Date) SetBSON(raw bson.Raw) error

SetBSON sets the Date from raw bson data

func (Date) String

func (d Date) String() string

String converts this date into a string

func (*Date) UnmarshalEasyJSON

func (d *Date) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON sets the Date from a easyjson.Lexer

func (*Date) UnmarshalJSON

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

UnmarshalJSON sets the Date from JSON

func (*Date) UnmarshalText

func (d *Date) UnmarshalText(text []byte) error

UnmarshalText parses a text representation into a date type

func (Date) Value

func (d Date) Value() (driver.Value, error)

Value converts Date to a primitive value ready to written to a database.

Jump to

Keyboard shortcuts

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