Documentation
¶
Index ¶
- type Controller
- func (c Controller) ModalHandler(w http.ResponseWriter, r *http.Request)
- func (c Controller) ScheduleTask(tt TaskType, args ...interface{})
- func (c Controller) SelectHandler(w http.ResponseWriter, r *http.Request)
- func (c Controller) SlashHandler(w http.ResponseWriter, r *http.Request)
- func (c *Controller) TaskHandlerRepositoriesRefsUpdate()
- func (c *Controller) TaskHandlerRepositoriesUpdate(wg *sync.WaitGroup)
- func (c *Controller) TaskHandlerRepositoryRefsUpdate(wg *sync.WaitGroup, rk providers.RepositoryKey)
- func (c *Controller) TaskHandlerSlackUsersEmailsUpdate()
- type TaskController
- type TaskType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
Context context.Context
Providers providers.Providers
Store *store.Store
Slack slack.Slack
TaskController TaskController
}
Controller holds the necessary clients to run the app and handle requests
func (Controller) ModalHandler ¶
func (c Controller) ModalHandler(w http.ResponseWriter, r *http.Request)
ModalHandler handlers slack modal payloads
func (Controller) ScheduleTask ¶
func (c Controller) ScheduleTask(tt TaskType, args ...interface{})
ScheduleTask ..
func (Controller) SelectHandler ¶
func (c Controller) SelectHandler(w http.ResponseWriter, r *http.Request)
SelectHandler handles slack selector payloads
func (Controller) SlashHandler ¶
func (c Controller) SlashHandler(w http.ResponseWriter, r *http.Request)
SlashHandler handles slash command payloads
func (*Controller) TaskHandlerRepositoriesRefsUpdate ¶
func (c *Controller) TaskHandlerRepositoriesRefsUpdate()
TaskHandlerRepositoriesRefsUpdate updates all Repositories in the local store with refs fetched from its associated git provider
func (*Controller) TaskHandlerRepositoriesUpdate ¶
func (c *Controller) TaskHandlerRepositoriesUpdate(wg *sync.WaitGroup)
TaskHandlerRepositoriesUpdate updates the local store with repositories fetched from configured git providers
func (*Controller) TaskHandlerRepositoryRefsUpdate ¶
func (c *Controller) TaskHandlerRepositoryRefsUpdate(wg *sync.WaitGroup, rk providers.RepositoryKey)
TaskHandlerRepositoryRefsUpdate updates a Repository in the local store with refs fetched from its associated git provider
func (*Controller) TaskHandlerSlackUsersEmailsUpdate ¶
func (c *Controller) TaskHandlerSlackUsersEmailsUpdate()
TaskHandlerSlackUsersEmailsUpdate updates the local store with slack users emails fetched from the Slack API and local configuration (for custom aliases)
type TaskController ¶
TaskController holds task related clients
func NewTaskController ¶
func NewTaskController() (t TaskController)
NewTaskController initializes and returns a new TaskController object
type TaskType ¶
type TaskType string
TaskType represents the type of a task
const ( // TaskTypeRepositoriesUpdate updates the local store with repositories fetched from // configured git providers TaskTypeRepositoriesUpdate TaskType = "RepositoriesUpdate" // TaskTypeRepositoriesRefsUpdate updates all Repositories in the local store with refs fetched from // their associated git provider TaskTypeRepositoriesRefsUpdate TaskType = "RepositoriesRefsUpdate" // TaskTypeRepositoryRefsUpdate updates a Repository in the local store with refs fetched from // its associated git provider TaskTypeRepositoryRefsUpdate TaskType = "RepositoryRefsUpdate" // TaskTypeSlackUsersEmailsUpdate updates the local store with slack users emails fetched from // the Slack API and local configuration (for custom aliases) TaskTypeSlackUsersEmailsUpdate TaskType = "SlackUsersEmailsUpdate" )