JSON API new spec with deref

This commit is contained in:
Bel LaPointe
2020-07-22 20:40:44 -06:00
parent 4d667e7b11
commit 710e20d6e0
8 changed files with 86 additions and 46 deletions

View File

@@ -12,13 +12,14 @@ const (
)
type One struct {
Name string `bson:"_id,omitempty"`
Type string `bson:"type,omitempty"`
Title string `bson:"title,omitempty"`
Image string `bson:"image,omitempty"`
Text string `bson:"text,omitempty"`
Modified int64 `bson:"modified,omitempty"`
Connections []Peer `bson:"connections,omitempty"`
Name string `bson:"_id,omitempty" json:"name,omitempty"`
Type string `bson:"type,omitempty" json:"type,omitempty"`
Title string `bson:"title,omitempty" json:"title,omitempty"`
Image string `bson:"image,omitempty" json:"image,omitempty"`
Text string `bson:"text,omitempty" json:"text,omitempty"`
Relationship string `bson:"relationship,omitempty" json:"relationship,omitempty"`
Modified int64 `bson:"modified,omitempty" json:"modified,omitempty"`
Connections []One `bson:"connections,omitempty" json:"connections,omitempty"`
}
func (o One) Query() One {

View File

@@ -1,6 +0,0 @@
package entity
type Peer struct {
Name string `bson:"_id,omitempty"`
Relationship string `bson:"relationship,omitempty"`
}