Help us shape the future of Go! Take the 2026 Go Developer Survey

githubapp

package
v0.0.0-...-124cbb1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoInstallation = errors.New("github app is not installed for the repository")

ErrNoInstallation means the App is not installed for the requested repository.

Functions

This section is empty.

Types

type Client

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

Client talks to the GitHub API using go-github and ghinstallation.

func New

func New(appID int64, privateKeyPath, baseURL string, timeout time.Duration) (*Client, error)

New creates a client from an App ID and a PEM private key file.

func (*Client) Mint

func (c *Client) Mint(ctx context.Context, owner, repository string, repositories []string, permissions map[string]string) (Token, error)

Mint resolves the App installation for the repository and creates an installation token, optionally narrowed to repositories and permissions.

type Minter

type Minter interface {
	Mint(ctx context.Context, owner, repository string, repositories []string, permissions map[string]string) (Token, error)
}

Minter mints installation tokens. permissions may be nil to request all permissions granted to the App (callers should normally narrow them).

type Token

type Token struct {
	Value          string
	ExpiresAt      time.Time
	InstallationID int64
}

Token is a GitHub App installation access token.

Jump to

Keyboard shortcuts

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