hooks

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exist

func Exist(ctx context.Context, kv kvdb.KVDB, id string) bool

Types

type Data

type Data map[string]interface{}

type GithubHook

type GithubHook struct {
	HookCommon
	GithubId   int
	Secret     string
	Repository int
}

func (*GithubHook) Delete

func (h *GithubHook) Delete(ctx context.Context) error

func (*GithubHook) ID

func (h *GithubHook) ID() string

func (*GithubHook) Register

func (h *GithubHook) Register(ctx context.Context) error

func (*GithubHook) Serialize

func (h *GithubHook) Serialize() Data

type Hook

type Hook interface {
	Register(ctx context.Context) error
	Delete(ctx context.Context) error
	Serialize() Data
	ID() string
}

func Fetch

func Fetch(ctx context.Context, kv kvdb.KVDB, hook_id string) (Hook, error)

func New

func New(kv kvdb.KVDB, data Data) (Hook, error)

type HookCommon

type HookCommon struct {
	KV       kvdb.KVDB
	Id       string
	Provider string
}

func (*HookCommon) Delete

func (h *HookCommon) Delete(ctx context.Context) error

func (*HookCommon) ID

func (h *HookCommon) ID() string

func (*HookCommon) Register

func (h *HookCommon) Register(ctx context.Context) error

Jump to

Keyboard shortcuts

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