options

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: AGPL-3.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

View Source
const (
	QueryBlock     = "query"
	CheckBlock     = "check"
	DashboardBlock = "dashboard"
	DatabaseBlock  = "database"
	GeneralBlock   = "general"
	PluginBlock    = "plugin"
)

hcl options block types

Variables

This section is empty.

Functions

This section is empty.

Types

type CanSetTiming added in v1.6.0

type CanSetTiming interface {
	SetTiming(flag string, r hcl.Range) hcl.Diagnostics
}

type Check

type Check struct {
	Output    *string `hcl:"output" cty:"check_output"`
	Separator *string `hcl:"separator" cty:"check_separator"`
	Header    *bool   `hcl:"header" cty:"check_header"`
	Timing    *bool   `hcl:"timing" cty:"check_timing"`
}

Check options are deprecated and removed. They are kept here for compatibility with old configurations.

func (*Check) ConfigMap

func (t *Check) ConfigMap() map[string]interface{}

ConfigMap creates a config map that can be merged with viper

func (*Check) Merge

func (t *Check) Merge(otherOptions Options)

Merge :: merge other options over the the top of this options object i.e. if a property is set in otherOptions, it takes precedence

func (*Check) SetBaseProperties

func (t *Check) SetBaseProperties(otherOptions Options)

func (*Check) String

func (t *Check) String() string

type Dashboard added in v1.6.0

type Dashboard struct {
	// workspace profile
	Browser *bool `hcl:"browser" cty:"profile_dashboard_browser"`
}

Dashboard options are deprecated and removed. They are kept here for compatibility with old configurations.

func (*Dashboard) ConfigMap added in v1.6.0

func (d *Dashboard) ConfigMap() map[string]interface{}

ConfigMap creates a config map that can be merged with viper

func (*Dashboard) Merge added in v1.6.0

func (d *Dashboard) Merge(otherOptions Options)

Merge :: merge other options over the top of this options object i.e. if a property is set in otherOptions, it takes precedence

func (*Dashboard) SetBaseProperties added in v1.6.0

func (d *Dashboard) SetBaseProperties(otherOptions Options)

func (*Dashboard) String added in v1.6.0

func (d *Dashboard) String() string

type Options

type Options interface {
	// map of config keys to values - used to populate viper
	ConfigMap() map[string]interface{}
	// merge with another options of same type
	Merge(otherOptions Options)
}

type Query

type Query struct {
	Output       *string `hcl:"output" cty:"query_output"`
	Separator    *string `hcl:"separator" cty:"query_separator"`
	Header       *bool   `hcl:"header" cty:"query_header"`
	Multi        *bool   `hcl:"multi" cty:"query_multi"`
	Timing       *string `hcl:"timing" cty:"query_timing"` // parsed manually
	AutoComplete *bool   `hcl:"autocomplete" cty:"query_autocomplete"`
}

General

func (*Query) ConfigMap

func (t *Query) ConfigMap() map[string]interface{}

ConfigMap creates a config map that can be merged with viper

func (*Query) Merge

func (t *Query) Merge(otherOptions Options)

Merge :: merge other options over the the top of this options object i.e. if a property is set in otherOptions, it takes precedence

func (*Query) SetBaseProperties

func (t *Query) SetBaseProperties(otherOptions Options)

func (*Query) SetTiming added in v1.6.0

func (t *Query) SetTiming(flag string, r hcl.Range) hcl.Diagnostics

func (*Query) String

func (t *Query) String() string

type Server

type Server struct {
	Port   *int    `hcl:"port" cty:"port"`
	Listen *string `hcl:"listen" cty:"port"`
}

TODO KAI this is Flowpipe specific - should it be named as such

func (*Server) ConfigMap

func (s *Server) ConfigMap() map[string]interface{}

ConfigMap creates a config map that can be merged with viper

func (*Server) Merge

func (s *Server) Merge(otherOptions Options)

Merge merges other options over the top of this options object i.e. if a property is set in otherOptions, it takes precedence

func (*Server) SetBaseProperties

func (s *Server) SetBaseProperties(otherOptions Options)

TODO KAI what is the difference between merge and SetBaseProperties

func (*Server) String

func (s *Server) String() string

Jump to

Keyboard shortcuts

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