webhook

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2021 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 App

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

App of package

func New

func New(config Config, storageApp provider.Storage, prometheusRegisterer prometheus.Registerer) (*App, error)

New creates new App from Config

func (*App) Create

func (a *App) Create(pathname string, recursive bool, url string, types []provider.EventType) (string, error)

Create a webhook

func (*App) Delete

func (a *App) Delete(id string) error

Delete a webhook

func (*App) Enabled

func (a *App) Enabled() bool

Enabled checks if requirements are met

func (*App) EventConsumer

func (a *App) EventConsumer(e provider.Event)

EventConsumer handle event pushed to the event bus

func (*App) List

func (a *App) List() map[string]provider.Webhook

List webhooks

func (*App) Start

func (a *App) Start(_ <-chan struct{})

Start worker

type Config

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

Config of package

func Flags

func Flags(fs *flag.FlagSet, prefix string, overrides ...flags.Override) Config

Flags adds flags for configuring package

Jump to

Keyboard shortcuts

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