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 // VerificationStatusNotApplicable indicates no signature present or platform doesn't support it VerificationStatusNotApplicable )
Click to show internal directories.
Click to hide internal directories.