Documentation ¶
Index ¶
- Constants
- type Entry
- type Guestbook
- type Reply
- type SQLiteDatabase
- func (d *SQLiteDatabase) Close() error
- func (d *SQLiteDatabase) Count() (count int64, err error)
- func (d *SQLiteDatabase) DeleteEntry(entryID int64) error
- func (d *SQLiteDatabase) DeleteReply(entryID int64) error
- func (d *SQLiteDatabase) EditEntry(entry *Entry) error
- func (d *SQLiteDatabase) EditReply(reply *Reply) error
- func (d *SQLiteDatabase) Entries(page, pageSize int64) (entries []*Entry, err error)
- func (d *SQLiteDatabase) NewEntry(entry *Entry) error
- func (d *SQLiteDatabase) NewReply(reply *Reply) error
Constants ¶
View Source
const DateFormat = "2006-01-02 15:04:05"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Guestbook ¶
type Guestbook interface { Entries(page, pageSize int64) ([]*Entry, error) Count() (int64, error) NewEntry(entry *Entry) error EditEntry(entry *Entry) error DeleteEntry(entryID int64) error NewReply(reply *Reply) error EditReply(reply *Reply) error DeleteReply(entryID int64) error Close() error }
func NewSQLiteDB ¶
type Reply ¶
type SQLiteDatabase ¶
type SQLiteDatabase struct {
// contains filtered or unexported fields
}
func (*SQLiteDatabase) Close ¶
func (d *SQLiteDatabase) Close() error
func (*SQLiteDatabase) Count ¶
func (d *SQLiteDatabase) Count() (count int64, err error)
Count returns how much entries are in an `entry` table.
func (*SQLiteDatabase) DeleteEntry ¶
func (d *SQLiteDatabase) DeleteEntry(entryID int64) error
func (*SQLiteDatabase) DeleteReply ¶
func (d *SQLiteDatabase) DeleteReply(entryID int64) error
func (*SQLiteDatabase) EditEntry ¶
func (d *SQLiteDatabase) EditEntry(entry *Entry) error
func (*SQLiteDatabase) EditReply ¶
func (d *SQLiteDatabase) EditReply(reply *Reply) error
func (*SQLiteDatabase) Entries ¶
func (d *SQLiteDatabase) Entries(page, pageSize int64) (entries []*Entry, err error)
func (*SQLiteDatabase) NewEntry ¶
func (d *SQLiteDatabase) NewEntry(entry *Entry) error
NewEntry inserts a passed Entry struct and fills its ID field if successful.
func (*SQLiteDatabase) NewReply ¶
func (d *SQLiteDatabase) NewReply(reply *Reply) error
Click to show internal directories.
Click to hide internal directories.