Payload stutter
This commit is contained in:
parent
da523e0160
commit
419ef7b5cf
11 changed files with 43 additions and 43 deletions
|
@ -6,7 +6,7 @@ import (
|
|||
"github.com/thermokarst/bactdb/models"
|
||||
)
|
||||
|
||||
type CharacteristicPayload struct {
|
||||
type Characteristic struct {
|
||||
Characteristic *models.Characteristic `json:"characteristic"`
|
||||
Measurements *models.Measurements `json:"measurements"`
|
||||
Strains *models.Strains `json:"strains"`
|
||||
|
@ -14,7 +14,7 @@ type CharacteristicPayload struct {
|
|||
Meta *models.CharacteristicMeta `json:"meta"`
|
||||
}
|
||||
|
||||
type CharacteristicsPayload struct {
|
||||
type Characteristics struct {
|
||||
Characteristics *models.Characteristics `json:"characteristics"`
|
||||
Measurements *models.Measurements `json:"measurements"`
|
||||
Strains *models.Strains `json:"strains"`
|
||||
|
@ -22,10 +22,10 @@ type CharacteristicsPayload struct {
|
|||
Meta *models.CharacteristicMeta `json:"meta"`
|
||||
}
|
||||
|
||||
func (c *CharacteristicPayload) Marshal() ([]byte, error) {
|
||||
func (c *Characteristic) Marshal() ([]byte, error) {
|
||||
return json.Marshal(c)
|
||||
}
|
||||
|
||||
func (c *CharacteristicsPayload) Marshal() ([]byte, error) {
|
||||
func (c *Characteristics) Marshal() ([]byte, error) {
|
||||
return json.Marshal(c)
|
||||
}
|
||||
|
|
|
@ -6,20 +6,20 @@ import (
|
|||
"github.com/thermokarst/bactdb/models"
|
||||
)
|
||||
|
||||
type MeasurementPayload struct {
|
||||
type Measurement struct {
|
||||
Measurement *models.Measurement `json:"measurement"`
|
||||
}
|
||||
|
||||
type MeasurementsPayload struct {
|
||||
type Measurements struct {
|
||||
Strains *models.Strains `json:"strains"`
|
||||
Characteristics *models.Characteristics `json:"characteristics"`
|
||||
Measurements *models.Measurements `json:"measurements"`
|
||||
}
|
||||
|
||||
func (m *MeasurementPayload) Marshal() ([]byte, error) {
|
||||
func (m *Measurement) Marshal() ([]byte, error) {
|
||||
return json.Marshal(m)
|
||||
}
|
||||
|
||||
func (m *MeasurementsPayload) Marshal() ([]byte, error) {
|
||||
func (m *Measurements) Marshal() ([]byte, error) {
|
||||
return json.Marshal(m)
|
||||
}
|
||||
|
|
|
@ -6,22 +6,22 @@ import (
|
|||
"github.com/thermokarst/bactdb/models"
|
||||
)
|
||||
|
||||
type SpeciesPayload struct {
|
||||
type Species struct {
|
||||
Species *models.Species `json:"species"`
|
||||
Strains *models.Strains `json:"strains"`
|
||||
Meta *models.SpeciesMeta `json:"meta"`
|
||||
}
|
||||
|
||||
type ManySpeciesPayload struct {
|
||||
type ManySpecies struct {
|
||||
Species *models.ManySpecies `json:"species"`
|
||||
Strains *models.Strains `json:"strains"`
|
||||
Meta *models.SpeciesMeta `json:"meta"`
|
||||
}
|
||||
|
||||
func (s *SpeciesPayload) Marshal() ([]byte, error) {
|
||||
func (s *Species) Marshal() ([]byte, error) {
|
||||
return json.Marshal(s)
|
||||
}
|
||||
|
||||
func (s *ManySpeciesPayload) Marshal() ([]byte, error) {
|
||||
func (s *ManySpecies) Marshal() ([]byte, error) {
|
||||
return json.Marshal(s)
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"github.com/thermokarst/bactdb/models"
|
||||
)
|
||||
|
||||
type StrainPayload struct {
|
||||
type Strain struct {
|
||||
Strain *models.Strain `json:"strain"`
|
||||
Species *models.ManySpecies `json:"species"`
|
||||
Characteristics *models.Characteristics `json:"characteristics"`
|
||||
|
@ -14,7 +14,7 @@ type StrainPayload struct {
|
|||
Meta *models.StrainMeta `json:"meta"`
|
||||
}
|
||||
|
||||
type StrainsPayload struct {
|
||||
type Strains struct {
|
||||
Strains *models.Strains `json:"strains"`
|
||||
Species *models.ManySpecies `json:"species"`
|
||||
Characteristics *models.Characteristics `json:"characteristics"`
|
||||
|
@ -22,10 +22,10 @@ type StrainsPayload struct {
|
|||
Meta *models.StrainMeta `json:"meta"`
|
||||
}
|
||||
|
||||
func (s *StrainPayload) Marshal() ([]byte, error) {
|
||||
func (s *Strain) Marshal() ([]byte, error) {
|
||||
return json.Marshal(s)
|
||||
}
|
||||
|
||||
func (s *StrainsPayload) Marshal() ([]byte, error) {
|
||||
func (s *Strains) Marshal() ([]byte, error) {
|
||||
return json.Marshal(s)
|
||||
}
|
||||
|
|
|
@ -6,11 +6,11 @@ import (
|
|||
"github.com/thermokarst/bactdb/models"
|
||||
)
|
||||
|
||||
type UserPayload struct {
|
||||
type User struct {
|
||||
User *models.User `json:"user"`
|
||||
Meta *models.UserMeta `json:"meta"`
|
||||
}
|
||||
|
||||
func (u *UserPayload) Marshal() ([]byte, error) {
|
||||
func (u *User) Marshal() ([]byte, error) {
|
||||
return json.Marshal(u)
|
||||
}
|
||||
|
|
Reference in a new issue