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.
Click to show internal directories.
Click to hide internal directories.