webhook

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: AGPL-3.0 Imports: 32 Imported by: 0

Documentation

Overview

internal/webhook/handler.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnqueueHandler

func EnqueueHandler(c *gin.Context)

EnqueueHandler accepts either form-values (URL-based flow) or JSON (document content flow), enqueues a job, and returns JSON{"jobId": "..."}.

func StatusHandler

func StatusHandler(c *gin.Context)

StatusHandler returns current status & message for a given jobId.

func StatusWSHandler added in v1.1.2

func StatusWSHandler(c *gin.Context)

StatusWSHandler streams job updates over a WebSocket connection.

func UploadHandler added in v0.2.0

func UploadHandler(c *gin.Context)

Types

type DocumentRequest added in v1.3.0

type DocumentRequest struct {
	Body               string `form:"Body" json:"body"`               // URL or base64 content
	ContentType        string `form:"ContentType" json:"contentType"` // MIME type for content
	Filename           string `form:"Filename" json:"filename"`       // Original filename
	IsContent          bool   `form:"IsContent" json:"isContent"`     // Flag: true=content, false=URL
	Prefix             string `form:"prefix" json:"prefix"`
	Compress           string `form:"compress" json:"compress"`
	Manage             string `form:"manage" json:"manage"`
	Archive            string `form:"archive" json:"archive"`
	RmDir              string `form:"rm_dir" json:"rm_dir"`
	RetentionDays      string `form:"retention_days" json:"retention_days"`
	ConflictResolution string `form:"conflict_resolution" json:"conflict_resolution"`
	Coverpage          string `form:"coverpage" json:"coverpage"`
	RemoveBackground   string `form:"remove_background" json:"removeBackground"`
}

DocumentRequest represents a webhook request that can contain either a URL or document content

Jump to

Keyboard shortcuts

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