Documentation ¶
Index ¶
- Constants
- Variables
- type AlertType
- type Currency
- type Date
- type Day
- type DayOfWeek
- type Email
- type ID
- type Language
- type Latitude
- type Longitude
- type Mobile
- type Month
- type NonNegativeFloat
- type NonNegativeInt
- type PhoneNumber
- type Price
- type RentalMethod
- type Time
- type Timestamp
- type Timezone
- type URI
- type URL
- type UserType
- type Year
Constants ¶
const ( RMKey RentalMethod = "KEY" RMCreditcard = "CREDITCARD" RMPaypass = "PAYPASS" RMApplepay = "APPLEPAY" RMAndroidpay = "ANDROIDPAY" RMTransitcard = "TRANSITCARD" RMAccountnumber = "ACCOUNTNUMBER" RMPhone = "PHONE" )
RentalMethod constants
Variables ¶
var ErrIDSpaces = errors.New("ID cannot contain spaces")
ErrIDSpaces ...
var ErrInvalidDay = errors.New("invalid day")
ErrInvalidDay ...
var ErrInvalidMonth = errors.New("invalid month")
ErrInvalidMonth ...
var ErrInvalidPriceType = errors.New("price must be string or float")
ErrInvalidPriceType returned when the .(type) of unmarshaled data is not a string or float
var ErrInvalidYear = errors.New("invalid year")
ErrInvalidYear ...
var ErrLatitude = errors.New("Latitude must in range [-90.0, 90.0]")
ErrLatitude ...
var ErrLongitude = errors.New("Longitude must in range [-180.0, 180.0]")
ErrLongitude ...
var ErrNonNegativeFloat = errors.New("NonNegativeFloat must have value >= 0.0")
ErrNonNegativeFloat error
var ErrNonNegativeInt = errors.New("NonNegativeInt must have value >= 0")
ErrNonNegativeInt error
var ErrURLScheme = errors.New("URL Scheme must be 'http' OR 'https'")
ErrURLScheme ...
var ErrUnknownAlertType = errors.New("unknown alert type")
ErrUnknownAlertType ...
var ErrUnknownDayOfWeek = errors.New("unknown day")
ErrUnknownDayOfWeek ...
var ErrUnknownMobile = errors.New("unknown mobile")
ErrUnknownMobile ...
var ErrUnknownRentalMethod = errors.New("unknown rental method")
ErrUnknownRentalMethod ...
var ErrUnknownUserType = errors.New("unknown user type")
ErrUnknownUserType ...
Functions ¶
This section is empty.
Types ¶
type AlertType ¶
type AlertType string
AlertType ...
func (*AlertType) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler interface
type Currency ¶
Currency ...
func (*Currency) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler interface
type Date ¶
Date ...
func (*Date) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler interface
type Day ¶
type Day NonNegativeInt
Day ...
func (*Day) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler interface
type DayOfWeek ¶
type DayOfWeek string
DayOfWeek ...
func (*DayOfWeek) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler interface
type Email ¶
Email ...
func (*Email) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler interface
type ID ¶
type ID string
ID type
func (*ID) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler interface
type Language ¶
Language ...
func (*Language) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler interface
type Latitude ¶
type Latitude float64
Latitude ...
func (*Latitude) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler interface
type Longitude ¶
type Longitude float64
Longitude ...
func (*Longitude) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler interface
type Mobile ¶
type Mobile string
Mobile tags
const ( Android Mobile = "android" IOS = "ios" )
Mobile constants
func (*Mobile) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler interface
type Month ¶
type Month NonNegativeInt
Month ...
func (*Month) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler interface
type NonNegativeFloat ¶
type NonNegativeFloat float64
NonNegativeFloat ...
func (NonNegativeFloat) String ¶
func (n NonNegativeFloat) String() string
func (*NonNegativeFloat) UnmarshalJSON ¶
func (n *NonNegativeFloat) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler interface
type NonNegativeInt ¶
type NonNegativeInt int
NonNegativeInt ...
func (NonNegativeInt) String ¶
func (n NonNegativeInt) String() string
func (*NonNegativeInt) UnmarshalJSON ¶
func (n *NonNegativeInt) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler interface
type Price ¶
type Price struct {
// contains filtered or unexported fields
}
Price is represented as NonNegativeFloat OR string
func (*Price) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler interface
type RentalMethod ¶
type RentalMethod string
RentalMethod ...
func (*RentalMethod) UnmarshalJSON ¶
func (r *RentalMethod) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler interface
type Time ¶
Time ...
func (*Time) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler interface
type Timestamp ¶
Timestamp ...
func (*Timestamp) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler interface
type Timezone ¶
Timezone ...
func (*Timezone) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler interface
type UserType ¶
type UserType string
UserType ...
func (*UserType) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler interface
type Year ¶
type Year NonNegativeInt
Year ...
func (*Year) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler interface