repo

package
v0.0.0-...-f1cee2f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

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

func NewMySQL() (*MySQL, error)

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

func (r *MySQL) BotHeartbeat() error

BotHeartbeat updates the bot keep-alive timestamp

func (*MySQL) BotName

func (r *MySQL) BotName() string

func (*MySQL) ChannelsAndGroups

func (r *MySQL) ChannelsAndGroups(team string) (*domain.Configuration, error)

func (*MySQL) Close

func (r *MySQL) Close() error

func (*MySQL) DelOAuthState

func (r *MySQL) DelOAuthState(state string) error

func (*MySQL) GlobalStatistics

func (r *MySQL) GlobalStatistics() (*domain.Statistics, error)

func (*MySQL) IsVerboseChannel

func (r *MySQL) IsVerboseChannel(team, channel string) (bool, error)

func (*MySQL) JoinSlackChannel

func (r *MySQL) JoinSlackChannel(email string) error

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 (r *MySQL) QueueMessages(names []string, messageType string) (messages []*domain.DBQueueMessage, err error)

func (*MySQL) SetChannelsAndGroups

func (r *MySQL) SetChannelsAndGroups(configuration *domain.Configuration) error

func (*MySQL) SetOAuthState

func (r *MySQL) SetOAuthState(state *domain.OAuthState) error

func (*MySQL) SetTeam

func (r *MySQL) SetTeam(team *domain.Team) error

func (*MySQL) SetTeamAndUser

func (r *MySQL) SetTeamAndUser(team *domain.Team, user *domain.User) error

func (*MySQL) SetUser

func (r *MySQL) SetUser(user *domain.User) error

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) Team

func (r *MySQL) Team(id string) (*domain.Team, error)

func (*MySQL) TeamByExternalID

func (r *MySQL) TeamByExternalID(id string) (*domain.Team, error)

func (*MySQL) TeamMembers

func (r *MySQL) TeamMembers(team string) ([]domain.User, error)

func (*MySQL) Teams

func (r *MySQL) Teams() ([]domain.Team, error)

func (*MySQL) TotalMessages

func (r *MySQL) TotalMessages() (int, error)

func (*MySQL) UpdateStatistics

func (r *MySQL) UpdateStatistics(stats *domain.Statistics) error

func (*MySQL) User

func (r *MySQL) User(id string) (*domain.User, error)

func (*MySQL) UserByExternalID

func (r *MySQL) UserByExternalID(id string) (*domain.User, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL