workflow

package
v0.0.0-...-1632c4c Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMalformedReleaseDate = errors.New("release date is in unexpected format")

ErrMalformedReleaseDate indicates that the release date could not be parsed.

View Source
var ErrMissingBrowser = errors.New("browser not found in bcd data")

ErrMissingBrowser indicates the filtered browser was not found in the bcd data.

View Source
var ErrNoBrowserFiltersPresent = errors.New("no browser filters present")

ErrNoBrowserFiltersPresent indicates that no filters are present.

View Source
var ErrUnknownBrowserFilter = errors.New("specified browser filter is unknown")

ErrUnknownBrowserFilter indicates that the filter is unknown. Developers may need to update lib/gcpspanner/spanneradapters/bcdconsumertypes/types.go.

Functions

This section is empty.

Types

type BCDDataFilter

type BCDDataFilter struct{}

func (BCDDataFilter) FilterData

func (f BCDDataFilter) FilterData(
	in *data.BCDData, filteredBrowsers []string) ([]bcdconsumertypes.BrowserRelease, error)

TODO: Pass in context to be used by slog.ErrorContext.

type BCDJobProcessor

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

func NewBCDJobProcessor

func NewBCDJobProcessor(dataGetter DataGetter,
	dataParser DataParser,
	dataFilter DataFilter,
	dataStorer DataStorer,
	repoOwner string,
	repoName string,
	releaseAssetFilename string) BCDJobProcessor

func (BCDJobProcessor) Process

func (p BCDJobProcessor) Process(
	ctx context.Context,
	job JobArguments) error

type DataFilter

type DataFilter interface {
	FilterData(*data.BCDData, []string) ([]bcdconsumertypes.BrowserRelease, error)
}

DataFilter describes the behavior to take full BCDData and only filter for the applicable browser releases.

type DataGetter

type DataGetter interface {
	DownloadFileFromRelease(
		ctx context.Context,
		owner, repo string,
		httpClient *http.Client,
		filePattern string) (*gh.ReleaseFile, error)
}

type DataParser

type DataParser interface {
	Parse(in io.ReadCloser) (*data.BCDData, error)
}

DataParser describes the behavior to read raw bytes into the expected BCDData struct.

type DataStorer

type DataStorer interface {
	InsertBrowserReleases(ctx context.Context, releases []bcdconsumertypes.BrowserRelease) error
}

DataStorer describes the behavior to store the release information.

type JobArguments

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

func NewJobArguments

func NewJobArguments(browsers []string) JobArguments

type JobProcessor

type JobProcessor interface {
	Process(
		ctx context.Context,
		job JobArguments) error
}

JobProcessor defines the contract for processing a single job within the BCD Releases workflow.

Jump to

Keyboard shortcuts

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