8000 feat(lib): add a config package to load application configuration using Viper by akkahshh24 · Pull Request #28 · Zomato/espresso · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(lib): add a config package to load application configuration using Viper #28

New issue 8000

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from

Conversation

akkahshh24
Copy link

What does this PR do?

Introduces a new config package that loads application configuration from a YAML file espressoconfig.yaml at startup.

Why is thi 8000 s change necessary?

Centralizing configuration management makes the application more maintainable.
Loading configuration from a YAML file allows easier updates without modifying code.

Module

lib

Related Issues

Related to #25

UploaderPartSizeMB int64 `mapstructure:"uploader_part_size_mb"`
UploaderConcurrency int `mapstructure:"uploader_concurrency"`
DownloaderPartSizeMB int64 `mapstructure:"downloader_part_size_mb"`
DownloaderConcurrency int `mapstructure:"downloader_concurrency"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whats the use of the mapstructure tag?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's used by Viper to map the field name in the configuration file to the name in our Go struct.
For example,
uploader_concurrency from the YAML file should be mapped to UploaderConcurrency in our struct.

@Ashish-walkingn8mare
Copy link
Contributor

related to #25

@akkahshh24
Copy link
Author

@Ashish-walkingn8mare Added Credential Store.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0