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
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
Click to show internal directories.
Click to hide internal directories.