config

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultProfile = Profile{
	Name:     "default",
	Pipeline: Pipeline{},
	DisplayConfig: DisplayConfig{
		Columns: []ColumnConfig{
			{Title: "id", Width: 0, ValueKey: ValueKeyId},
			{Title: "log", Width: 1, ValueKey: ValueKeyRaw},
		},
	},
}

Functions

This section is empty.

Types

type ColumnConfig

type ColumnConfig struct {
	Title    string
	Width    float32
	ValueKey string
}

type Config

type Config struct {
	DefaultProfile string
	Profiles       []Profile
}

func Setup

func Setup() Config

func (Config) GetProfileByName

func (c Config) GetProfileByName(name string) (*Profile, error)

func (Config) Validate

func (c Config) Validate(validate ValidationData) error

type DisplayConfig

type DisplayConfig struct {
	Columns []ColumnConfig
}

type Parser

type Parser struct {
	Regex  *ParserRegex
	Logfmt *ParserLogfmt
	Json   *ParserJson
}

type ParserJson

type ParserJson struct{}

type ParserLogfmt

type ParserLogfmt struct{}

type ParserRegex

type ParserRegex struct {
	Values []ParserRegexValue
}

type ParserRegexValue

type ParserRegexValue struct {
	Key   string
	Regex string
}

type Pipeline

type Pipeline struct {
	Processors []Processor
}

type Processor

type Processor struct {
	InputKey string
	Parser   *Parser
	Remapper *Remapper
}

type Profile

type Profile struct {
	Name          string
	Pipeline      Pipeline
	DisplayConfig DisplayConfig
}

type Remapper

type Remapper struct {
	TargetKey string
}

type ReservedValueKey

type ReservedValueKey = string
const (
	ValueKeyId  ReservedValueKey = "__id"
	ValueKeyRaw ReservedValueKey = "__raw"
)

type ValidationData

type ValidationData struct {
	SelectedProfile string
}

Jump to

Keyboard shortcuts

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