gitlab_hooks

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: MPL-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const GitlabHookIgnoreReasonUnhandledEventType = "unhandled-event-type"
View Source
const GitlabHooksSubject = "gitlab"
View Source
const GitlabTokenHeader = "X-Gitlab-Token"
View Source
const MergeRequestEventsSubject = "mrevents"
View Source
const NoteEventsSubject = "noteevents"

Variables

This section is empty.

Functions

This section is empty.

Types

type GitlabEventWorker

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

func NewGitlabEventWorker

func NewGitlabEventWorker(h *GitlabHooksHandler, js nats.JetStreamContext) *GitlabEventWorker

type GitlabHookEvent

type GitlabHookEvent struct {
}

GitlabHookEvent represents all types of Gitlab Hooks events to be processed.

func (*GitlabHookEvent) GetPlatform

func (e *GitlabHookEvent) GetPlatform() string

type GitlabHooksHandler

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

func (*GitlabHooksHandler) GroupHandler

func (h *GitlabHooksHandler) GroupHandler() func(c echo.Context) error

func (*GitlabHooksHandler) ProjectHandler

func (h *GitlabHooksHandler) ProjectHandler() func(c echo.Context) error

type MergeRequestEventMsg

type MergeRequestEventMsg struct {
	GitlabHookEvent

	Payload *gogitlab.MergeEvent   `json:"payload"`
	Carrier propagation.MapCarrier `json:"Carrier"`
	Context context.Context
}

func (*MergeRequestEventMsg) DecodeEventData

func (e *MergeRequestEventMsg) DecodeEventData(b []byte) error

func (*MergeRequestEventMsg) EncodeEventData

func (e *MergeRequestEventMsg) EncodeEventData(ctx context.Context) []byte

func (*MergeRequestEventMsg) GetId

func (*MergeRequestEventMsg) GetPayload

func (e *MergeRequestEventMsg) GetPayload() interface{}

func (*MergeRequestEventMsg) GetType

func (e *MergeRequestEventMsg) GetType(ctx context.Context) string

type NoteEventMsg

type NoteEventMsg struct {
	GitlabHookEvent

	Payload *gitlab.GitlabMergeCommentEvent `json:"payload"`
	Carrier propagation.MapCarrier          `json:"Carrier"`
	Context context.Context
}

func (*NoteEventMsg) DecodeEventData

func (e *NoteEventMsg) DecodeEventData(b []byte) error

func (*NoteEventMsg) EncodeEventData

func (e *NoteEventMsg) EncodeEventData(ctx context.Context) []byte

func (*NoteEventMsg) GetAttributes

func (e *NoteEventMsg) GetAttributes() vcs.MRAttributes

func (*NoteEventMsg) GetId

func (e *NoteEventMsg) GetId(ctx context.Context) string

func (*NoteEventMsg) GetLastCommit

func (e *NoteEventMsg) GetLastCommit() vcs.Commit

func (*NoteEventMsg) GetMR

func (e *NoteEventMsg) GetMR() vcs.MR

func (*NoteEventMsg) GetProject

func (e *NoteEventMsg) GetProject() vcs.Project

Jump to

Keyboard shortcuts

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