Documentation ¶
Index ¶
- Variables
- type MySQL
- func (r *MySQL) BotHeartbeat() error
- func (r *MySQL) BotName() string
- func (r *MySQL) ChannelsAndGroups(team string) (*domain.Configuration, error)
- func (r *MySQL) Close() error
- func (r *MySQL) DelOAuthState(state string) error
- func (r *MySQL) GlobalStatistics() (*domain.Statistics, error)
- func (r *MySQL) IsVerboseChannel(team, channel string) (bool, error)
- func (r *MySQL) JoinSlackChannel(email string) error
- func (r *MySQL) OAuthState(id string) (*domain.OAuthState, error)
- func (r *MySQL) PostMessage(message *domain.DBQueueMessage) error
- func (r *MySQL) PostMessageToAll(message *domain.DBQueueMessage) error
- func (r *MySQL) QueueMessages(names []string, messageType string) (messages []*domain.DBQueueMessage, err error)
- func (r *MySQL) SetChannelsAndGroups(configuration *domain.Configuration) error
- func (r *MySQL) SetOAuthState(state *domain.OAuthState) error
- func (r *MySQL) SetTeam(team *domain.Team) error
- func (r *MySQL) SetTeamAndUser(team *domain.Team, user *domain.User) error
- func (r *MySQL) SetUser(user *domain.User) error
- func (r *MySQL) Statistics(team string) (*domain.Statistics, error)
- func (r *MySQL) StoreMaliciousContent(convicted *domain.MaliciousContent) error
- func (r *MySQL) Team(id string) (*domain.Team, error)
- func (r *MySQL) TeamByExternalID(id string) (*domain.Team, error)
- func (r *MySQL) TeamMembers(team string) ([]domain.User, error)
- func (r *MySQL) Teams() ([]domain.Team, error)
- func (r *MySQL) TotalMessages() (int, error)
- func (r *MySQL) UpdateStatistics(stats *domain.Statistics) error
- func (r *MySQL) User(id string) (*domain.User, error)
- func (r *MySQL) UserByExternalID(id string) (*domain.User, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound is a not found error if Get does not retrieve a value ErrNotFound = errors.New("not_found") )
Functions ¶
This section is empty.
Types ¶
type MySQL ¶
type MySQL struct {
// contains filtered or unexported fields
}
func NewMySQL ¶
NewMySQL repo is returned To create the relevant MySQL databases on local please do the following:
mysql -u root (if password is set then add -p) mysql> CREATE DATABASE demisto CHARACTER SET = utf8; mysql> CREATE DATABASE demistot CHARACTER SET = utf8; mysql> CREATE USER demisto IDENTIFIED BY 'password'; mysql> GRANT ALL on demisto.* TO demisto; mysql> GRANT ALL on demistot.* TO demisto; mysql> drop user ''@'localhost';
The last command drops the anonymous user
func (*MySQL) BotHeartbeat ¶
BotHeartbeat updates the bot keep-alive timestamp
func (*MySQL) ChannelsAndGroups ¶
func (r *MySQL) ChannelsAndGroups(team string) (*domain.Configuration, error)
func (*MySQL) DelOAuthState ¶
func (*MySQL) GlobalStatistics ¶
func (r *MySQL) GlobalStatistics() (*domain.Statistics, error)
func (*MySQL) IsVerboseChannel ¶
func (*MySQL) JoinSlackChannel ¶
func (*MySQL) OAuthState ¶
func (r *MySQL) OAuthState(id string) (*domain.OAuthState, error)
func (*MySQL) PostMessage ¶
func (r *MySQL) PostMessage(message *domain.DBQueueMessage) error
func (*MySQL) PostMessageToAll ¶
func (r *MySQL) PostMessageToAll(message *domain.DBQueueMessage) error
func (*MySQL) QueueMessages ¶
func (*MySQL) SetChannelsAndGroups ¶
func (r *MySQL) SetChannelsAndGroups(configuration *domain.Configuration) error
func (*MySQL) SetOAuthState ¶
func (r *MySQL) SetOAuthState(state *domain.OAuthState) error
func (*MySQL) SetTeamAndUser ¶
func (*MySQL) Statistics ¶
func (r *MySQL) Statistics(team string) (*domain.Statistics, error)
func (*MySQL) StoreMaliciousContent ¶
func (r *MySQL) StoreMaliciousContent(convicted *domain.MaliciousContent) error
func (*MySQL) TotalMessages ¶
func (*MySQL) UpdateStatistics ¶
func (r *MySQL) UpdateStatistics(stats *domain.Statistics) error
Click to show internal directories.
Click to hide internal directories.