Documentation
¶
Index ¶
- func GetArgs(r security.Request) []string
- func InsertUserToBooks(user int64, books []expiraBot.Books) []expiraBot.Books
- func Start(key string, database expiraBot.Database, debug bool)
- func ValidateLogin(login string) bool
- func ValidatePassword(password string) bool
- type Event
- func (e Event) Books(r security.Request)
- func (e Event) ErrorCommand(r security.Request)
- func (e Event) Help(r security.Request)
- func (e Event) Insert(r security.Request)
- func (e *Event) Next(r security.Request)
- func (e Event) SendBooksMessage(r security.Request, books []expiraBot.Books)
- func (e Event) SendErrorCommandMessage(r security.Request)
- func (e Event) SendHelpMessage(r security.Request)
- func (e Event) SendInsertMessage(r security.Request)
- func (e Event) SendStartMessage(r security.Request)
- func (e Event) SendUpdateMessage(r security.Request, message string)
- func (e Event) Start(r security.Request)
- func (e Event) Update(r security.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetArgs ¶
Split the command from the arguments Receive a user request Return a string slice that have every argument sended by the user
func InsertUserToBooks ¶
The books slice received from crawler don't have the user id Receive as argument the user id and the books slice Return the books slice populate with the user id
func ValidateLogin ¶
Validate the login format Receive a login in a string format Return true if the format is correct, false otherwise
func ValidatePassword ¶
Validate the password format Receive a password in a string format Return true if the format is correct, false otherwise
Types ¶
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
func (Event) ErrorCommand ¶
ErrorCommand Send a message to the user when he try to use a invalid command
func (Event) SendBooksMessage ¶
func (Event) SendErrorCommandMessage ¶
func (Event) SendHelpMessage ¶
func (Event) SendInsertMessage ¶
func (Event) SendStartMessage ¶
func (Event) SendUpdateMessage ¶
Click to show internal directories.
Click to hide internal directories.