Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnknownAssetVersion = errors.New("unknown asset version") ErrUnsupportedAssetVersion = errors.New("unsupported asset version") )
Functions ¶
This section is empty.
Types ¶
type AssetGetter ¶
type AssetGetter interface { DownloadFileFromRelease( ctx context.Context, owner, repo string, httpClient *http.Client, filePattern string) (*gh.ReleaseFile, error) }
AssetGetter describes the behavior to get a certain asset from a github release.
type AssetParser ¶
type AssetParser interface {
Parse(io.ReadCloser) (*webdxfeaturetypes.ProcessedWebFeaturesData, error)
}
AssetParser describes the behavior to parse the io.ReadCloser from AssetGetter into the expected data type.
type JobArguments ¶
type JobArguments struct {
// contains filtered or unexported fields
}
func NewJobArguments ¶
func NewJobArguments(assetName, repoOwner, repoName string, startAt, endAt time.Time) JobArguments
type WebDXGroupStorer ¶
type WebDXGroupStorer interface { InsertWebFeatureGroups( ctx context.Context, featureData map[string]webdxfeaturetypes.FeatureValue, groupData map[string]webdxfeaturetypes.GroupData) error }
WebDXGroupStorer describes the logic to insert the groups that were returned by the AssetParser.
type WebDXSnapshotStorer ¶
type WebDXSnapshotStorer interface { InsertWebFeatureSnapshots( ctx context.Context, featureKeyToID map[string]string, featureData map[string]webdxfeaturetypes.FeatureValue, snapshotData map[string]webdxfeaturetypes.SnapshotData) error }
WebDXSnapshotStorer describes the logic to insert the snapshots that were returned by the AssetParser.
type WebFeatureMetadataStorer ¶
type WebFeatureMetadataStorer interface { InsertWebFeaturesMetadata( ctx context.Context, featureKeyToID map[string]string, data map[string]webdxfeaturetypes.FeatureValue) error }
WebFeatureMetadataStorer describes the logic to insert the non-relation metadata about web features that were returned by the AssetParser.
type WebFeatureStorer ¶
type WebFeatureStorer interface { InsertWebFeatures( ctx context.Context, data *webdxfeaturetypes.ProcessedWebFeaturesData, startAt time.Time, endAt time.Time) (map[string]string, error) InsertMovedWebFeatures( ctx context.Context, data map[string]webdxfeaturetypes.FeatureMovedData, ) error InsertSplitWebFeatures( ctx context.Context, data map[string]webdxfeaturetypes.FeatureSplitData, ) error }
WebFeatureStorer describes the logic to insert the web features that were returned by the AssetParser.
type WebFeaturesJobProcessor ¶
type WebFeaturesJobProcessor struct {
// contains filtered or unexported fields
}
func NewWebFeaturesJobProcessor ¶
func NewWebFeaturesJobProcessor(assetGetter AssetGetter, storer WebFeatureStorer, metadataStorer WebFeatureMetadataStorer, groupStorer WebDXGroupStorer, snapshotStorer WebDXSnapshotStorer, webFeaturesDataV3Parser AssetParser, ) WebFeaturesJobProcessor
func (WebFeaturesJobProcessor) Process ¶
func (p WebFeaturesJobProcessor) Process(ctx context.Context, job JobArguments) error
Click to show internal directories.
Click to hide internal directories.