Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrMalformedReleaseDate = errors.New("release date is in unexpected format")
ErrMalformedReleaseDate indicates that the release date could not be parsed.
var ErrMissingBrowser = errors.New("browser not found in bcd data")
ErrMissingBrowser indicates the filtered browser was not found in the bcd data.
var ErrNoBrowserFiltersPresent = errors.New("no browser filters present")
ErrNoBrowserFiltersPresent indicates that no filters are present.
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 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.