Added support for posting multiple records to UDR service at once

master
Sean Murphy 6 years ago
parent 7ad2fe692a
commit 30d34b0c45
  1. 12
      udr/udr.go

@ -36,6 +36,18 @@ type UDRService struct {
Endpoint string
}
// PostRecords takes a set of UDRRecords and posts them to the UDR endpoint
func (u *UDRService) PostRecords(records []UDRRecord) (success bool, err error) {
success = true
for _, r := range records {
success, err = u.PostRecord(r)
if !success {
return
}
}
return
}
// PostRecord takes a UDRRecord and posts it to the UDR endpoint
func (u *UDRService) PostRecord(r UDRRecord) (success bool, err error) {
val, _ := json.Marshal(r)

Loading…
Cancel
Save