(kiteProt *protocol.Kite, value *kontrolprotocol.RegisterValue)
| 293 | } |
| 294 | |
| 295 | func (p *Postgres) Add(kiteProt *protocol.Kite, value *kontrolprotocol.RegisterValue) error { |
| 296 | // check that the incoming URL is valid to prevent malformed input |
| 297 | _, err := url.Parse(value.URL) |
| 298 | if err != nil { |
| 299 | return err |
| 300 | } |
| 301 | |
| 302 | sqlQuery, args, err := insertKiteQuery(kiteProt, value.URL, value.KeyID) |
| 303 | if err != nil { |
| 304 | return err |
| 305 | } |
| 306 | |
| 307 | _, err = p.DB.Exec(sqlQuery, args...) |
| 308 | return err |
| 309 | } |
| 310 | |
| 311 | func (p *Postgres) Update(kiteProt *protocol.Kite, value *kontrolprotocol.RegisterValue) error { |
| 312 | // check that the incoming url is valid to prevent malformed input |
nothing calls this directly
no test coverage detected