Documentation
¶
Index ¶
- Constants
- func FromMap(jsonMap map[string]any) (any, error)
- func IsLinkedProperty(jsonMap map[string]any) (bool, error)
- func IsModel(jsonMap map[string]any) (bool, error)
- func IsProxy(r NullableRelationship) bool
- func IsRelationship(jsonMap map[string]any) (bool, error)
- func IsType(jsonMap map[string]any, schemaType Type) (bool, error)
- type Element
- type Elements
- type LinkedProperty
- type Model
- type NullableRelationship
- type Property
- type Relationship
- type Type
Constants ¶
View Source
const DisplayNameKey = "displayName"
View Source
const FromKey = "from"
View Source
const IDKey = "id"
View Source
const NameKey = "name"
View Source
const PositionKey = "position"
View Source
const ProxyDisplayName = "Belongs To"
View Source
const ProxyName = "belongs_to"
View Source
const ToKey = "to"
View Source
const TypeKey = "type"
TypeKey and other *Keys must match the json struct tag for the property
Variables ¶
This section is empty.
Functions ¶
func IsProxy ¶
func IsProxy(r NullableRelationship) bool
Types ¶
type Element ¶
type Element struct { ID string `json:"id"` Type string `json:"type"` Name string `json:"name"` DisplayName string `json:"displayName"` }
func ElementFromMap ¶
func (Element) IsLinkedProperty ¶
type Elements ¶
type Elements struct { Models []Model Relationships []Relationship LinkedProperties []LinkedProperty }
type LinkedProperty ¶
type LinkedProperty struct { Element From string `json:"from"` To string `json:"to"` Position int `json:"position"` }
func LinkedPropertyFromMap ¶
func LinkedPropertyFromMap(jsonMap map[string]any) (*LinkedProperty, error)
type NullableRelationship ¶
type NullableRelationship struct { ID string `json:"id"` Name string `json:"name"` DisplayName string `json:"displayName"` From *string `json:"from"` To *string `json:"to"` }
NullableRelationship represents an item in metadata/schema/relationships.json where unlike a usual Relationship, the special proxy relationship will have "to" and "from" null.
func (NullableRelationship) IsProxy ¶
func (r NullableRelationship) IsProxy() bool
type Relationship ¶
func RelationshipFromMap ¶
func RelationshipFromMap(jsonMap map[string]any) (*Relationship, error)
Click to show internal directories.
Click to hide internal directories.