config

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: MIT Imports: 11 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MatchNamers FirstMatcher
}

func GetConfig

func GetConfig(content string, debug bool) (*Config, error)

GetConfig extracts Config from content by parsing it as YAML.

func ReadFile

func ReadFile(cfgpath string, debug bool) (*Config, error)

ReadRecipesFile opens the named file and extracts recipes from it.

func (*Config) UnmarshalYAML added in v0.7.6

func (c *Config) UnmarshalYAML(unmarshal func(v interface{}) error) error

type FirstMatcher

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

func (FirstMatcher) MatchAndName

func (f FirstMatcher) MatchAndName(nacl common.ProcAttributes) (bool, string)

func (FirstMatcher) String added in v0.3.7

func (f FirstMatcher) String() string

type Matcher

type Matcher interface {
	// Match returns empty string for no match, or the group name on success.
	Match(common.ProcAttributes) bool
}

type MatcherGroup added in v0.7.6

type MatcherGroup struct {
	Name         string   `yaml:"name"`
	CommRules    []string `yaml:"comm"`
	ExeRules     []string `yaml:"exe"`
	CmdlineRules []string `yaml:"cmdline"`
}

type MatcherRules added in v0.7.6

type MatcherRules []MatcherGroup

func (MatcherRules) ToConfig added in v0.7.6

func (r MatcherRules) ToConfig() (*Config, error)

Jump to

Keyboard shortcuts

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