Documentation
¶
Index ¶
- Constants
- Variables
- func HomeHandler(ctx *fasthttp.RequestCtx)
- func IntegrationActivitySuffix(displayName string) string
- type Configuration
- type Handler
- func (h Handler) HandleAnyHTTP(aRes anyhttp.Response, aReq anyhttp.Request)
- func (h Handler) HandleAwsLambda(ctx context.Context, awsReq events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error)
- func (h Handler) HandleCanonical(hookData models.HookData) []models.ErrorInfo
- func (h Handler) HandleFastHTTP(ctx *fasthttp.RequestCtx)
- func (h Handler) HandleNetHTTP(res http.ResponseWriter, req *http.Request)
- type HandlerRequest
- type Normalize
Constants ¶
View Source
const ( QueryParamNamedOutputs = config.ParamNameAdapters QueryParamInputType = config.ParamNameInputType QueryParamOutputType = config.ParamNameOutputType QueryParamOutputURL = config.ParamNameOutputURL QueryParamToken = config.ParamNameToken QueryParamDefaultActivity = config.ParamNameActivityDefault QueryParamDefaultIcon = config.ParamNameIconDefault )
View Source
const (
DisplayName = "base_handler"
)
Variables ¶
View Source
var (
ShowDisplayName = false
)
Functions ¶
func HomeHandler ¶
func HomeHandler(ctx *fasthttp.RequestCtx)
HomeHandler is a fasthttp handler for handling the webhoo proxy homepage.
Types ¶
type Configuration ¶
type Configuration struct {
ConfigData config.Configuration
AdapterSet adapters.AdapterSet
}
type Handler ¶
type Handler struct {
Config config.Configuration
AdapterSet adapters.AdapterSet
Key string
Normalize Normalize
MessageBodyType models.MessageBodyType
}
func NewTemplatedHandler ¶
func (Handler) HandleAnyHTTP ¶
HandleNetHTTP is the method to respond to a fasthttp request.
func (Handler) HandleAwsLambda ¶
func (h Handler) HandleAwsLambda(ctx context.Context, awsReq events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error)
HandleAwsLambda is the method to respond to a fasthttp request.
func (Handler) HandleCanonical ¶
HandleCanonical is the method to handle a processed request.
func (Handler) HandleFastHTTP ¶
func (h Handler) HandleFastHTTP(ctx *fasthttp.RequestCtx)
HandleFastHTTP is the method to respond to a fasthttp request.
func (Handler) HandleNetHTTP ¶
func (h Handler) HandleNetHTTP(res http.ResponseWriter, req *http.Request)
HandleNetHTTP is the method to respond to a fasthttp request.
type HandlerRequest ¶
type HandlerRequest struct {
Env map[string]string // handler environment
QueryParams url.Values // query string params
Body []byte // message, e.g. request body
}
func NewHandlerRequest ¶
func NewHandlerRequest() HandlerRequest
type Normalize ¶
type Normalize func(config.Configuration, HandlerRequest) (commonchat.Message, error)
Click to show internal directories.
Click to hide internal directories.