gitlab.com/evatix-go/core@v1.3.55/reqtype/vars.go (about) 1 package reqtype 2 3 import ( 4 "gitlab.com/evatix-go/core/coreimpl/enumimpl" 5 "gitlab.com/evatix-go/core/internal/reflectinternal" 6 ) 7 8 var ( 9 Ranges = [...]string{ 10 Invalid: "Invalid", 11 Create: "CreateUsingAliasMap", 12 Read: "Read", 13 Update: "Update", 14 Delete: "Delete", 15 Drop: "Drop", 16 CreateOrUpdate: "CreateOrUpdate", 17 ExistCheck: "ExistCheck", 18 SkipOnExist: "SkipOnExist", 19 CreateOrSkipOnExist: "CreateOrSkipOnExist", 20 UpdateOrSkipOnNonExist: "UpdateOrSkipOnNonExist", 21 DeleteOrSkipOnNonExist: "DeleteOrSkipOnNonExist", 22 DropOrSkipOnNonExist: "DropOrSkipOnNonExist", 23 UpdateOnExist: "UpdateOnExist", 24 DropOnExist: "DropOnExist", 25 DropCreate: "DropCreate", 26 Append: "Append", 27 AppendByCompare: "AppendByCompare", 28 AppendByCompareWhereCommentFound: "AppendByCompareWhereCommentFound", 29 AppendLinesByCompare: "AppendLinesByCompare", 30 AppendLines: "AppendLines", 31 CreateOrAppend: "CreateOrAppend", 32 Prepend: "Prepend", 33 CreateOrPrepend: "CreateOrPrepend", 34 PrependLines: "PrependLines", 35 Rename: "Rename", 36 Change: "Change", 37 Merge: "Merge", 38 MergeLines: "MergeLines", 39 GetHttp: "GetHttp", 40 PutHttp: "PutHttp", 41 PostHttp: "PostHttp", 42 DeleteHttp: "DeleteHttp", 43 PatchHttp: "PatchHttp", 44 Touch: "Touch", 45 Start: "Start", 46 Stop: "Stop", 47 Restart: "Restart", 48 Reload: "Reload", 49 StopSleepStart: "StopSleepStart", 50 Suspend: "Suspend", 51 Pause: "Pause", 52 Resumed: "Resumed", 53 TryRestart3Times: "TryRestart3Times", 54 TryRestart5Times: "TryRestart5Times", 55 TryStart3Times: "TryStart3Times", 56 TryStart5Times: "TryStart5Times", 57 TryStop3Times: "TryStop3Times", 58 TryStop5Times: "TryStop5Times", 59 InheritOnly: "InheritOnly", 60 InheritPlusOverride: "InheritPlusOverride", 61 DynamicAction: "DynamicAction", 62 Override: "Override", 63 Overwrite: "Overwrite", 64 Enforce: "Enforce", 65 } 66 67 httpRequests = [...]bool{ 68 GetHttp: true, 69 PutHttp: true, 70 PostHttp: true, 71 DeleteHttp: true, 72 PatchHttp: true, 73 } 74 75 actionRequests = [...]bool{ 76 Start: true, 77 Stop: true, 78 Restart: true, 79 Reload: true, 80 Suspend: true, 81 Pause: true, 82 Resumed: true, 83 } 84 85 RangesMap = map[string]Request{ 86 "Invalid": Invalid, 87 "CreateUsingAliasMap": Create, 88 "Read": Read, 89 "Update": Update, 90 "Delete": Delete, 91 "Drop": Drop, 92 "CreateOrUpdate": CreateOrUpdate, 93 "ExistCheck": ExistCheck, 94 "SkipOnExist": SkipOnExist, 95 "CreateOrSkipOnExist": CreateOrSkipOnExist, 96 "UpdateOrSkipOnNonExist": UpdateOrSkipOnNonExist, 97 "DeleteOrSkipOnNonExist": DeleteOrSkipOnNonExist, 98 "DropOrSkipOnNonExist": DropOrSkipOnNonExist, 99 "UpdateOnExist": UpdateOnExist, 100 "DropOnExist": DropOnExist, 101 "DropCreate": DropCreate, 102 "Append": Append, 103 "AppendByCompare": AppendByCompare, 104 "AppendByCompareWhereCommentFound": AppendByCompareWhereCommentFound, 105 "AppendLinesByCompare": AppendLinesByCompare, 106 "AppendLines": AppendLines, 107 "CreateOrAppend": CreateOrAppend, 108 "Prepend": Prepend, 109 "CreateOrPrepend": CreateOrPrepend, 110 "PrependLines": PrependLines, 111 "Rename": Rename, 112 "Change": Change, 113 "Merge": Merge, 114 "MergeLines": MergeLines, 115 "GetHttp": GetHttp, 116 "PutHttp": PutHttp, 117 "PostHttp": PostHttp, 118 "DeleteHttp": DeleteHttp, 119 "PatchHttp": PatchHttp, 120 "Touch": Touch, 121 "Start": Start, 122 "Stop": Stop, 123 "Restart": Restart, 124 "Reload": Reload, 125 "StopSleepStart": StopSleepStart, 126 "Suspend": Suspend, 127 "Pause": Pause, 128 "Resumed": Resumed, 129 "TryRestart3Times": TryRestart3Times, 130 "TryRestart5Times": TryRestart5Times, 131 "TryStart3Times": TryStart3Times, 132 "TryStart5Times": TryStart5Times, 133 "TryStop3Times": TryStop3Times, 134 "TryStop5Times": TryStop5Times, 135 "InheritOnly": InheritOnly, 136 "InheritPlusOverride": InheritPlusOverride, 137 "DynamicAction": DynamicAction, 138 "Overwrite": Overwrite, 139 "Override": Override, 140 "Enforce": Enforce, 141 } 142 143 overrideLogicallyMap = map[Request]bool{ 144 Overwrite: true, 145 Override: true, 146 Enforce: true, 147 } 148 149 createMap = map[Request]bool{ 150 Create: true, 151 CreateOrUpdate: true, 152 CreateOrSkipOnExist: true, 153 DropCreate: true, 154 } 155 156 createUpdateMap = map[Request]bool{ 157 Create: true, 158 Update: true, 159 CreateOrUpdate: true, 160 CreateOrSkipOnExist: true, 161 UpdateOrSkipOnNonExist: true, 162 UpdateOnExist: true, 163 CreateOrAppend: true, 164 } 165 166 dropMap = map[Request]bool{ 167 Drop: true, 168 DeleteOrSkipOnNonExist: true, 169 DropOrSkipOnNonExist: true, 170 DropOnExist: true, 171 DropCreate: true, 172 } 173 174 readOrEditMap = map[Request]bool{ 175 Read: true, 176 Update: true, 177 CreateOrUpdate: true, 178 CreateOrSkipOnExist: true, 179 UpdateOrSkipOnNonExist: true, 180 UpdateOnExist: true, 181 Rename: true, 182 Change: true, 183 } 184 185 crudMap = map[Request]bool{ 186 Create: true, 187 Read: true, 188 Update: true, 189 Delete: true, 190 Drop: true, 191 CreateOrUpdate: true, 192 CreateOrSkipOnExist: true, 193 UpdateOrSkipOnNonExist: true, 194 DeleteOrSkipOnNonExist: true, 195 DropOrSkipOnNonExist: true, 196 UpdateOnExist: true, 197 DropOnExist: true, 198 DropCreate: true, 199 } 200 201 editOrUpdateMap = map[Request]bool{ 202 Create: true, 203 Update: true, 204 Delete: true, 205 CreateOrUpdate: true, 206 CreateOrSkipOnExist: true, 207 UpdateOrSkipOnNonExist: true, 208 UpdateOnExist: true, 209 DropCreate: true, 210 } 211 212 updateOrRemoveMap = map[Request]bool{ 213 Update: true, 214 CreateOrUpdate: true, 215 DropOrSkipOnNonExist: true, 216 UpdateOnExist: true, 217 DropOnExist: true, 218 DropCreate: true, 219 } 220 221 isExistOrSkipOnExistMap = map[Request]bool{ 222 ExistCheck: true, 223 SkipOnExist: true, 224 CreateOrSkipOnExist: true, 225 UpdateOrSkipOnNonExist: true, 226 DeleteOrSkipOnNonExist: true, 227 DropOrSkipOnNonExist: true, 228 UpdateOnExist: true, 229 DropOnExist: true, 230 } 231 232 BasicEnumImpl = enumimpl.New.BasicByte.UsingTypeSlice( 233 reflectinternal.TypeName(Invalid), 234 Ranges[:]) 235 )