forked from mfcochauxlaberge/jsonapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathskeletons.go
More file actions
30 lines (24 loc) · 699 Bytes
/
skeletons.go
File metadata and controls
30 lines (24 loc) · 699 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package jsonapi
import "encoding/json"
type payloadSkeleton struct {
Data json.RawMessage `json:"data"`
Included []json.RawMessage `json:"included"`
Meta map[string]interface{} `json:"meta"`
}
type resourceSkeleton struct {
ID string `json:"id"`
Attributes json.RawMessage `json:"attributes"`
Relationships map[string]relationshipSkeleton `json:"relationships"`
}
type identifierSkeleton struct {
ID string `json:"id"`
Type string `json:"type"`
}
type relationshipSkeleton struct {
Links linksSkeleton
Data json.RawMessage
}
type linksSkeleton struct {
Self json.RawMessage
Related json.RawMessage
}