api

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package api provides GitHub API client implementations for migration monitoring.

This package defines the GitHubClient interface and its implementation for interacting with GitHub's REST and GraphQL APIs. It supports both legacy migrations and GitHub Enterprise Importer (GEI) migrations.

The package implements rate limiting, error handling, and authentication following GitHub API best practices.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError added in v0.6.0

type APIError struct {
	StatusCode int    `json:"status_code"`
	Message    string `json:"message"`
	Err        error  `json:"-"`
}

APIError represents an API error

func (*APIError) Error added in v0.6.0

func (e *APIError) Error() string

func (*APIError) Unwrap added in v0.6.0

func (e *APIError) Unwrap() error

type GitHubClient added in v0.6.0

type GitHubClient interface {
	// ListMigrations returns all migrations for the specified organization
	ListMigrations(ctx context.Context, org string, isLegacy bool) ([]models.Migration, error)
}

GitHubClient defines the interface for GitHub API operations

func NewGitHubClient added in v0.6.0

func NewGitHubClient(token string, isLegacy bool) (GitHubClient, error)

NewGitHubClient creates a new GitHub API client

Jump to

Keyboard shortcuts

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