diff

package
v0.0.51 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package diff provides the diff rule data ingest engine

Package diff provides the diff rule data ingest engine

Package diff provides the diff rule data ingest engine

Index

Constants

View Source
const (
	// DiffRuleDataIngestType is the type of the diff rule data ingest engine
	DiffRuleDataIngestType = "diff"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DependencyEcosystem

type DependencyEcosystem string

DependencyEcosystem is the type of dependency ecosystem

const (
	// DepEcosystemNPM is the npm dependency ecosystem
	DepEcosystemNPM DependencyEcosystem = "npm"
	// DepEcosystemGo is the go dependency ecosystem
	DepEcosystemGo DependencyEcosystem = "go"
	// DepEcosystemPyPI is the python dependency ecosystem
	DepEcosystemPyPI DependencyEcosystem = "pypi"
	// DepEcosystemNone is the fallback value
	DepEcosystemNone DependencyEcosystem = ""
)

type Diff

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

Diff is the diff rule data ingest engine

func NewDiffIngester

func NewDiffIngester(
	cfg *pb.DiffType,
	cli provifv1.GitHub,
) (*Diff, error)

NewDiffIngester creates a new diff ingester

func (*Diff) GetConfig

func (di *Diff) GetConfig() protoreflect.ProtoMessage

GetConfig returns the config for the diff rule data ingest engine

func (*Diff) GetType

func (*Diff) GetType() string

GetType returns the type of the diff rule data ingest engine

func (*Diff) Ingest

func (di *Diff) Ingest(
	ctx context.Context,
	ent protoreflect.ProtoMessage,
	_ map[string]any,
) (*engif.Result, error)

Ingest ingests a diff from a pull request in accordance with its type

type EcosystemMapping

type EcosystemMapping struct {
	Ecosystem DependencyEcosystem `json:"ecosystem" yaml:"ecosystem" mapstructure:"ecosystem"`
	Files     []string            `json:"files" yaml:"files" mapstructure:"files"`
}

EcosystemMapping is the mapping of a dependency ecosystem to a set of files

Jump to

Keyboard shortcuts

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