Documentation ¶
Index ¶
- Constants
- Variables
- func InitDB() (err error)
- type DB
- func (d DB) AuthorizeToken(token string) (bool, error)
- func (d DB) Close() error
- func (d DB) GetLastUpdateID() (int, error)
- func (d DB) GetSubscriber(token string) (s Subscriber, err error)
- func (d DB) InsertNewMessage(userID, message string) error
- func (d DB) InsertNewUser(userID, username string) (string, error)
- func (d DB) InsertUpdateID(updateID int) error
- func (d DB) IsSubscriberExist(userID string) (bool, error)
- type Subscriber
Constants ¶
View Source
const DBfile string = "data.db"
DBfile
Variables ¶
Functions ¶
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB
func (DB) GetSubscriber ¶
func (d DB) GetSubscriber(token string) (s Subscriber, err error)
GetSubscriber
func (DB) InsertNewMessage ¶
InsertNewMessage
func (DB) InsertNewUser ¶
InsertNewUser
Click to show internal directories.
Click to hide internal directories.