Versions in this module Expand all Collapse all v0 v0.2.0 Aug 18, 2019 Changes in this version + type Contact struct + Client int64 + Created time.Time + Email string + ID int64 + Name string + Phone string type Invoices + func (db *Invoices) AddContact(c *Contact) (int64, error) + func (db *Invoices) GetAllContacts() ([]*Contact, error) + func (db *Invoices) GetContact(id int64) *Contact + func (db *Invoices) GetContacts(keyword string) ([]*Contact, error) + func (db *Invoices) RemoveContact(id int64) error + func (db *Invoices) UpdateContact(c *Contact) error v0.1.0 Aug 17, 2019 Changes in this version + func EnsureDBExists(cfg *config.Config) error + func TestDBExistence(cfg *config.Config) error + func TestDBHost(cfg *config.Config) error + type Client struct + Address string + Company string + Created time.Time + Email string + ID int64 + Phone string + VATID string + type Invoices struct + func Open(host, port, user, password, dbname string, ssl bool) (*Invoices, error) + func (db *Invoices) AddClient(c *Client) (int64, error) + func (db *Invoices) GetAllClients() ([]*Client, error) + func (db *Invoices) GetClient(id int64) *Client + func (db *Invoices) GetClients(keyword string) ([]*Client, error) + func (db *Invoices) RemoveClient(keyword string) error + func (db *Invoices) UpdateClient(c *Client) error