Documentation ¶
Index ¶
- Constants
- type DB
- func (db *DB) AllIslands() (islands []*Island, err error)
- func (db *DB) ChangePassword(newPwd string) error
- func (db *DB) CheckPassword(userInputPwd string) error
- func (db *DB) CreateIsland(island *Island) error
- func (db *DB) DeleteIsland(id string) error
- func (db *DB) DeleteMessage(msgID, islandID string) error
- func (db *DB) Exec(query string, args ...interface{}) (err error)
- func (db *DB) GetIslandByID(id string) (Island, error)
- func (db *DB) GetSecretKey() ([]byte, error)
- func (db *DB) GetTitles() (Titles, error)
- func (db *DB) MoreIslandMessages(id string, datetime int64) ([]*Message, error)
- func (db *DB) MoreMessages(datetime int64, all bool) ([]*Message, error)
- func (db *DB) Open(dbPath string) (err error)
- func (db *DB) PostMessage(body, islandID string, islandHide bool) (*Message, error)
- func (db *DB) SearchMessages(pattern string, datetime int64) ([]*Message, error)
- func (db *DB) UpdateIsland(island *Island) error
- func (db *DB) UpdateSubtitle(subtitle string) error
- func (db *DB) UpdateTitle(title string) error
- func (db *DB) UpdateTitles(title, subtitle string) error
- type Island
- type Message
- type Newsletter
- type Row
- type SimpleMsg
- type TX
- type Titles
Constants ¶
View Source
const EveryPage = 30
每一页有多少条消息。注意:如果修改该数值,同时需要修改 util.ts 中的 everyPage
View Source
const (
SecretKeyName = "secret-key"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
func (*DB) AllIslands ¶
func (*DB) ChangePassword ¶
func (*DB) CheckPassword ¶
func (*DB) CreateIsland ¶
func (*DB) DeleteIsland ¶
func (*DB) DeleteMessage ¶
func (*DB) GetSecretKey ¶
func (*DB) MoreIslandMessages ¶
MoreIslandMessages 获取指定小岛的更多消息。
func (*DB) MoreMessages ¶
MoreMessages 获取公开小岛或全部小岛的更多消息。
func (*DB) PostMessage ¶
func (*DB) SearchMessages ¶
func (*DB) UpdateIsland ¶
func (*DB) UpdateSubtitle ¶
func (*DB) UpdateTitle ¶
func (*DB) UpdateTitles ¶
type Newsletter ¶
type Newsletter = model.Newsletter
Click to show internal directories.
Click to hide internal directories.