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/users.go
Matthew Dillon a482a083bf Drop metadata attr
Fixes #26
2015-11-13 13:08:08 -07:00

29 lines
608 B
Go

package payloads
import (
"encoding/json"
"github.com/thermokarst/bactdb/models"
)
// User is a payload that sideloads all of the necessary entities for a
// particular user.
type User struct {
User *models.User `json:"user"`
}
// Users is a payload that sideloads all of the necessary entities for
// multiple users.
type Users struct {
Users *models.Users `json:"users"`
}
// Marshal satisfies the CRUD interfaces.
func (u *User) Marshal() ([]byte, error) {
return json.Marshal(u)
}
// Marshal satisfies the CRUD interfaces.
func (u *Users) Marshal() ([]byte, error) {
return json.Marshal(u)
}