diff --git a/pkg/extension/action.go b/pkg/extension/action.go index 31b76e931025d0e04e7b4f34b306e689b011fc61..886cb2e1b0f11885a17ab68a42662b08ac926671 100644 --- a/pkg/extension/action.go +++ b/pkg/extension/action.go @@ -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 {