18F/e-QIP-prototype

View on GitHub
api/checkboxgroup.go

Summary

Maintainability
A
0 mins
Test Coverage
package api

import "encoding/json"

// CheckboxGroup is a basic input.
type CheckboxGroup struct {
    ID     int      `json:"-"`
    Values []string `json:"values"`
}

// Unmarshal bytes in to the entity properties.
func (entity *CheckboxGroup) Unmarshal(raw []byte) error {
    return json.Unmarshal(raw, entity)
}

// Marshal to payload structure
func (entity *CheckboxGroup) Marshal() Payload {
    return MarshalPayloadEntity("checkboxgroup", entity)
}