Updates the current set of routes with new/modified and deleted route definitions in eskip format. In case the parsing of the document fails, it returns an error.
(upsertDoc string, deletedIDs []string)
| 115 | // route definitions in eskip format. In case the parsing of the |
| 116 | // document fails, it returns an error. |
| 117 | func (c *Client) UpdateDoc(upsertDoc string, deletedIDs []string) error { |
| 118 | routes, err := eskip.Parse(upsertDoc) |
| 119 | if err != nil { |
| 120 | return err |
| 121 | } |
| 122 | |
| 123 | c.Update(routes, deletedIDs) |
| 124 | return nil |
| 125 | } |
| 126 | |
| 127 | // Sets the Client to fail on the next call to LoadAll or LoadUpdate. |
| 128 | // Repeated call to FailNext will result the Client to fail as many |