configuration

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Port            string `json:"port"`
	Debug           bool   `json:"debug"`
	EnableSwaggerUi bool   `json:"enable_swagger_ui"`
	EditForward     string `json:"edit_forward"`
	DevNotifierUrl  string `json:"dev_notifier_url"`

	DisableCom bool `json:"disable_com"`

	KafkaUrl                  string `json:"kafka_url"`
	DefaultKafkaConsumerGroup string `json:"default_kafka_consumer_group"`
	DoneTopic                 string `json:"done_topic"`
	HandleDoneWait            bool   `json:"handle_done_wait"`
	KafkaDoneBatchSize        int    `json:"kafka_done_batch_size"`

	MongoUrl                   string `json:"mongo_url"`
	MongoDatabase              string `json:"mongo_database"`
	MongoPermissionsCollection string `json:"mongo_permissions_collection"`
	MongoTopicsCollection      string `json:"mongo_topics_collection"`

	DisabledTopicConsumers []string `json:"disabled_topic_consumers"` //may be needed to fix service with broken topic consumer

	CheckDbTopicChangesInterval Duration `json:"check_db_topic_changes_interval"`
}

func Load

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

loads config from json in location and used environment variables (e.g KafkaUrl --> KAFKA_URL)

type Duration

type Duration struct {
	// contains filtered or unexported fields
}

func (*Duration) GetDuration

func (this *Duration) GetDuration() time.Duration

func (*Duration) SetDuration

func (this *Duration) SetDuration(dur time.Duration)

func (*Duration) SetString

func (this *Duration) SetString(str string) error

func (*Duration) UnmarshalJSON

func (this *Duration) UnmarshalJSON(bytes []byte) (err error)

Jump to

Keyboard shortcuts

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