config

package
v0.0.0-...-ec92863 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2022 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Copyright (C) 2019 - 2022 MWSOFT This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Copyright (C) 2019 - 2022 MWSOFT This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Copyright (C) 2019 - 2022 MWSOFT This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Copyright (C) 2019 - 2022 MWSOFT This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Copyright (C) 2019 - 2022 MWSOFT This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ES       *ES
	Consumer *Consumer
	DB       *DB
	Health   *Health
}

Config holds the configuration.

func NewConfig

func NewConfig() (cnf *Config, e error)

NewConfig returns the configuration.

type Consumer

type Consumer struct {
	Brokers []string `env:"KAFKA_BROKERS" yaml:"brokers" default:"[192.168.1.229:9092]"`
	Topic   string   `env:"KAFKA_DELETE_MUNICIPALITY_SUPERHERO_TOPIC" yaml:"topic" default:"delete.municipality.superhero"`
	GroupID string   `env:"KAFKA_SUPERHERO_DELETE_GROUP" yaml:"group_id" default:"consumer.superhero.delete.group"`
}

Consumer holds the configuration values for the Kafka consumer.

type DB

type DB struct {
	Host     string `env:"DB_HOST" yaml:"host" default:"192.168.1.229"`
	Port     int    `env:"DB_PORT" yaml:"port" default:"3306"`
	User     string `env:"DB_USER" yaml:"user" default:"dev"`
	Password string `env:"DB_PASSWORD" yaml:"password" default:"Awesome85**"`
	Name     string `env:"CONSUMER_SUPERHERO_DELETE_DB_NAME" yaml:"name" default:"municipality"`
}

DB holds the configuration values for the database.

type ES

type ES struct {
	Host    string `env:"ES_HOST" yaml:"host" default:"192.168.1.229"`
	Port    string `env:"ES_PORT" yaml:"port" default:"9200"`
	Cluster string `env:"ES_CLUSTER" yaml:"cluster" default:"superheromatch"`
	Index   string `env:"ES_INDEX" yaml:"index" default:"superhero"`
}

ES holds the configuration values for the Elasticsearch client.

type Health

type Health struct {
	Port             string `env:"CONSUMER_SUPERHERO_DELETE_HEALTH_SERVER_PORT" yaml:"port" default:":8060"`
	ShutdownEndpoint string `` /* 148-byte string literal not displayed */
	ContentType      string `env:"CONSUMER_SUPERHERO_DELETE_HEALTH_SERVER_CONTENT_TYPE" yaml:"content_type" default:"application/json"`
}

Health holds configuration for health server.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳