git

package
v0.0.66 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package git provides the git rule data ingest engine

Package git provides the git rule data ingest engine

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type Git

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

Git is the engine for a rule type that uses git data ingest

func NewGitIngester

func NewGitIngester(cfg *pb.GitType, gitprov provifv1.Git) (*Git, error)

NewGitIngester creates a new git rule data ingest engine

func (*Git) GetConfig

func (gi *Git) GetConfig() protoreflect.ProtoMessage

GetConfig returns the config for the git rule data ingest engine

func (*Git) GetType

func (*Git) GetType() string

GetType returns the type of the git rule data ingest engine

func (*Git) Ingest

func (gi *Git) Ingest(ctx context.Context, ent protoreflect.ProtoMessage, params map[string]any) (*engif.Result, error)

Ingest does the actual data ingestion for a rule type by cloning a git repo

type IngesterConfig

type IngesterConfig struct {
	Branch   string `json:"branch" yaml:"branch" mapstructure:"branch"`
	CloneURL string `json:"clone_url" yaml:"clone_url" mapstructure:"clone_url"`
}

IngesterConfig is the profile-provided configuration for the git ingester This allows for users to pass in configuration to the ingester in different calls as opposed to having to set it in the rule type.

Jump to

Keyboard shortcuts

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