hooklistener

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(s service) *chi.Mux

NewHandler initializes a new archiver API handler

func NewService

func NewService(l log.Logger, fr feed.Repository, nr []notification.Repository, cr cache.Repository, feedURL string, hookToken string) *service

NewService initializes a new hook listener service

Types

type GitlabWebhookPayload added in v0.0.10

type GitlabWebhookPayload struct {
	ObjectKind       string `json:"object_kind"`
	ObjectAttributes struct {
		Ref    string `json:"ref"`
		Status string `json:"status"`
	} `json:"object_attributes"`
}

GitlabWebhookPayload is part of the payload GitLab sends us after a pipeline event happened

func (GitlabWebhookPayload) IsActionable added in v0.0.10

func (p GitlabWebhookPayload) IsActionable() bool

IsActionable checks if the webhook is actionable for us, we filter out other hooks we receive and don't need

type Service

type Service interface {
	ValidToken(uuid string) (bool, error)
}

Service is an interface for a incoming hook listener service

Jump to

Keyboard shortcuts

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