ghapp

package
v0.0.0-...-43e34d7 Latest Latest
Warning

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

Go to latest
Published: May 20, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidSource

func IsInvalidSource(err error) bool

func IsNotFound

func IsNotFound(err error) bool

func IsTerminalAccessError

func IsTerminalAccessError(err error) bool

func NormalizeSource

func NormalizeSource(source api.GitHubSource) (api.GitHubSource, error)

Types

type InstallationToken

type InstallationToken struct {
	Token     string
	ExpiresAt time.Time
}

type InvalidSourceError

type InvalidSourceError struct {
	Err error
}

func (InvalidSourceError) Error

func (e InvalidSourceError) Error() string

func (InvalidSourceError) Unwrap

func (e InvalidSourceError) Unwrap() error

type Repository

type Repository struct {
	ID            int64
	OwnerLogin    string
	Name          string
	FullName      string
	Private       bool
	Archived      bool
	DefaultBranch string
	HTMLURL       string
}

type ResolvedSource

type ResolvedSource struct {
	Source             api.GitHubSource
	InstallationID     int64
	GitHubRepositoryID int64
}

type Resolver

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

func NewResolver

func NewResolver(appID string, appSlug string, privateKeyPEM []byte) (*Resolver, error)

func (*Resolver) CreateRepositoryToken

func (r *Resolver) CreateRepositoryToken(ctx context.Context, installationID int64, githubRepositoryID int64) (InstallationToken, error)

func (*Resolver) InstallURL

func (r *Resolver) InstallURL() string

func (*Resolver) ResolveCommit

func (r *Resolver) ResolveCommit(ctx context.Context, installationID int64, githubRepositoryID int64, source api.GitHubSource) (ResolvedSource, error)

func (*Resolver) VerifyUserInstallation

func (r *Resolver) VerifyUserInstallation(ctx context.Context, userAccessToken string, installationID int64) (VerifiedInstallation, error)

type VerifiedInstallation

type VerifiedInstallation struct {
	InstallationID      int64
	AccountLogin        string
	AccountType         string
	RepositorySelection string
	HTMLURL             string
	Suspended           bool
	Repositories        []Repository
}

Jump to

Keyboard shortcuts

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