configuration

package
v0.0.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TimeNow = func() time.Time {
	return time.Now()
}

replace when testing

Functions

This section is empty.

Types

type Config

type Config struct {
	ServerPort                           string   `json:"server_port"`
	Debug                                bool     `json:"debug"`
	EnableSwaggerUi                      bool     `json:"enable_swagger_ui"`
	CamundaUrl                           string   `json:"camunda_url" config:"secret"`
	DeviceSelectionApi                   string   `json:"device_selection_api"`
	PermissionsUrl                       string   `json:"permissions_url"`
	PermissionsCmdUrl                    string   `json:"permissions_cmd_url"`
	NotificationUrl                      string   `json:"notification_url"`
	KafkaUrl                             string   `json:"kafka_url"`
	ConsumerGroup                        string   `json:"consumer_group"`
	KafkaSmartServiceReleaseTopic        string   `json:"kafka_smart_service_release_topic"`
	KafkaCharacteristicsTopic            string   `json:"kafka_characteristics_topic"` //used for permissions-search-query
	EditForward                          string   `json:"edit_forward"`
	ForwardedEndpoints                   []string `json:"forwarded_endpoints"`
	MongoUrl                             string   `json:"mongo_url"`
	MongoWithTransactions                bool     `json:"mongo_with_transactions"`
	MongoTable                           string   `json:"mongo_table"`
	MongoCollectionDesign                string   `json:"mongo_collection_design"`
	MongoCollectionRelease               string   `json:"mongo_collection_release"`
	MongoCollectionInstance              string   `json:"mongo_collection_instance"`
	MongoCollectionModule                string   `json:"mongo_collection_module"`
	MongoCollectionVariables             string   `json:"mongo_collection_variables"`
	AuthEndpoint                         string   `json:"auth_endpoint"`
	AuthClientId                         string   `json:"auth_client_id" config:"secret"`
	AuthClientSecret                     string   `json:"auth_client_secret" config:"secret"`
	AuthExpirationTimeBuffer             float64  `json:"auth_expiration_time_buffer"`
	TokenCacheDefaultExpirationInSeconds int      `json:"token_cache_default_expiration_in_seconds"`
	TokenCacheSizeInMb                   int      `json:"token_cache_size_in_mb"`
	CleanupCycle                         string   `json:"cleanup_cycle"`
}

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)

Jump to

Keyboard shortcuts

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