MCPcopy Index your code
hub / github.com/koding/kite / Add

Method Add

kontrol/postgres.go:295–309  ·  view source on GitHub ↗
(kiteProt *protocol.Kite, value *kontrolprotocol.RegisterValue)

Source from the content-addressed store, hash-verified

293}
294
295func (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
311func (p *Postgres) Update(kiteProt *protocol.Kite, value *kontrolprotocol.RegisterValue) error {
312 // check that the incoming url is valid to prevent malformed input

Callers

nothing calls this directly

Calls 1

insertKiteQueryFunction · 0.85

Tested by

no test coverage detected