changeprovider

package
v0.1.0-dev9 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: Apache-2.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangeProvider

type ChangeProvider interface {
	// Get retrieves change information for the provided request.
	// It is handed the request identity and reads request.Change itself.
	// For a Change with multiple URIs (e.g., stacked PRs), returns one ChangeInfo per URI.
	// Returns a slice of ChangeInfo, one for each change in the stack.
	Get(ctx context.Context, request entity.Request) ([]entity.ChangeInfo, error)
}

ChangeProvider fetches change metadata from external systems Each implementation is configured for a specific provider (GitHub, GitLab, Phabricator).

The change value types it produces — entity.ChangeInfo, entity.ChangeDetails, entity.Author, entity.ChangedFile — live in the entity package so the same typed facts can be persisted (entity.ChangeRecord) and scored without re-declaration.

type Config

type Config struct {
	// QueueName identifies the queue this ChangeProvider serves.
	QueueName string
}

Config carries the per-queue identity handed to a Factory. The system knows only the queue name; everything an implementation needs is injected at construction by the integrator.

type Factory

type Factory interface {
	// For returns the ChangeProvider for the given queue.
	For(cfg Config) (ChangeProvider, error)
}

Factory builds the ChangeProvider for a queue. Implementations are provided by integrators (and tests) and inject whatever they need at construction.

Directories

Path Synopsis
Package fake provides a changeprovider.ChangeProvider whose outcome is driven by the input change.
Package fake provides a changeprovider.ChangeProvider whose outcome is driven by the input change.
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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