Expose AddRaw[User|News] for scripting
This commit is contained in:
parent
d0670c0b62
commit
83ab1b461d
4 changed files with 17 additions and 4 deletions
|
@ -1,6 +1,8 @@
|
|||
package database
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/go-pg/pg"
|
||||
)
|
||||
|
||||
|
@ -15,10 +17,12 @@ type DB interface {
|
|||
ActiveBook(id string) error
|
||||
IsBookActive(id string) bool
|
||||
AddUser(name string, pass string) error
|
||||
AddRawUser(name string, hpass []byte, salt []byte, role string) error
|
||||
GetRole(name string) (string, error)
|
||||
SetPassword(name string, pass string) error
|
||||
ValidPassword(name string, pass string) bool
|
||||
AddNews(text string) error
|
||||
AddRawNews(text string, date time.Time) error
|
||||
GetNews(num int, days int) (news []New, err error)
|
||||
AddStats(stats interface{}) error
|
||||
GetVisitedBooks() (books []Book, err error)
|
||||
|
|
Reference in a new issue