commitverification

package
v1.107.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: Apache-2.0 Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommitVerification

type CommitVerification struct {
	// Whether verification was attempted
	Attempted bool
	// Verification status
	Status VerificationStatus
	// Human-readable reason for the status
	Reason string
	// Platform that performed the verification (e.g., "github", "gitlab")
	Platform string
	// Optional: The signing key ID if verified
	KeyID string
	// Optional: The signature algorithm used
	SignatureAlgorithm string
}

CommitVerification represents the result of a commit signature verification

func VerifyGitHubCommit

func VerifyGitHubCommit(ctx context.Context, owner, repo, commitHash, token string, logger *zerolog.Logger) *CommitVerification

VerifyGitHubCommit verifies a commit signature using the GitHub API

func VerifyGitLabCommit

func VerifyGitLabCommit(ctx context.Context, baseURL, projectPath, commitHash, token string, logger *zerolog.Logger) *CommitVerification

VerifyGitLabCommit verifies a commit signature using the GitLab API

type VerificationStatus

type VerificationStatus int

VerificationStatus represents the status of a commit signature verification

const (
	// VerificationStatusUnspecified indicates an unspecified status
	VerificationStatusUnspecified VerificationStatus = iota
	// VerificationStatusVerified indicates the signature was successfully verified
	VerificationStatusVerified
	// VerificationStatusUnverified indicates the signature check failed or is invalid
	VerificationStatusUnverified
	// VerificationStatusUnavailable indicates verification could not be performed
	VerificationStatusUnavailable
	// VerificationStatusNotApplicable indicates no signature present or platform doesn't support it
	VerificationStatusNotApplicable
)

Jump to

Keyboard shortcuts

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