http

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Adapted from https://github.com/qri-io/starlib/blob/master/http/http.go

Index

Constants

This section is empty.

Variables

View Source
var IntegrationID = sdktypes.IntegrationIDFromName("http")

Functions

func MatchPattern added in v0.4.0

func MatchPattern(pattern string, req string) (vs map[string]string, err error)

Match request path against pattern. This uses go's http.ServeMux as described in https://pkg.go.dev/net/http#ServeMux. It will return a map of path keys to their values if the request path matches the pattern.

func Start

func Start(l *zap.Logger, mux *http.ServeMux, d sdkservices.Dispatcher)

Types

type HTTPHandler

type HTTPHandler struct {
	// contains filtered or unexported fields
}

HTTPHandler is an autokitteh webhook which implements http.Handler to receive and dispatch asynchronous event notifications.

func (HTTPHandler) ServeHTTP

func (h HTTPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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