github

package
v0.0.0-...-1502a4b Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAppCredentialProvider

func NewAppCredentialProvider() credentials.Provider

NewAppCredentialProvider returns an implementation of credentials.Provider.

Types

type AppCredentialProvider

type AppCredentialProvider struct {
	// contains filtered or unexported fields
}

func (*AppCredentialProvider) GetCredentials

func (p *AppCredentialProvider) GetCredentials(
	_ context.Context,
	project string,
	credType credentials.Type,
	repoURL string,
	data map[string][]byte,
	metadata map[string]string,
) (*credentials.Credentials, error)

GetCredentials implements the credentials.Provider interface for GitHub Apps. If the provided data represents a GitHub App installation and any optional constraints specified by the metadata do not prevent it, this method returns an App installation access token that is scoped only to the repository specified by repoURL.

func (*AppCredentialProvider) Supports

func (p *AppCredentialProvider) Supports(
	credType credentials.Type,
	repoURL string,
	data map[string][]byte,
	_ map[string]string,
) bool

Jump to

Keyboard shortcuts

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