Documentation ¶
Overview ¶
Package customtypes encapsulates our custom database field types
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalNullString ¶
func MarshalNullString(x NullString) graphql.Marshaler
MarshalNullString is used by graphql to marshal into a string
func MarshalNullTime ¶
MarshalNullTime is used by GraphQL to marshal the value
Types ¶
type NullString ¶
type NullString struct {
sql.NullString
}
NullString wrapper around sql.NullString
func UnmarshalNullString ¶
func UnmarshalNullString(s interface{}) (NullString, error)
UnmarshalNullString is used by graphql to unmarshal from a NullString into a string
func (NullString) IsZero ¶
func (x NullString) IsZero() bool
IsZero method is called by bson.IsZero in Mongo for type = NullTime
func (*NullString) MarshalBSONValue ¶
func (x *NullString) MarshalBSONValue() (bsontype.Type, []byte, error)
MarshalBSONValue method is called by bson.Marshal in Mongo for type = NullString
func (*NullString) MarshalJSON ¶
func (x *NullString) MarshalJSON() ([]byte, error)
MarshalJSON method is called by the JSON marshaller
func (*NullString) UnmarshalBSONValue ¶
func (x *NullString) UnmarshalBSONValue(t bsontype.Type, data []byte) error
UnmarshalBSONValue method is called by bson.Unmarshal in Mongo for type = NullString
func (*NullString) UnmarshalJSON ¶
func (x *NullString) UnmarshalJSON(data []byte) error
UnmarshalJSON method is called by the JSON unmarshaller
type NullTime ¶
NullTime wrapper around sql.NullTime
func UnmarshalNullTime ¶
UnmarshalNullTime is used by GraphQL to unmarshal the value
func (*NullTime) MarshalBSONValue ¶
MarshalBSONValue method is called by bson.Marshal in Mongo for type = NullTime
func (*NullTime) MarshalJSON ¶
MarshalJSON method is called by the JSON marshaller
func (*NullTime) UnmarshalBSONValue ¶
UnmarshalBSONValue method is called by bson.Unmarshal in Mongo for type = NullTime
func (*NullTime) UnmarshalJSON ¶
UnmarshalJSON method is called by the JSON unmarshaller