testweb

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package testweb provides an example webhook handler

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register added in v0.2.0

func Register()

Register installs this handler on bot.DefaultBot

Types

type TestWeb added in v0.2.0

type TestWeb struct {
	hugot.WebHookHandler
}

TestWeb is a simple example of a handler that gets traffic from a web hook.

func New

func New() *TestWeb

New create an instance of the example webhook handler.

func (*TestWeb) Command added in v0.2.0

func (t *TestWeb) Command(ctx context.Context, w hugot.ResponseWriter, m *hugot.Message) error

Command implements a simple command that returns the URL of the hook to the users.

func (*TestWeb) Describe added in v0.2.0

func (t *TestWeb) Describe() (string, string)

Describe returns the name and description of the hook.

Jump to

Keyboard shortcuts

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