configuration

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleEnvironmentVars

func HandleEnvironmentVars(config Config)

preparations for docker

Types

type Config

type Config = *ConfigStruct

func LoadConfig

func LoadConfig(location string) (config Config, err error)

type ConfigStruct

type ConfigStruct struct {
	Debug bool `json:"debug"`

	ServerPort string `json:"server_port"`
	LogLevel   string `json:"log_level"`

	KafkaUrl string `json:"kafka_url"`

	DoneTopic string `json:"done_topic"`

	TopicFilter []string `json:"topic_filter"` //optional; default all; comma seperated list of topics that may be consumed; may use '{{.annotations}}' or '{{.resources}}' for all annotation or resource topics

	PermTopic string `json:"perm_topic"`

	LogDeprecatedCallsToFile string `json:"log_deprecated_calls_to_file"` //must contain valid path for a log file ore an empty sting, which signals not file logging

	ResultModifiers map[string][]ResultModifier `json:"result_modifiers"`

	Timeout                             string                                       `json:"timeout"`
	MaxRetry                            int                                          `json:"max_retry"`
	BulkFlushInterval                   string                                       `json:"bulk_flush_interval"`
	IndexTypeMapping                    map[string]map[string]map[string]interface{} `json:"index_type_mapping"`
	BulkWorkerCount                     int64                                        `json:"bulk_worker_count"`
	UseBulkWorkerForAnnotations         bool                                         `json:"use_bulk_worker_for_annotations"`
	EnableCombinedWildcardFeatureSearch bool                                         `json:"enable_combined_wildcard_feature_search"`

	JwtPubRsa string `json:"jwt_pub_rsa"`
	ForceUser string `json:"force_user"`
	ForceAuth string `json:"force_auth"`

	Resources               map[string]ResourceConfig `json:"resources"`
	ResourceList            []string                  `json:"-"`
	AnnotationResourceIndex map[string][]string       `json:"-"`

	GroupId string `json:"group_id"`

	HttpServerTimeout     string `json:"http_server_timeout"`
	HttpServerReadTimeout string `json:"http_server_read_timeout"`

	FatalErrHandler func(v ...interface{}) `json:"-"`

	OpenSearchInsecureSkipVerify    bool   `json:"open_search_insecure_skip_verify"`
	OpenSearchUrls                  string `json:"open_search_urls"`
	OpenSearchUsername              string `json:"open_search_username"`
	OpenSearchPassword              string `json:"open_search_password"`
	DiscoverOpenSearchNodesOnStart  bool   `json:"discover_open_search_nodes_on_start"` //default off, we use the load balancer
	DiscoverOpenSearchNodesInterval string `json:"discover_open_search_nodes_interval"` //default off, we use the load balancer
}

func (*ConfigStruct) HandleFatalError

func (this *ConfigStruct) HandleFatalError(v ...interface{})

type Feature

type Feature struct {
	Name                     string
	Path                     string
	FirstOf                  []string
	ResultListToFirstElement bool
	ConcatListElementFields  []string
}

type ModifierCondition

type ModifierCondition struct {
	Path     string `json:"path"`
	Operator string `json:"operator"`
}

type ModifierReference

type ModifierReference struct {
	Resource   string      `json:"resource"`
	ResourceId string      `json:"resource_id"`
	Path       string      `json:"path"`
	Default    interface{} `json:"default"`
}

type ResourceConfig

type ResourceConfig struct {
	Features           []Feature            `json:"features"`
	Annotations        map[string][]Feature `json:"annotations"`
	InitialGroupRights map[string]string    `json:"initial_group_rights"`
}

type ResultModifier

type ResultModifier struct {
	Modifier string            `json:"modifier"`
	Template *TemplateModifier `json:"template"`
}

type TemplateModifier

type TemplateModifier struct {
	Path       string                       `json:"path"`
	Value      string                       `json:"value"`
	Conditions []ModifierCondition          `json:"conditions"`
	References map[string]ModifierReference `json:"references"`
}

Jump to

Keyboard shortcuts

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