git

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2025 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "git"
)

Variables

This section is empty.

Functions

func Factory

func Factory() plugins.Factory

Types

type Config

type Config struct {
	URL      string `json:"url"`
	FilePath string `json:"file_path"`           // if path points to a file, then only that file is loaded, otherwise scans for any json/yaml/xml files recursively, from root if path is empty
	Commit   string `json:"commit,omitempty"`    // if empty then Branch is used
	Branch   string `json:"branch,omitempty"`    // if empty then Ref is used
	Ref      string `json:"reference,omitempty"` // if empty then `refs/heads/main`, if `main` failed, then `refs/heads/master`

	// Basic auth
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`

	// PAT auth
	Token string `json:"token,omitempty"`

	// SSH mode
	PrivateKey string `json:"private_key,omitempty"` // key in PEM format or a file path
	Passphrase string `json:"passphrase,omitempty"`

	Interval string `json:"polling_interval,omitempty"` // default 5m, min 10s
	Path     string `json:"path"`

	RegoTransformRule string `json:"rego_transform"`
	// contains filtered or unexported fields
}

Config represents the configuration of the git data plugin

func (Config) Equal

func (c Config) Equal(other Config) bool

type Data

type Data struct {
	Config Config

	*transform.Rego
	// contains filtered or unexported fields
}

Data plugin

func (*Data) Name

func (c *Data) Name() string

dataPlugin accessors

func (*Data) Path

func (c *Data) Path() storage.Path

func (*Data) Reconfigure

func (c *Data) Reconfigure(ctx context.Context, next any)

func (*Data) Start

func (c *Data) Start(ctx context.Context) error

func (*Data) Stop

func (c *Data) Stop(context.Context)

Jump to

Keyboard shortcuts

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