db

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const FTODO_TABLE_NAME = "ftodos"

Variables

This section is empty.

Functions

This section is empty.

Types

type Db

type Db struct {
	// contains filtered or unexported fields
}

func MakeDb

func MakeDb(DbName string) Db

func (*Db) Close

func (db *Db) Close()

func (*Db) DeleteTodo

func (db *Db) DeleteTodo(todo *models.Todo) bool

func (*Db) Drop

func (db *Db) Drop() bool

func (*Db) ExportData

func (db *Db) ExportData() bool

func (*Db) GetAllTodos

func (db *Db) GetAllTodos() []models.Todo

func (*Db) ImportData

func (db *Db) ImportData() bool

func (*Db) InsertTodo

func (db *Db) InsertTodo(todo *models.Todo) (*time.Time, bool)

func (*Db) UpdateTodo

func (db *Db) UpdateTodo(todo *models.Todo) bool

type IDb

type IDb interface {
	Close()
	DeleteTodo(todo *models.Todo) bool
	Drop() bool
	ExportData() bool
	GetAllTodos() []models.Todo
	ImportData() bool
	InsertTodo(todo *models.Todo) (*time.Time, bool)
	UpdateTodo(todo *models.Todo) bool
}

Jump to

Keyboard shortcuts

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