Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Error ¶
func (Error) JSONAPISerialize ¶
type ErrorCompatible ¶ added in v0.0.2
type ErrorCompatible interface {
ToJSONAPIError() Error
}
type Relationship ¶
type Relationship struct {
Data ResourceIdentifier
}
func (Relationship) JSONAPISerialize ¶
func (j Relationship) JSONAPISerialize() (string, error)
type RelationshipHasMany ¶
type RelationshipHasMany struct {
Data []ResourceIdentifier
}
func (RelationshipHasMany) JSONAPISerialize ¶
func (j RelationshipHasMany) JSONAPISerialize() (string, error)
type Relationships ¶
type Relationships map[string]Serializer
func (Relationships) JSONAPISerialize ¶
func (j Relationships) JSONAPISerialize() (string, error)
type Resource ¶
type Resource struct { ID string Type string Attributes Serializer Relationships Relationships }
func (Resource) JSONAPISerialize ¶
type ResourceIdentifier ¶
func (ResourceIdentifier) JSONAPISerialize ¶
func (j ResourceIdentifier) JSONAPISerialize() (string, error)
type Resources ¶
type Resources struct { Data []Resource // contains filtered or unexported fields }
func (Resources) JSONAPISerialize ¶
type Root ¶
type Root[T Serializer] struct { Data T Errors Errors Meta Serializer Included Resources }
func NewManyFrom ¶
func NewManyFrom[T Resourcer](list []T, meta Serializer) *Root[Resources]
type Serializer ¶
type Serializers ¶
type Serializers []Serializer
func (Serializers) JSONAPISerialize ¶
func (s Serializers) JSONAPISerialize() (string, error)
Click to show internal directories.
Click to hide internal directories.