Versions in this module Expand all Collapse all v2 v2.7.3 May 17, 2025 v2.7.2 May 17, 2025 Changes in this version + func Jsonify(s string) string + func Marshal(data interface{}) ([]byte, error) + func MarshalWithURLs(data interface{}, information ServerInformation) ([]byte, error) + func Pluralize(word string) string + func Unmarshal(data []byte, target interface{}) error + type Data struct + Attributes json1.RawMessage + ID string + Links Links + Relationships map[string]Relationship + Type string + type DataContainer struct + DataArray []Data + DataObject *Data + func (c *DataContainer) MarshalJSON() ([]byte, error) + func (c *DataContainer) UnmarshalJSON(payload []byte) error + type Document struct + Data *DataContainer + Included []Data + Links Links + Meta map[string]interface{} + func MarshalToStruct(data interface{}, information ServerInformation) (*Document, error) + type EditToManyRelations interface + AddToManyIDs func(name string, IDs []string) error + DeleteToManyIDs func(name string, IDs []string) error + type EntityNamer interface + GetName func() string + type Link struct + Href string + Meta Meta + func (l *Link) UnmarshalJSON(payload []byte) error + func (l Link) Empty() bool + func (l Link) MarshalJSON() ([]byte, error) + type Links map[string]interface + type MarshalCustomLinks interface + GetCustomLinks func(string) Links + type MarshalCustomRelationshipMeta interface + GetCustomMeta func(string) map[string]Meta + type MarshalIdentifier interface + GetAttributes func() map[string]interface{} + GetID func() string + type MarshalIncludedRelations interface + GetReferencedStructs func() []MarshalIdentifier + type MarshalLinkedRelations interface + GetReferencedIDs func() []ReferenceID + type MarshalReferences interface + GetReferences func() []Reference + type Meta map[string]interface + type Reference struct + IsNotLoaded bool + Name string + Relationship RelationshipType + Type string + type ReferenceID struct + ID string + Name string + Relationship RelationshipType + Type string + type Relationship struct + Data *RelationshipDataContainer + Links Links + Meta map[string]interface{} + type RelationshipData struct + ID string + Type string + type RelationshipDataContainer struct + DataArray []RelationshipData + DataObject *RelationshipData + func (c *RelationshipDataContainer) MarshalJSON() ([]byte, error) + func (c *RelationshipDataContainer) UnmarshalJSON(payload []byte) error + type RelationshipType int + const DefaultRelationship + const ToManyRelationship + const ToOneRelationship + type ServerInformation interface + GetBaseURL func() string + GetPrefix func() string + type UnmarshalIdentifier interface + SetAttributes func(map[string]interface{}) + SetID func(string) error + type UnmarshalToManyRelations interface + SetToManyReferenceIDs func(name string, IDs []map[string]interface{}) error + type UnmarshalToOneRelations interface + SetToOneReferenceID func(name, ID string) error Other modules containing this package github.com/artpar/api2go