Documentation
¶
Index ¶
- type MentionRoute
- type Route
- type Router
- func (router Router) AddMentionRoute(route MentionRoute)
- func (router Router) AddMentionRoutes(routes []MentionRoute)
- func (router Router) Can(u models.User, permissions []string) bool
- func (router Router) FindMentionRouteByMessage(message string) (MentionRoute, bool)
- func (router Router) FindMentionRouteByName(name string) (MentionRoute, bool)
- func (router Router) SetupDb()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MentionRoute ¶
type MentionRoute struct {
Route
Plugin func(api slack.Client, router Router, ev slackevents.AppMentionEvent, message string)
}
func (MentionRoute) Execute ¶
func (route MentionRoute) Execute(api slack.Client, router Router, ev slackevents.AppMentionEvent, message string)
type Router ¶
type Router struct {
MentionRoutes map[string]MentionRoute
DefaultMentionRoute MentionRoute
DeniedMentionRoute MentionRoute
DbConnection *gorm.DB
}
func (Router) AddMentionRoute ¶
func (router Router) AddMentionRoute(route MentionRoute)
func (Router) AddMentionRoutes ¶
func (router Router) AddMentionRoutes(routes []MentionRoute)
func (Router) FindMentionRouteByMessage ¶
func (router Router) FindMentionRouteByMessage(message string) (MentionRoute, bool)
func (Router) FindMentionRouteByName ¶
func (router Router) FindMentionRouteByName(name string) (MentionRoute, bool)
Click to show internal directories.
Click to hide internal directories.