Documentation ¶
Index ¶
Constants ¶
View Source
const DateFormat = "2006-01-02"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Event ¶
type Event struct { EventCommon Title string `json:"title" validate:"required"` }
type EventCommon ¶
type PersonCommon ¶
type PersonV1 ¶
type PersonV1 struct { PersonCommon FirstName string `json:"first_name,omitempty"` MiddleName string `json:"middle_name,omitempty"` LastName string `json:"last_name,omitempty"` Birthday *Date `json:"birthday,omitempty"` Deathday *Date `json:"deathday,omitempty" validate:"omitempty,gtefield=Birthday"` Alive *bool `json:"alive,omitempty"` }
type PersonV2 ¶
type PersonV2 struct { PersonCommon Names *Names `json:"names" validate:"required"` Parents *Parents `json:"parents,omitempty"` Birth *EventCommon `json:"birth,omitempty"` Death *EventCommon `json:"death,omitempty"` Events *[]Event `json:"events,omitempty" validate:"omitempty,dive,min=1"` }
type RelationCommon ¶
type RelationV1 ¶
type RelationV1 struct { RelationCommon Issues *[]PersonID `json:"issues,omitempty" validate:"omitempty,min=1"` Begin *Date `json:"begin,omitempty"` End *Date `json:"end,omitempty" validate:"omitempty,gtefield=Begin"` }
type RelationV2 ¶
type RelationV2 struct { RelationCommon Begin *EventCommon `json:"begin,omitempty"` End *EventCommon `json:"end,omitempty"` }
Click to show internal directories.
Click to hide internal directories.