webhook

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: MIT Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Post

func Post(payload WebhookPayload) error

Post posts the message to webhook endpoint.

Types

type Memo

type Memo struct {
	ID        int32 `json:"id"`
	CreatorID int32 `json:"creatorId"`
	CreatedTs int64 `json:"createdTs"`
	UpdatedTs int64 `json:"updatedTs"`

	// Domain specific fields
	Content    string `json:"content"`
	Visibility string `json:"visibility"`
	Pinned     bool   `json:"pinned"`
}

type WebhookPayload

type WebhookPayload struct {
	URL          string     `json:"url"`
	ActivityType string     `json:"activityType"`
	CreatorID    int32      `json:"creatorId"`
	CreatedTs    int64      `json:"createdTs"`
	Memo         *v1pb.Memo `json:"memo"`
}

WebhookPayload is the payload of webhook request. nolint

type WebhookResponse

type WebhookResponse struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

WebhookResponse is the response of webhook request. nolint

Jump to

Keyboard shortcuts

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