Skip to content
New issue

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

Add optional attributes [key:value] pair #1

Open
LukaGiorgadze opened this issue Sep 2, 2023 · 0 comments
Open

Add optional attributes [key:value] pair #1

LukaGiorgadze opened this issue Sep 2, 2023 · 0 comments
Assignees
Labels
feature New feature or request

Comments

@LukaGiorgadze
Copy link
Contributor

LukaGiorgadze commented Sep 2, 2023

Add optional Attributes field for ModuleConfig

type ModuleConfig struct {
	...
	Attributes    map[string]string
	....
}

These attributes will be accessible within the module with the help of Module Development Kit mdk.

val := mdk.Attr("key") // val or nil
//  Or mdk.GetAttr("key") ? 

optionally, good to have built-in converters:

val := mdk.Attr("name").String()
val := mdk.Attr("age").Int()
...
@LukaGiorgadze LukaGiorgadze added the feature New feature or request label Sep 2, 2023
@LukaGiorgadze LukaGiorgadze self-assigned this Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant