Skip to content

Commit 6eea922

Browse files
authored
Metadata implementation
1 parent bf5dbda commit 6eea922

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

internal/core/metadata.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package core
2+
3+
type WorkflowInstanceMetadata map[string]string
4+
5+
func (wim WorkflowInstanceMetadata) Get(key string) string {
6+
return wim[key]
7+
}
8+
9+
func (wim WorkflowInstanceMetadata) Set(key string, value string) {
10+
wim[key] = value
11+
}
12+
13+
func (wim WorkflowInstanceMetadata) Keys() []string {
14+
r := make([]string, 0, len(wim))
15+
16+
for k := range wim {
17+
r = append(r, k)
18+
}
19+
20+
return r
21+
}

0 commit comments

Comments
 (0)