changeprovider

package
v0.3.0-20260805154417-... Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

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.
Package routing provides a ChangeProvider that dispatches URIs to downstream change providers based on the URI's change type.
Package routing provides a ChangeProvider that dispatches URIs to downstream change providers based on the URI's change type.

Jump to

Keyboard shortcuts

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