Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AllGender = []Gender{ GenderM, GenderF, }
AllGender retrieve all available gender identifiers
Functions ¶
func MarshalTimestamp ¶
MarshalTimestamp custom graphql marshalling for Timestamps
Types ¶
type Crocodile ¶
type Crocodile struct { ID int `json:"id"` Name string `json:"name"` Sex Gender `json:"sex"` BirthDate *Timestamp `json:"date_of_birth"` Age int `json:"age"` }
Crocodile main crocodile model definition
type CrocodileInput ¶
type CrocodileInput struct { Name string `json:"name"` Sex Gender `json:"sex"` BirthDate *Timestamp `json:"date_of_birth"` Age int `json:"age"` }
CrocodileInput DTO used to create new/edit crocs
type Gender ¶
type Gender string
Gender constant used to define available gender types
func (Gender) MarshalGQL ¶
MarshalGQL custom gender GraphQL marshalling
func (*Gender) UnmarshalGQL ¶
UnmarshalGQL custom gender GraphQL unmarshalling
type Timestamp ¶
Timestamp holder used to add custom date marshalling/unmarshalling
func UnmarshalTimestamp ¶
UnmarshalTimestamp custom graphql unmarshalling for Timestamps
func (*Timestamp) MarshalJSON ¶
MarshalJSON custom timestamp marshaller
func (*Timestamp) UnmarshalJSON ¶
UnmarshalJSON custom timestamp unmarshaller
Click to show internal directories.
Click to hide internal directories.