gitlab

package
v0.0.0-...-2b6864c Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// ProviderID ...
	ProviderID = "gitlab"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BoolChanges

type BoolChanges struct {
	Previous bool `json:"previous"`
	Current  bool `json:"current"`
}

BoolChanges ...

type BranchInfoModel

type BranchInfoModel struct {
	VisibilityLevel int    `json:"visibility_level"`
	GitSSHURL       string `json:"git_ssh_url"`
	GitHTTPURL      string `json:"git_http_url"`
	Namespace       string `json:"namespace"`
}

BranchInfoModel ...

type Changes

type Changes struct {
	Draft  BoolChanges  `json:"draft"`
	Labels LabelChanges `json:"labels"`
}

Changes ...

type CodePushEventModel

type CodePushEventModel struct {
	ObjectKind   string          `json:"object_kind"`
	Ref          string          `json:"ref"`
	CheckoutSHA  string          `json:"checkout_sha"`
	Commits      []CommitModel   `json:"commits"`
	Repository   RepositoryModel `json:"respository"`
	UserUsername string          `json:"user_username"`
}

CodePushEventModel ...

type CommitModel

type CommitModel struct {
	CommitHash    string   `json:"id"`
	CommitMessage string   `json:"message"`
	AddedFiles    []string `json:"added"`
	ModifiedFiles []string `json:"modified"`
	RemovedFiles  []string `json:"removed"`
}

CommitModel ...

type HookProvider

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

HookProvider ...

func NewDefaultHookProvider

func NewDefaultHookProvider(logger *zap.Logger) HookProvider

NewDefaultHookProvider ...

func NewHookProvider

func NewHookProvider(timeProvider hookCommon.TimeProvider, logger *zap.Logger) HookProvider

NewHookProvider ...

func (HookProvider) GatherMetrics

func (hp HookProvider) GatherMetrics(r *http.Request, appSlug string) ([]common.Metrics, error)

GatherMetrics ...

func (HookProvider) TransformRequest

func (hp HookProvider) TransformRequest(r *http.Request) hookCommon.TransformResultModel

TransformRequest ...

type LabelChanges

type LabelChanges struct {
	Previous []LabelInfoModel `json:"previous"`
	Current  []LabelInfoModel `json:"current"`
}

LabelChanges ...

type LabelInfoModel

type LabelInfoModel struct {
	ID    int64  `json:"id"`
	Title string `json:"title"`
}

LabelInfoModel ...

type LastCommitInfoModel

type LastCommitInfoModel struct {
	SHA string `json:"id"`
}

LastCommitInfoModel ...

type MergeRequestEventModel

type MergeRequestEventModel struct {
	ObjectKind       string                    `json:"object_kind"`
	ObjectAttributes ObjectAttributesInfoModel `json:"object_attributes"`
	Labels           []LabelInfoModel          `json:"labels"`
	User             UserModel                 `json:"user"`
	Changes          Changes                   `json:"changes"`
}

MergeRequestEventModel ...

type ObjectAttributesInfoModel

type ObjectAttributesInfoModel struct {
	ID             int                 `json:"iid"`
	Title          string              `json:"title"`
	Description    string              `json:"description"`
	State          string              `json:"state"`
	Action         string              `json:"action"`
	MergeStatus    string              `json:"merge_status"`
	MergeCommitSHA string              `json:"merge_commit_sha"`
	MergeError     string              `json:"merge_error"`
	Oldrev         string              `json:"oldrev"`
	Source         BranchInfoModel     `json:"source"`
	SourceBranch   string              `json:"source_branch"`
	Target         BranchInfoModel     `json:"target"`
	TargetBranch   string              `json:"target_branch"`
	LastCommit     LastCommitInfoModel `json:"last_commit"`
	Draft          bool                `json:"draft"`
	Labels         []LabelInfoModel    `json:"labels"`
}

ObjectAttributesInfoModel ...

type RepositoryModel

type RepositoryModel struct {
	VisibilityLevel int    `json:"visibility_level"`
	GitSSHURL       string `json:"git_ssh_url"`
	GitHTTPURL      string `json:"git_http_url"`
}

RepositoryModel ...

type TagPushEventModel

type TagPushEventModel struct {
	ObjectKind   string          `json:"object_kind"`
	Ref          string          `json:"ref"`
	CheckoutSHA  string          `json:"checkout_sha"`
	Repository   RepositoryModel `json:"respository"`
	UserUsername string          `json:"user_username"`
}

TagPushEventModel ...

type UserModel

type UserModel struct {
	Name     string `json:"name"`
	Username string `json:"username"`
}

UserModel ...

Jump to

Keyboard shortcuts

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