This commit is contained in:
Matthew Dillon 2015-10-02 16:20:07 -07:00
parent a880fdea82
commit efb0cc13fa
41 changed files with 569 additions and 386 deletions

View file

@ -6,22 +6,28 @@ import (
"github.com/thermokarst/bactdb/models"
)
// Species is a payload that sideloads all of the necessary entities for a
// particular species.
type Species struct {
Species *models.Species `json:"species"`
Strains *models.Strains `json:"strains"`
Meta *models.SpeciesMeta `json:"meta"`
}
// ManySpecies is a payload that sideloads all of the necessary entities for
// multiple species.
type ManySpecies struct {
Species *models.ManySpecies `json:"species"`
Strains *models.Strains `json:"strains"`
Meta *models.SpeciesMeta `json:"meta"`
}
// Marshal satisfies the CRUD interfaces.
func (s *Species) Marshal() ([]byte, error) {
return json.Marshal(s)
}
// Marshal satisfies the CRUD interfaces.
func (s *ManySpecies) Marshal() ([]byte, error) {
return json.Marshal(s)
}