db

package
v1.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Terminews is a terminal based (TUI) RSS feed manager. Copyright (C) 2017 Alexandros Ntavelos, a[dot]ntavelos[at]gmail[dot]com

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Terminews is a terminal based (TUI) RSS feed manager. Copyright (C) 2017 Alexandros Ntavelos, a[dot]ntavelos[at]gmail[dot]com

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Terminews is a terminal based (TUI) RSS feed manager. Copyright (C) 2017 Alexandros Ntavelos, a[dot]ntavelos[at]gmail[dot]com

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Terminews is a terminal based (TUI) RSS feed manager. Copyright (C) 2017 Alexandros Ntavelos, a[dot]ntavelos[at]gmail[dot]com

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEventSql

func GetEventSql() string

func GetSiteSql

func GetSiteSql() string

Types

type Event

type Event struct {
	Id        int
	Title     string
	Author    string
	Url       string
	Summary   string
	Published string
}

func (Event) Host

func (e Event) Host() string

func (Event) String

func (e Event) String() string

type NotFound

type NotFound string

func (NotFound) Error

func (e NotFound) Error() string

type Site

type Site struct {
	Id   int
	Name string
	Url  string
}

func (Site) String

func (rr Site) String() string

type TDB

type TDB struct {
	*sql.DB
}

func InitDB

func InitDB(appDir string) (*TDB, error)

func (*TDB) AddEvent

func (tdb *TDB) AddEvent(e Event) error

func (*TDB) AddSite

func (tdb *TDB) AddSite(rr Site) error

func (*TDB) CreateTables

func (tdb *TDB) CreateTables() error

func (*TDB) DeleteEvent

func (tdb *TDB) DeleteEvent(id int) error

func (*TDB) DeleteSite

func (tdb *TDB) DeleteSite(id int) error

func (*TDB) DropTables

func (tdb *TDB) DropTables() error

func (*TDB) GetEventById

func (tdb *TDB) GetEventById(id int) (Event, error)

func (*TDB) GetEvents

func (tdb *TDB) GetEvents() ([]Event, error)

func (*TDB) GetSiteById

func (tdb *TDB) GetSiteById(id int) (Site, error)

func (*TDB) GetSiteByUrl

func (tdb *TDB) GetSiteByUrl(url string) (Site, error)

func (*TDB) GetSites

func (tdb *TDB) GetSites() ([]Site, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL