hooks

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package hooks defines the system webhook handlers.

Index

Constants

View Source
const KindPostCall = "PostCall"

KindPostCall is the kind for post-call webhooks.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	// Handle processes the webhook request.
	Handle(w http.ResponseWriter, r *http.Request)
}

Handler handles a webhook request.

type MarkdownHandler

type MarkdownHandler struct{}

MarkdownHandler converts HTML to Markdown.

func (*MarkdownHandler) Handle

func (h *MarkdownHandler) Handle(w http.ResponseWriter, r *http.Request)

Handle handles markdown conversion.

type PaginateHandler

type PaginateHandler struct{}

PaginateHandler paginates strings.

func (*PaginateHandler) Handle

func (h *PaginateHandler) Handle(w http.ResponseWriter, r *http.Request)

Handle handles pagination.

type Registry

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

Registry manages system webhooks.

func NewRegistry

func NewRegistry() *Registry

NewRegistry creates a new Registry.

func (*Registry) Get

func (r *Registry) Get(name string) (Handler, bool)

Get returns a handler by name.

func (*Registry) Register

func (r *Registry) Register(name string, handler Handler)

Register registers a handler with a name.

type TruncateHandler

type TruncateHandler struct{}

TruncateHandler truncates long strings.

func (*TruncateHandler) Handle

func (h *TruncateHandler) Handle(w http.ResponseWriter, r *http.Request)

Handle handles text truncation.

Jump to

Keyboard shortcuts

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