mintclient

package
v0.32.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPDoer

type HTTPDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPDoer abstracts http.Client for testability.

type MintRequest

type MintRequest struct {
	MintURL   string
	Role      string
	Repos     []string // optional: omit for installation-wide token (all repos on the installation)
	TargetOrg string   // optional: cross-org mint when set and differs from caller org
	Audience  string
}

MintRequest holds the parameters for minting a token via the fullsend mint service.

type MintResult

type MintResult struct {
	Token     string `json:"token"`
	ExpiresAt string `json:"expires_at"`
}

MintResult holds the minted token and its expiry.

func MintToken

func MintToken(ctx context.Context, req MintRequest) (*MintResult, error)

MintToken obtains a fresh GitHub App installation token by exchanging a GitHub Actions OIDC JWT with the fullsend token mint service.

It reads ACTIONS_ID_TOKEN_REQUEST_URL and ACTIONS_ID_TOKEN_REQUEST_TOKEN from the environment. These are set automatically by GitHub Actions when the job declares id-token: write permission.

Jump to

Keyboard shortcuts

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