github

package
v0.0.0-...-9acccbf Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 7 Imported by: 1

Documentation

Overview

Package github implements the provider interface for GitHub.

This package provides GitHub-specific API integration for repository operations including listing, cloning, and organization management.

Features

  • Repository listing (org and user)
  • Token validation
  • Rate limit management
  • Pagination handling

Usage

provider := github.NewProvider(token)
repos, err := provider.ListOrganizationRepos(ctx, "myorg")

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

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

Provider implements the provider.Provider interface for GitHub

func NewProvider

func NewProvider(token string) *Provider

NewProvider creates a new GitHub provider

func (*Provider) GetRateLimit

func (p *Provider) GetRateLimit(ctx context.Context) (*provider.RateLimit, error)

GetRateLimit returns current rate limit status

func (*Provider) GetRepository

func (p *Provider) GetRepository(ctx context.Context, owner, repo string) (*provider.Repository, error)

GetRepository gets a single repository from GitHub

func (*Provider) ListOrganizationRepos

func (p *Provider) ListOrganizationRepos(ctx context.Context, org string) ([]*provider.Repository, error)

ListOrganizationRepos lists all repositories in a GitHub organization

func (*Provider) ListOrganizations

func (p *Provider) ListOrganizations(ctx context.Context) ([]*provider.Organization, error)

ListOrganizations lists organizations the authenticated user belongs to

func (*Provider) ListUserRepos

func (p *Provider) ListUserRepos(ctx context.Context, user string) ([]*provider.Repository, error)

ListUserRepos lists all repositories for a user

func (*Provider) Name

func (p *Provider) Name() string

Name returns the provider name

func (*Provider) SetToken

func (p *Provider) SetToken(token string) error

SetToken sets the authentication token

func (*Provider) ValidateToken

func (p *Provider) ValidateToken(ctx context.Context) (bool, error)

ValidateToken validates the current token

Jump to

Keyboard shortcuts

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