gitservice

package
v0.0.0-...-031a9af Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Github is the Github provider
	Github GitProvider = "github"

	// Gitlab is the Gitlab provider
	Gitlab GitProvider = "gitlab"

	// Unknown is the unknown provider
	Unknown GitProvider = "unknown"

	// ReasonProcessing indicates the condition is processing
	ReasonProcessing GitConditionReason = "Processing"

	// ReasonSucceeded indicates the condition is succeeded
	ReasonSucceeded GitConditionReason = "Succeeded"

	// ReasonRepoNotFound indicates the repository was not found
	ReasonRepoNotFound GitConditionReason = "RepoNotFound"

	// ReasonRepoNotReachable indicates the repository is not reachable
	ReasonRepoNotReachable GitConditionReason = "RepoNotReachable"

	// ReasonRateLimitExceeded indicates the rate limit for fetching Github repository has been exceeded
	ReasonRateLimitExceeded GitConditionReason = "RateLimitExceeded"

	// ReasonUnsupportedGitType indicates the Git type is not supported
	ReasonUnsupportedGitType GitConditionReason = "UnsupportedGitType"

	// ReasonInvalidGitURL indicates the Git URL is invalid
	ReasonInvalidGitURL GitConditionReason = "InvalidGitURL"

	// ReasonAccessTokenRequired indicates the Gitlab URL is not reachable because it requires an access token
	ReasonAccessTokenRequired GitConditionReason = "AccessTokenRequired"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GitConditionReason

type GitConditionReason string

GitConditionReason is a static/programmatic representation of the cause of a status condition.

func (GitConditionReason) String

func (r GitConditionReason) String() string

String casts the value to string. "r.String()" and "string(r)" are equivalent.

type GitProvider

type GitProvider string

GitProvider is the type of Git provider

type GitService

type GitService struct {
	GitURL string
	// contains filtered or unexported fields
}

func New

func New(gitURL, branch, secretValue string, logger logr.Logger) *GitService

func (*GitService) IsRepoReachable

func (g *GitService) IsRepoReachable(gs *GitService) (metav1.ConditionStatus, GitConditionReason)

type GitServiceInterface

type GitServiceInterface interface {
	IsRepoReachable(gs *GitService) (metav1.ConditionStatus, GitConditionReason)
}

Jump to

Keyboard shortcuts

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