config

package
v1.0.16-herb-centrifug... Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigDefaultJSON = []byte(`
{
	"APPLICATION_NAME": "in-environment",
	"APPLICATION_ENVIRONMENT": "in-environment",
	"PRETTY_LOG": false,
	"LOG_LEVEL": "info",
	"PORT": 50051,
	"REST_PORT": 50052,
	"OAUTH2_PORT": 50053,
	"CloudEventToKafkaMode": "default",
	"CUSTOM_STRING": "some default value",
	"SOME_SECRET": "password",
	"GRPC_GATEWAY_ENABLED": true,
	"JWT_VALIDATORS": {},
	"DD_PROFILER_CONFIG": {
		"ENABLED": false,
		"SERVICE_NAME": "in-environment",
		"APPLICATION_ENVIRONMENT": "in-environment",
		"VERSION": "1.0.0"
	},
	"KAFKA_CONFIG": {
		"SEEDS": ["localhost:9093"],
		"GROUP": "$Default",
		"TOPIC": "cloudevents-core"
	},
	"KAFKA_DEAD_LETTER_CONFIG": {
		"SEEDS": ["localhost:9093"],
		"GROUP": "$Default",
		"TOPIC": "cloudevents-core-deadletter"
	}

  }
`)

ConfigDefaultJSON default json

Functions

This section is empty.

Types

type Config

type Config struct {
	fluffycore_contracts_config.CoreConfig `mapstructure:",squash"`

	// CloudEventToKafkaMode is the mode for sending CloudEvents to Kafka:default,kafka-headers-value
	// default: publishes to kafka the entire CloudEvent as a JSON string as the kafka value
	// kafka-headers-value: publishes to kafka the CloudEvent.Data as a JSON string, and the CloudEvent.Attributes as kafka headers
	//------------------------------------------------------------------------------------------------------------------------------------------
	CloudEventToKafkaMode string                                  `json:"cloudEventToKafkaMode" mapstructure:"CLOUD_EVENT_TO_KAFKA_MODE"`
	CustomString          string                                  `json:"CUSTOM_STRING" mapstructure:"CUSTOM_STRING"`
	SomeSecret            string                                  `json:"SOME_SECRET" mapstructure:"SOME_SECRET" redact:"true"`
	OAuth2Port            int                                     `json:"oauth2Port"  mapstructure:"OAUTH2_PORT"`
	JWTValidators         JWTValidators                           `json:"jwtValidators" mapstructure:"JWT_VALIDATORS"`
	DDProfilerConfig      *fluffycore_contracts_ddprofiler.Config `json:"ddProfilerConfig" mapstructure:"DD_PROFILER_CONFIG"`
	KafkaConfig           KafkaConfig                             `json:"kafkaConfig" mapstructure:"KAFKA_CONFIG"`
	KafkaDeadLetterConfig KafkaConfig                             `json:"kafkaDeadLetterConfig" mapstructure:"KAFKA_DEAD_LETTER_CONFIG"`
}

type ConfigFiles added in v1.0.14

type ConfigFiles struct {
	MastodonPath string `json:"mastodonPath"`
}

type InitialConfig added in v1.0.14

type InitialConfig struct {
	ConfigFiles ConfigFiles `json:"configFiles"`
}

type JWTValidators

type JWTValidators struct {
	Issuers  []string `json:"issuers" mapstructure:"ISSUERS"`
	JWKSURLS []string `json:"jwksUrls" mapstructure:"JWKS_URLS"`
}

type KafkaConfig

type KafkaConfig struct {
	Seeds []string `json:"seeds" mapstructure:"SEEDS"`
	Group string   `json:"group" mapstructure:"GROUP"`
	Topic string   `json:"topic" mapstructure:"TOPIC"`
}

Jump to

Keyboard shortcuts

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