ghact

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: Apache-2.0, MIT Imports: 6 Imported by: 0

Documentation

Overview

Package ghact implements pubgh.ArtifactMeta with go-github.

New accepts an already-authenticated github.Client so token text never enters domain values or error strings. NewAuthenticated builds that client for the public API or a GITHUB_API_URL enterprise/stub base. Get maps GitHub artifact metadata onto pubgh.ArtifactMetadata and classifies API failures as absent, auth, retryable, or malformed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client fetches Actions artifact metadata through go-github.

func New

func New(client *github.Client) *Client

New constructs a Client around an already-authenticated go-github client.

The caller supplies authentication. Token text must not be stored on Client or included in returned errors.

func NewAuthenticated

func NewAuthenticated(token, apiURL, serverURL string) (*Client, error)

NewAuthenticated constructs a Client for token at the given GitHub API.

An empty apiURL selects the public https://api.github.com client. A non-empty apiURL uses github.Client.WithEnterpriseURLs, with serverURL as the upload base when set and apiURL otherwise. Token text is applied only as Authorization and never stored on Client.

func (*Client) Get

func (c *Client) Get(
	ctx context.Context,
	repository pubgh.Repository,
	id pubgh.ArtifactID,
) (pubgh.ArtifactMetadata, error)

Get implements pubgh.ArtifactMeta.

Directories

Path Synopsis
Package mocks contains Mockery-generated doubles for pubgh.ArtifactMeta.
Package mocks contains Mockery-generated doubles for pubgh.ArtifactMeta.

Jump to

Keyboard shortcuts

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