webhook

package
v1.35.2 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Query

Types

type Events

type Events map[string]bool

type Webhook

type Webhook struct {
	mixin.Model[Webhook]

	// Name
	Name string `json:"name"`

	// Endpoint webhook should deliver events to.
	Url string `json:"url"`

	// Whether to use Live or Test data.
	Live bool `json:"live"`

	// Whether to send all events or selectively using Events.
	All bool `json:"all"`

	// Random token to check against
	AccessToken string `json:"accessToken"`

	// Events to selectively send.
	Events  Events `json:"events" datastore:"-" orm:"default:{}"`
	Events_ string `json:"-" datastore:",noindex"`

	// Whether this webhook is enabled or not.
	Enabled bool `json:"enabled"`
}

func Fake

func Fake(db *datastore.Datastore) *Webhook

func New

func New(db *datastore.Datastore) *Webhook

func (*Webhook) Load

func (s *Webhook) Load(ps []datastore.Property) (err error)

func (*Webhook) Save

func (s *Webhook) Save() (ps []datastore.Property, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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