Skip to content
Snippets Groups Projects
Commit dbfd7e17 authored by Anton Sattarov's avatar Anton Sattarov
Browse files

add maps of kinds and targets

parent abe93d37
No related branches found
No related tags found
No related merge requests found
......@@ -42,6 +42,7 @@ const (
ResponseInProgress = pb.ActionResponse_IN_PROGRESS
ResponseParametersRequired = pb.ActionResponse_PARAMETERS_REQUIRED
ActionKindDefault = pb.Action_DEFAULT
ActionKindSpace = pb.Action_SPACE
ActionKindEnvironment = pb.Action_ENVIRONMENT
ActionKindCollection = pb.Action_COLLECTION
......@@ -49,6 +50,60 @@ const (
ActionKindItems = pb.Action_ITEMS
ActionKindRevision = pb.Action_REVISION
ActionKindCreate = pb.Action_CREATE
TargetDefault = pb.Target_DEFAULT
TargetModal = pb.Target_MODAL
TargetWide = pb.Target_WIDE
TargetMain = pb.Target_MAIN
TargetDrawer = pb.Target_DRAWER
TargetNotification = pb.Target_NOTIFICATION
TargetBlank = pb.Target_BLANK
TargetNone = pb.Target_NONE
)
var (
TargetsNames = map[ActionTarget]string{
TargetDefault: "DEFAULT",
TargetModal: "MODAL",
TargetWide: "WIDE",
TargetMain: "MAIN",
TargetDrawer: "DRAWER",
TargetNotification: "NOTIFICATION",
TargetBlank: "BLANK",
TargetNone: "NONE",
}
TargetsValue = map[string]ActionTarget{
"DEFAULT": TargetDefault,
"MODAL": TargetModal,
"WIDE": TargetWide,
"MAIN": TargetMain,
"DRAWER": TargetDrawer,
"NOTIFICATION": TargetNotification,
"BLANK": TargetBlank,
"NONE": TargetNone,
}
KindNames = map[ActionKind]string{
ActionKindDefault: "DEFAULT",
ActionKindSpace: "SPACE",
ActionKindEnvironment: "ENVIRONMENT",
ActionKindCollection: "COLLECTION",
ActionKindItem: "ITEM",
ActionKindItems: "ITEMS",
ActionKindRevision: "REVISION",
ActionKindCreate: "CREATE",
}
KindValue = map[string]ActionKind{
"DEFAULT": ActionKindDefault,
"SPACE": ActionKindSpace,
"ENVIRONMENT": ActionKindEnvironment,
"COLLECTION": ActionKindCollection,
"ITEM": ActionKindItem,
"ITEMS": ActionKindItems,
"REVISION": ActionKindRevision,
"CREATE": ActionKindCreate,
}
)
type Action struct {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment