Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
raw
history blame contribute delete
428 Bytes
package rotation
import (
"time"
"github.com/target/goalert/validation/validate"
)
type State struct {
RotationID string
ParticipantID string
Position int
ShiftStart time.Time
}
func (s State) Normalize() (*State, error) {
err := validate.Many(
validate.UUID("ParticipantID", s.ParticipantID),
validate.Range("Position", s.Position, 0, 9000),
)
if err != nil {
return nil, err
}
return &s, nil
}