config

package
v0.0.0-...-59477fb Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APP_VERSION = "APP_VERSION"

	ENVIRONMENT = "ENVIRONMENT"
	TOPICS_FILE = "TOPICS_FILE"

	SERVER_PORT = "SERVER_PORT"

	AUTH_PUBLIC_KEY_FILE = "AUTH_PUBLIC_KEY_FILE"

	DATABASE_USER_FILE    = "DATABASE_USER_FILE"
	DATABASE_PASS_FILE    = "DATABASE_PASS_FILE"
	DATABASE_DB_NAME_FILE = "DATABASE_DB_NAME_FILE"
	DATABASE_SCHEME       = "DATABASE_SCHEME"
	DATABASE_DOMAIN       = "DATABASE_DOMAIN"
	DATABASE_PORT         = "DATABASE_PORT"

	KAFKA_BROKERS                              = "KAFKA_BROKERS"
	TOPIC_JOB_CREATE                           = "TOPIC_JOB_CREATE"
	TOPIC_JOB_CREATE_PARTITIONS                = "TOPIC_JOB_CREATE_PARTITIONS"
	TOPIC_JOB_CREATE_REPLICAS                  = "TOPIC_JOB_CREATE_REPLICAS"
	TOPIC_JOB_UPDATE                           = "TOPIC_JOB_UPDATE"
	TOPIC_JOB_UPDATE_PARTITIONS                = "TOPIC_JOB_UPDATE_PARTITIONS"
	TOPIC_JOB_UPDATE_REPLICAS                  = "TOPIC_JOB_UPDATE_REPLICAS"
	TOPIC_JOB_RUN                              = "TOPIC_JOB_RUN"
	TOPIC_JOB_RUN_PARTITIONS                   = "TOPIC_JOB_RUN_PARTITIONS"
	TOPIC_JOB_RUN_REPLICAS                     = "TOPIC_JOB_RUN_REPLICAS"
	TOPIC_JOB_RUN_RESULT                       = "TOPIC_JOB_RUN_RESULT"
	TOPIC_JOB_RUN_RESULT_CONSUMER_GROUP_ID     = "TOPIC_JOB_RUN_RESULT_CONSUMER_GROUP_ID"
	TOPIC_JOB_RUN_RESULT_CONSUMER_WORKER_COUNT = "TOPIC_JOB_RUN_RESULT_CONSUMER_WORKER_COUNT"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AppVersion  string
	Environment string

	ServerPort string

	AuthPublicKey []byte

	DatabaseUser   string
	DatabasePass   string
	DatabaseDBName string
	DatabaseScheme string
	DatabaseDomain string
	DatabasePort   string
	DatabaseURI    string

	KafkaBrokers                         []string
	TopicJobCreate                       string
	TopicJobCreatePartitions             int
	TopicJobCreateReplicas               int
	TopicJobUpdate                       string
	TopicJobUpdatePartitions             int
	TopicJobUpdateReplicas               int
	TopicJobRun                          string
	TopicJobRunPartitions                int
	TopicJobRunReplicas                  int
	TopicJobRunResult                    string
	TopicJobRunResultConsumerGroupID     string
	TopicJobRunResultConsumerWorkerCount int

	Logger_DisableCaller     bool
	Logger_DisableStacktrace bool
	Logger_Encoding          string
	Logger_Level             string
}

func InitConfig

func InitConfig() (*Config, error)

func (*Config) IsDevelopmentEnvironment

func (cfg *Config) IsDevelopmentEnvironment() bool

Jump to

Keyboard shortcuts

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