configuration

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Trace *log.Logger
	Info  *log.Logger
	Error *log.Logger
)
View Source
var ConfFile string
View Source
var Config = new(Configuration)

Functions

func IsConfigRelevantFlagSet

func IsConfigRelevantFlagSet(c *cli.Context) bool

func UserHomeDir added in v1.13.0

func UserHomeDir() string

Find the current users home dir

Types

type Configuration

type Configuration struct {
	SearchTarget     SearchTarget
	QueryDefinition  QueryDefinition
	InitialEntries   int
	TunnelWait       int
	Follow           bool `json:"-"`
	Raw              bool `json:"-"`
	LineNo           bool `json:"-"`
	Descending       bool `json:"-"`
	Count            bool `json:"-"`
	AddId            bool `json:"-"`
	PrettyPrint      bool `json:"-"`
	PrintTerms       bool `json:"-"`
	PrintFields      bool `json:"-"`
	ConfigFile       string
	User             string
	Password         string
	Verbose          bool `json:"-"`
	MoreVerbose      bool `json:"-"`
	TraceRequests    bool `json:"-"`
	SSHTunnelParams  string
	SSHTunnelHop     string
	SocksProxy       string
	SaveQuery        bool            `json:"-"`
	Delimiter        bool            `json:"-"`
	Detail           bool            `json:"-"`
	Output           string          `json:"-"`
	Confirm          bool            `json:"-"`
	OutputStyle      string          `json:"-"`
	RoleNames        cli.StringSlice `json:"-"`
	FullName         string          `json:"-"`
	EmailAddress     string          `json:"-"`
	RoleTemplateFile string          `json:"-"`
	TokenExpiryTime  string          `json:"-"`
}

func LoadDefault

func LoadDefault(confFile string) (conf *Configuration, err error)

func (*Configuration) Copy

func (c *Configuration) Copy(dest *Configuration, ctxt *cli.Context) *Configuration

func (*Configuration) DefineCoreFlags added in v1.13.0

func (config *Configuration) DefineCoreFlags()

func (*Configuration) Flags

func (config *Configuration) Flags() []cli.Flag

func (*Configuration) IsListOnly

func (c *Configuration) IsListOnly() bool

Elktail will work in list-only (no follow) mode if appropriate flag is set or if query has date-time filtering enabled if follow and startdate are not set together

func (*Configuration) IsPrettyPrint added in v1.5.0

func (c *Configuration) IsPrettyPrint() bool

func (*Configuration) IsRaw

func (c *Configuration) IsRaw() bool

func (*Configuration) PrintCmdLine added in v1.10.0

func (c *Configuration) PrintCmdLine() string

func (*Configuration) SaveDefault

func (c *Configuration) SaveDefault()

func (*Configuration) Setup added in v1.10.2

func (c *Configuration) Setup()

type QueryDefinition

type QueryDefinition struct {
	Terms           []string
	Format          string
	TimestampField  string
	AfterDateTime   string `json:"-"`
	BeforeDateTime  string `json:"-"`
	ContextSpanTime string `json:"-"`
}

func (*QueryDefinition) IsDateTimeFiltered

func (q *QueryDefinition) IsDateTimeFiltered() bool

type SearchTarget

type SearchTarget struct {
	Url          string
	TunnelUrl    string `json:"-"`
	IndexPattern string
	CaCert       string
	Cert         string
	Key          string
	Insecure     bool
	APIKey       string
}

Jump to

Keyboard shortcuts

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