nspcc-dev / neofs-node

NeoFS is a decentralized distributed object storage integrated with the Neo blockchain
https://fs.neo.org
GNU General Public License v3.0
32 stars 38 forks source link

Make validation more simple and reuse config in components #2994

Open End-rey opened 3 weeks ago

End-rey commented 3 weeks ago

Is your feature request related to a problem? Please describe.

I'm always frustrated when additional proprietary logic is used for validation, when existing solutions can be used. It is also unpleasant when the config structure is used only for validation, although it can be used in various components.

Describe the solution you'd like

Make validation through viper.UnmarshalExact and reuse the config struct in the components.

Describe alternatives you've considered

Keeping as is, but with a lot of code and duplicate structures.

Additional context

Refs #2981. First, you need to change the config so that you can perform validation simply: #2993.