This repository has been archived on 2025-03-30. You can view files and clone it, but cannot push or open issues or pull requests.
bactdb/payloads/species.go
Matthew Dillon a482a083bf Drop metadata attr
Fixes #26
2015-11-13 13:08:08 -07:00

31 lines
747 B
Go

package payloads
import (
"encoding/json"
"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"`
}
// 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"`
}
// 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)
}