Skip to content

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 this 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