-
Notifications
You must be signed in to change notification settings - Fork 91
Open
Description
Imagine a configuration like
item1:
type: foo
struct:
- plugin1.struct1
- my.file1.struct1
Now, for some reason or other, you want all struct items to be (e.g.) cached, databased or update-enforced or the like.
You could
- modify the plugins (or your own) struct definition
- copy a plugins struct definition to your own and modify
- add all struct items manually and add your attribute
- ...?
Suggestion:
item1:
type: foo
struct:
- plugin1.struct1
- my.file1.struct1
struct_attrs:
- database: init
- enforce_updates: true
item2:
type: foo
struct:
- plugin1.struct1
- database: init
- enforce_updates: true
- my.file1.struct1
This would apply the given attributes (database and enforce_updates) to all struct items (item1) or the plugin1.struct1-items (item2) respectively.
The first variant is easier to read, but can only be applied to all structs; variant 2 is less easy to read and more error-prone considering the more complex formatting, but can be applied more differentiated.
Maybe even other ways of defining attributes come to mind...
Metadata
Metadata
Assignees
Labels
No labels