extractor

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

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

Go to latest
Published: May 30, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package extractor provides functionality to extract GitHub repository metrics for validating compatibility of GraphQL implementations against graphql-js.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Extractor

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

Extractor is responsible for fetching and processing GitHub repository data.

func New

func New(cfg *config.Config) *Extractor

New creates and returns a new Extractor instance.

func (*Extractor) Run

func (e *Extractor) Run(p *RunParams) (*RunResult, error)

Run executes the extraction process using the provided parameters. It fetches repository data from GitHub and returns the extracted metrics. Returns an error if the GitHub API request fails.

type Repository

type Repository struct {
	// StarsCount is the number of stars on the GitHub repository.
	StarsCount int
}

Repository contains extracted repository metrics.

type RunParams

type RunParams struct {
	// HTTPClient is the HTTP client used for GitHub API requests.
	HTTPClient *http.Client

	// Organization is the GitHub organization name (e.g., "graphql-go").
	Organization string

	// RepositoryName is the GitHub repository name (e.g., "graphql").
	RepositoryName string
}

RunParams contains the parameters required to run the extractor.

type RunResult

type RunResult struct {
	// Repository contains the extracted repository metrics.
	Repository *Repository
}

RunResult contains the results of running the extractor.

func TestData

func TestData() *RunResult

Jump to

Keyboard shortcuts

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