2022-10-19 03:25:43 +04:00
|
|
|
package guestbook
|
|
|
|
|
|
|
|
const DateFormat = "2006-01-02 15:04:05"
|
|
|
|
|
|
|
|
type Guestbook interface {
|
|
|
|
Entries(page, pageSize int64) ([]*Entry, error)
|
2022-10-21 04:25:15 +04:00
|
|
|
Count() (int64, error)
|
2022-10-19 03:25:43 +04:00
|
|
|
NewEntry(entry *Entry) error
|
2023-01-12 03:27:45 +04:00
|
|
|
UpdateEntry(entry *Entry) (*Entry, error)
|
2022-10-19 03:25:43 +04:00
|
|
|
DeleteEntry(entryID int64) error
|
|
|
|
NewReply(reply *Reply) error
|
2023-01-12 03:27:45 +04:00
|
|
|
UpdateReply(reply *Reply) (*Entry, error)
|
2022-10-19 03:25:43 +04:00
|
|
|
DeleteReply(entryID int64) error
|
|
|
|
Close() error
|
|
|
|
}
|