service

package
v0.0.122 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: GPL-3.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package service (directory webhookcompat) is a frozen copy of the shape a classic incoming webhook's payload had before rich webhooks existed (origin/main at 933dc8a). It exists for one job: decoding a post with it reproduces, exactly, whether main accepted it and the error text main gave when it didn't — encoding/json names the target's types in that text ("…into Go value of type service.IncomingWebhookPayload"), so the package and type names are main's too.

Never edit these types. Classic senders' behaviour is pinned by internal/handler's TestClassicWebhooksBehaveAsBefore against a golden recorded on main.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IncomingWebhookPayload

type IncomingWebhookPayload struct {
	Text        string                    `json:"text"`
	Channel     string                    `json:"channel"`
	Username    string                    `json:"username"`
	IconURL     string                    `json:"icon_url"`
	IconEmoji   string                    `json:"icon_emoji"`
	Attachments []model.MessageAttachment `json:"attachments"`
	RootID      string                    `json:"root_id"`
}

IncomingWebhookPayload is main's classic payload, field for field.

Directories

Path Synopsis
Package model (directory webhookcompat/model) is a frozen copy of the attachment types of main's classic webhook payload; see the parent package.
Package model (directory webhookcompat/model) is a frozen copy of the attachment types of main's classic webhook payload; see the parent package.

Jump to

Keyboard shortcuts

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