github

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppCredentialHelper

type AppCredentialHelper interface {
	// GetUsernameAndPassword extracts username and password (an access token)
	// from a Secret IF the Secret contains a base64 encoded private key issued to
	// a registered GitHub App. If the Secret does not contain such a key, this
	// function will return empty strings and a nil error. Implementations may
	// cache the access token for efficiency.
	GetUsernameAndPassword(*corev1.Secret) (string, string, error)
}

AppCredentialHelper is an interface for components that can extract a username and password for accessing Git repositories in GitHub from a base64 encoded private key issued to a registered GitHub App.

func NewAppCredentialHelper

func NewAppCredentialHelper() AppCredentialHelper

NewAppCredentialHelper returns an implementation of the AppCredentialHelper interface that utilizes a cache to avoid unnecessary calls to GitHub.

Jump to

Keyboard shortcuts

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