githubapi

package
v0.0.0-...-8199295 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessTokenResponse

type AccessTokenResponse struct {
	Token               string            `json:"token"`
	ExpiresAt           time.Time         `json:"expires_at"`
	Permissions         map[string]string `json:"permissions"`
	RepositorySelection string            `json:"repository_selection"`
	Repositories        []Repository      `json:"repositories,omitempty"`
}

AccessTokenResponse represents the response from GitHub API for access token

type Client

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

Client represents a GitHub API client

func NewClient

func NewClient(config ClientConfig) *Client

NewClient creates a new GitHub API client

func (*Client) CreateInstallationAccessToken

func (c *Client) CreateInstallationAccessToken(installationID string, jwt string) (*AccessTokenResponse, error)

CreateInstallationAccessToken creates an installation access token for a GitHub App

type ClientConfig

type ClientConfig struct {
	BaseURL string
}

ClientConfig holds the configuration for the GitHub API client

type Repository

type Repository struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

Repository represents a GitHub repository

Jump to

Keyboard shortcuts

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