-
Notifications
You must be signed in to change notification settings - Fork 3
/
identity_data_def.go
40 lines (34 loc) · 1.17 KB
/
identity_data_def.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package eventline
type IdentityDataType string
const (
IdentityDataTypeString IdentityDataType = "string"
IdentityDataTypeStringList IdentityDataType = "string_list"
IdentityDataTypeEnum IdentityDataType = "enum"
IdentityDataTypeEnumList IdentityDataType = "enum_list"
IdentityDataTypeDate IdentityDataType = "date"
IdentityDataTypeURI IdentityDataType = "uri"
IdentityDataTypeTextBlock IdentityDataType = "text_block"
IdentityDataTypeBoolean IdentityDataType = "boolean"
)
type IdentityDataDef struct {
Entries []*IdentityDataEntry
}
type IdentityDataEntry struct {
Key string
Label string
Value interface{}
Type IdentityDataType
EnumValues []string
PreselectedEnumValues []string
MultiselectEnumSize int // size of the multiselect html element
Optional bool
Verbatim bool
Secret bool
Internal bool // set by eventline, not by the user
}
func NewIdentityDataDef() *IdentityDataDef {
return &IdentityDataDef{}
}
func (v *IdentityDataDef) AddEntry(e *IdentityDataEntry) {
v.Entries = append(v.Entries, e)
}