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 efb0cc13fa Golint
2015-10-05 10:34:21 -07:00

31 lines
690 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"`
Meta *models.UserMeta `json:"meta"`
}
// Users is a payload that sideloads all of the necessary entities for
// multiple users.
type Users struct {
Users *models.Users `json:"users"`
Meta *models.UserMeta `json:"meta"`
}
// 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)
}