func (pg *PostgreSQL) CreateURI(projectName string, ip string, port string, URI models.URI) error {
	events.NewEventURI(URI)
	return errors.New("Not implemented yet")
}
CreateURI is the public wrapper to create a new URI in the database.
package postgresql
import (
	"errors"
	"github.com/netm4ul/netm4ul/core/events"
	"github.com/netm4ul/netm4ul/core/database/models"
)
func (pg *PostgreSQL) createOrUpdateURI(projectName string, ip string, port string, uri pgURI) error {
	proj := pgProject{}
	res := pg.db.Where("name = ?", projectName).First(&proj)
	if res.Error != nil {
		return errors.New("Could not match corresponding project for port : " + res.Error.Error())
	}
	pip := pgIP{}
	res = pg.db.Where("value = ?", ip).Where("project_id = ?", proj.ID).First(&pip)
	if res.Error != nil {
		return errors.New("Could not match corresponding ip for port : " + res.Error.Error())
	}
	pport := pgPort{}
	res = pg.db.Where("ip_id = ?", pip.ID).First(&pport)
	if res.Error != nil {
		return errors.New("Could not match corresponding ip for port : " + res.Error.Error())
	}
	uri.PortID = pport.ID
	res = pg.db.Where("port_id = ?", pport.ID).FirstOrCreate(&uri)
	if res.Error != nil {
		return res.Error
	}
	return nil
}
func (pg *PostgreSQL) CreateOrUpdateURI(projectName string, ip string, port string, uri models.URI) error {
	puris := pgURI{}
	puris.FromModel(uri)
	err := pg.createOrUpdateURI(projectName, ip, port, puris)
	if err != nil {
		return err
	}
	return nil
}