notify

package
v0.0.0-...-d9a425f Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeliverAll

func DeliverAll(config Config, payload webhook.PayLoad) error

func Register

func Register(name Type, creator Creator) error

Register record notifier

Types

type Config

type Config struct {
	Type      Type          // specify which notify that would be created
	Url       string        // notify server address
	LinConfig linear.Config // linear config of api
}

Config contain info that need to create notifier

type Creator

type Creator func(config Config) (Notifier, error)

Creator create a notifier

type Notifier

type Notifier interface {
	Deliver(payload webhook.PayLoad) error
}

Notifier define behavior when recv webhook

func Open

func Open(cfg Config) (Notifier, error)

Open create specify notifier

type Type

type Type string
var (
	TypeFeishu Type = "feishu"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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