app

package
v0.0.0-...-780aa95 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthMiddleware

func AuthMiddleware(a *App) func(next http.Handler) http.Handler

func ConvertTimeToUserRegion

func ConvertTimeToUserRegion(r *http.Request, t string) (*time.Time, error)

func EventMiddleware

func EventMiddleware(a *App) func(next http.Handler) http.Handler

func HTMXEventRedirect

func HTMXEventRedirect(w http.ResponseWriter, r *http.Request, a *App)

func HTMXRedirect

func HTMXRedirect(w http.ResponseWriter, r *http.Request, url string)

func IsSSERequest

func IsSSERequest(r *http.Request) bool

func IsXHRRequest

func IsXHRRequest(r *http.Request) bool

func RenderError

func RenderError(w http.ResponseWriter)

func Resource

func Resource(w http.ResponseWriter, code int, v interface{})

Types

type App

type App struct {
	Config      *config.Config
	Storage     storage.Storage
	Store       *store.Store
	Event       *serverevent.Server
	SlackApi    *slack.Client
	Socket      *socketmode.Client
	SlackAction *slackaction.SlackAction
}

func New

func New(config *config.Config, storage storage.Storage, store *store.Store, event *serverevent.Server, slackApi *slack.Client, socket *socketmode.Client, slackAction *slackaction.SlackAction) *App

func (*App) HandleAuth

func (a *App) HandleAuth(w http.ResponseWriter, r *http.Request)

func (*App) HandleChatBubbleRender

func (a *App) HandleChatBubbleRender(w http.ResponseWriter, r *http.Request)

func (*App) HandleCreateFileMessage

func (a *App) HandleCreateFileMessage(w http.ResponseWriter, r *http.Request)

func (*App) HandleCreateNewMessage

func (a *App) HandleCreateNewMessage(w http.ResponseWriter, r *http.Request)

func (*App) HandleDeleteFile

func (a *App) HandleDeleteFile(w http.ResponseWriter, r *http.Request)

func (*App) HandleDeleteMessage

func (a *App) HandleDeleteMessage(w http.ResponseWriter, r *http.Request)

func (*App) HandleDeleteSession

func (a *App) HandleDeleteSession(w http.ResponseWriter, r *http.Request)

func (*App) HandleDownloadFile

func (a *App) HandleDownloadFile(w http.ResponseWriter, r *http.Request)

func (*App) HandleEditCancel

func (a *App) HandleEditCancel(w http.ResponseWriter, r *http.Request)

func (*App) HandleEditSubmit

func (a *App) HandleEditSubmit(w http.ResponseWriter, r *http.Request)

func (*App) HandleGetMessages

func (a *App) HandleGetMessages(w http.ResponseWriter, r *http.Request)

func (*App) HandleRenderEdit

func (a *App) HandleRenderEdit(w http.ResponseWriter, r *http.Request)

func (*App) HandleRenderThread

func (a *App) HandleRenderThread(w http.ResponseWriter, r *http.Request)

func (*App) HandleThreadDelete

func (a *App) HandleThreadDelete(w http.ResponseWriter, r *http.Request)

func (*App) HandleThreadPresence

func (a *App) HandleThreadPresence(w http.ResponseWriter, r *http.Request)

func (*App) HandleThreadSlackDetails

func (a *App) HandleThreadSlackDetails(w http.ResponseWriter, r *http.Request)

func (*App) HandleThreadSlackWorkspace

func (a *App) HandleThreadSlackWorkspace(w http.ResponseWriter, r *http.Request)

func (*App) Serve

func (a *App) Serve() error

Jump to

Keyboard shortcuts

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