app

package
v0.0.45 Latest Latest
Warning

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

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

Documentation

Overview

Package app provides the GitHub App specific operations

Index

Constants

View Source
const GithubApp = "github-app"

GithubApp is the string that represents the GitHubApp provider

Variables

AuthorizationFlows is the list of authorization flows that the GitHubOAuth provider supports

Implements is the list of provider types that the GitHubOAuth provider implements

Functions

func NewGitHubAppProvider added in v0.0.37

func NewGitHubAppProvider(
	providerConfig *minderv1.GitHubAppProviderConfig,
	appConfig *server.GitHubAppConfig,
	metrics telemetry.HttpClientMetrics,
	restClientCache ratecache.RestClientCache,
	credential provifv1.GitHubCredential,
	packageListingClient *gogithub.Client,
	isOrg bool,
) (*github.GitHub, error)

NewGitHubAppProvider creates a new GitHub App API client BaseURL defaults to the public GitHub API, if needing to use a customer domain endpoint (as is the case with GitHub Enterprise), set the Endpoint field in the GitHubConfig struct

func ParseV1Config added in v0.0.37

func ParseV1Config(rawCfg json.RawMessage) (*minderv1.GitHubAppProviderConfig, error)

ParseV1Config parses the raw config into a GitHubAppProviderConfig struct

Types

type GitHubAppDelegate

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

GitHubAppDelegate is the struct that contains the GitHub App specific operations

func (*GitHubAppDelegate) GetCredential

func (g *GitHubAppDelegate) GetCredential() provifv1.GitHubCredential

GetCredential returns the GitHub App installation credential

func (*GitHubAppDelegate) GetLogin

func (g *GitHubAppDelegate) GetLogin(ctx context.Context) (string, error)

GetLogin returns the username for the GitHub App user

func (*GitHubAppDelegate) GetName

func (g *GitHubAppDelegate) GetName(_ context.Context) (string, error)

GetName returns the username for the GitHub App user

func (*GitHubAppDelegate) GetOwner added in v0.0.38

func (_ *GitHubAppDelegate) GetOwner() string

GetOwner returns the owner filter

func (*GitHubAppDelegate) GetPrimaryEmail

func (g *GitHubAppDelegate) GetPrimaryEmail(ctx context.Context) (string, error)

GetPrimaryEmail returns the email for the GitHub App user

func (*GitHubAppDelegate) GetUserId

func (g *GitHubAppDelegate) GetUserId(ctx context.Context) (int64, error)

GetUserId returns the user id for the GitHub App user

func (*GitHubAppDelegate) IsOrg added in v0.0.41

func (g *GitHubAppDelegate) IsOrg() bool

IsOrg returns true if the owner is an organization

func (*GitHubAppDelegate) ListAllRepositories

func (g *GitHubAppDelegate) ListAllRepositories(ctx context.Context) ([]*minderv1.Repository, error)

ListAllRepositories returns a list of all repositories accessible to the GitHub App installation

Jump to

Keyboard shortcuts

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