github

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PluginID           uint32 = 8
	PluginName                = "github"
	PluginDescription         = "Reads github webhook events, by listening on a socket or by reading events from disk"
	PluginContact             = "github.com/falcosecurity/plugins"
	PluginVersion             = "0.7.3"
	PluginEventSource         = "github"
	ExtractEventSource        = "github"
)

Variables

This section is empty.

Functions

func GetGithubToken

func GetGithubToken(secretsDir string) (string, error)

Types

type Plugin

type Plugin struct {
	plugins.BasePlugin
	// contains filtered or unexported fields
}

Plugin represent the GithHub plugin

func (*Plugin) Extract

func (p *Plugin) Extract(req sdk.ExtractRequest, evt sdk.EventReader) error

Extract a field value from an event.

func (*Plugin) Fields

func (p *Plugin) Fields() []sdk.FieldEntry

Return the fields supported for extraction.

func (*Plugin) Info

func (p *Plugin) Info() *plugins.Info

Return the plugin info to the framework.

func (*Plugin) Init

func (p *Plugin) Init(cfg string) error

Initialize the plugin state.

func (*Plugin) InitSchema

func (p *Plugin) InitSchema() *sdk.SchemaInfo

func (*Plugin) Open

func (p *Plugin) Open(params string) (source.Instance, error)

Open an event stream and return an open plugin instance.

func (*Plugin) OpenParams

func (p *Plugin) OpenParams() ([]sdk.OpenParam, error)

func (*Plugin) String

func (p *Plugin) String(evt sdk.EventReader) (string, error)

Provide a string representation for an event.

type PluginConfig

type PluginConfig struct {
	Token              string `` /* 212-byte string literal not displayed */
	WebsocketServerURL string `` /* 178-byte string literal not displayed */
	SecretsDir         string `` /* 409-byte string literal not displayed */
	UseHTTPs           bool   `` /* 444-byte string literal not displayed */
	UseAsync           bool   `` /* 153-byte string literal not displayed */
}

PluginConfig represents a configuration of the GitHub plugin

func (*PluginConfig) Reset

func (p *PluginConfig) Reset()

Reset sets the configuration to its default values

type PluginInstance

type PluginInstance struct {
	source.BaseInstance
	// contains filtered or unexported fields
}

PluginInstance represents an opened instance of the plugin, which is returned by Open() and deinitialized during Close().

func (*PluginInstance) Close

func (o *PluginInstance) Close()

Closing the event stream and deinitialize the open plugin instance.

func (*PluginInstance) NextBatch

func (o *PluginInstance) NextBatch(pState sdk.PluginState, evts sdk.EventWriters) (int, error)

Produce and return a new batch of events.

type RepoInfo

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

Jump to

Keyboard shortcuts

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