webhook

package
v0.4.12 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deployer

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

func NewDeployer

func NewDeployer(config *DeployerConfig) (*Deployer, error)

func (*Deployer) Deploy

func (d *Deployer) Deploy(ctx context.Context, certPEM, privkeyPEM string) (*deployer.DeployResult, error)

func (*Deployer) SetLogger

func (d *Deployer) SetLogger(logger *slog.Logger)

type DeployerConfig

type DeployerConfig struct {
	// Webhook URL。
	WebhookUrl string `json:"webhookUrl"`
	// Webhook 回调数据(application/json 或 application/x-www-form-urlencoded 格式)。
	WebhookData string `json:"webhookData,omitempty"`
	// 请求谓词。
	// 零值时默认值 "POST"。
	Method string `json:"method,omitempty"`
	// 请求标头。
	Headers map[string]string `json:"headers,omitempty"`
	// 请求超时(单位:秒)。
	// 零值时默认值 30。
	Timeout int `json:"timeout,omitempty"`
	// 是否允许不安全的连接。
	AllowInsecureConnections bool `json:"allowInsecureConnections,omitempty"`
}

Jump to

Keyboard shortcuts

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