gitlab.com/evatix-go/core@v1.3.55/coreinterface/all-is-checkers.go (about) 1 package coreinterface 2 3 import ( 4 "reflect" 5 6 "gitlab.com/evatix-go/core/internal/internalinterface" 7 ) 8 9 type IsReflectionTypeChecker interface { 10 IsManyReflectionOfType(typeOf reflect.Type, dynamicItems ...interface{}) bool 11 IsReflectionOfType(dynamic interface{}, typeOf reflect.Type) bool 12 IsReflectionOfTypeName(dynamic interface{}, typeOfName string) bool 13 } 14 15 type EmptyChecker interface { 16 IsEmpty() bool 17 HasAnyItemChecker 18 } 19 20 type DynamicDataHasChecker interface { 21 HasDynamic(searchItem interface{}) bool 22 HasDynamicAll(searchTerms ...interface{}) bool 23 HasDynamicAny(searchTerms ...interface{}) bool 24 } 25 26 type BooleanChecker interface { 27 IsAnyByOrder(booleans ...bool) bool 28 HasAll(searchTerms ...string) bool 29 HasAny(searchTerms ...string) bool 30 HasItemsWithoutIssues() bool 31 } 32 33 type IsAnyByOrder interface { 34 IsAnyByOrder(booleans ...bool) bool 35 } 36 37 type StringHasAllChecker interface { 38 HasAll(searchTerms ...string) bool 39 } 40 41 type StringHasAnyChecker interface { 42 HasAny(searchTerms ...string) bool 43 } 44 45 type RangeValidateChecker interface { 46 // RangesInvalidMessage get invalid message 47 RangesInvalidMessage() string 48 // RangesInvalidErr get invalid message error 49 RangesInvalidErr() error 50 // IsValidRange Is with in the range as expected. 51 IsValidRange() bool 52 // IsInvalidRange Is out of the ranges expected. 53 IsInvalidRange() bool 54 } 55 56 type StringHasChecker interface { 57 Has(search string) bool 58 } 59 60 type StringHasCombineChecker interface { 61 StringHasChecker 62 StringHasAllChecker 63 StringHasAnyChecker 64 HasAnyItemChecker 65 } 66 67 type SimpleValidInvalidChecker interface { 68 IsValidChecker 69 IsInvalidChecker 70 InvalidMessageGetter 71 } 72 73 type IsValidInvalidChecker interface { 74 IsValidChecker 75 IsInvalidChecker 76 } 77 78 type SimpleValidatorIssueChecker interface { 79 SimpleValidInvalidChecker 80 HasAnyItemChecker 81 InvalidDirectErrorGetter 82 } 83 84 type StringIsAnyOfChecker interface { 85 IsAnyOf(value string, checkingItems ...string) bool 86 } 87 88 // IsAnyNullChecker 89 // 90 // Returns true if self is null or values is null 91 // Values have to be null to have true return. 92 // False: Any empty slice will return false. 93 type IsAnyNullChecker interface { 94 // IsAnyNull 95 // 96 // Returns true if self is null or values is null 97 // Values have to be null to have true return. 98 // False: Any empty slice will return false. 99 IsAnyNull() bool 100 } 101 102 type IsApplyFuncBinder interface { 103 IsApply() (isSuccess bool) 104 } 105 106 type IsByteValidRangeUsingArgsChecker interface { 107 IsByteValidRange(val byte) bool 108 } 109 110 type IsByteValueValidChecker interface { 111 IsByteValueValid(value byte) bool 112 } 113 114 type IsDynamicContainsChecker interface { 115 IsDynamicContains(item interface{}) bool 116 } 117 118 type IsDynamicContainsInCollectionChecker interface { 119 IsDynamicContainsInCollection(collection, item interface{}) bool 120 } 121 122 type IsDynamicItemValidChecker interface { 123 IsDynamicItemValid(item interface{}) bool 124 IsDynamicItemsValid(items ...interface{}) bool 125 } 126 127 type IsDynamicNullChecker interface { 128 // IsDynamicNull may check using reflection that data is nil. 129 IsDynamicNull(dynamic interface{}) bool 130 } 131 132 type IsDynamicValidRangeUsingArgsChecker interface { 133 IsDynamicValidRange(val, max, min interface{}) bool 134 } 135 136 type IsDynamicValueValidChecker interface { 137 IsDynamicValueValid(value interface{}) bool 138 } 139 140 type IsEmptyChecker interface { 141 internalinterface.IsEmptyChecker 142 } 143 144 type IsDefinedChecker interface { 145 IsDefined() bool 146 } 147 148 type IsEmptyErrorChecker interface { 149 IsEmptyError() bool 150 } 151 152 type IsEmptyOrWhitespaceChecker interface { 153 IsEmptyOrWhitespace() bool 154 } 155 156 type IsFailedChecker interface { 157 // IsFailed has error or any other issues, or alias for HasIssues or HasError 158 IsFailed() bool 159 } 160 161 type IsInt8ValidRangeUsingArgsChecker interface { 162 IsInt8ValidRange(val int8) bool 163 } 164 165 type IsInt8ValueValidChecker interface { 166 IsInt8ValueValid(value int8) bool 167 } 168 169 type IsInt16ValidRangeUsingArgsChecker interface { 170 IsInt16ValidRange(val int16) bool 171 } 172 173 type IsInt16ValueValidChecker interface { 174 IsInt16ValueValid(value int16) bool 175 } 176 177 type IsInt32ValidRangeUsingArgsChecker interface { 178 IsInt32ValidRange(val int32) bool 179 } 180 181 type IsInt32ValueValidChecker interface { 182 IsInt32ValueValid(value int32) bool 183 } 184 185 type IsInt64ValueValidChecker interface { 186 IsInt64ValueValid(value int64) bool 187 } 188 189 type IsIntValidRangeUsingArgsChecker interface { 190 IsIntValidRange(val int) bool 191 } 192 193 type IsValidChecker interface { 194 // IsValid similar or alias for IsSuccessChecker 195 IsValid() bool 196 } 197 198 type IsInvalidChecker interface { 199 IsInvalid() bool 200 } 201 202 type IsInvalidValueByteChecker interface { 203 // IsInvalidValue delegates and acts as !IsWithinRange(value) 204 IsInvalidValue(value byte) bool 205 } 206 207 type IsInvalidValueInt8Checker interface { 208 // IsInvalidValue delegates and acts as !IsWithinRange(value) 209 IsInvalidValue(value int8) bool 210 } 211 212 type IsInvalidValueInt16Checker interface { 213 // IsInvalidValue delegates and acts as !IsWithinRange(value) 214 IsInvalidValue(value int16) bool 215 } 216 217 type IsInvalidValueInt32Checker interface { 218 // IsInvalidValue delegates and acts as !IsWithinRange(value) 219 IsInvalidValue(value int32) bool 220 } 221 222 type IsInvalidValueIntChecker interface { 223 // IsInvalidValue delegates and acts as !IsWithinRange(value) 224 IsInvalidValue(value int) bool 225 } 226 227 type IsNilChecker interface { 228 IsNil() bool 229 } 230 231 type IsNullChecker interface { 232 IsNull() bool 233 } 234 235 type IsNullOrEmptyChecker interface { 236 IsNullOrEmpty() bool 237 } 238 239 type IsOutOfRangeByteChecker interface { 240 IsOutOfRange(n byte) 241 } 242 243 type IsPointerChecker interface { 244 IsPointer() bool 245 } 246 247 type IsReflectKindChecker interface { 248 IsReflectKind(checkingKind reflect.Kind) bool 249 } 250 251 type IsReflectTypeOfChecker interface { 252 IsReflectTypeOf(typeRequest reflect.Type) bool 253 } 254 255 type IsStringContainsChecker interface { 256 IsContains(contains string) bool 257 } 258 259 type IsStringEqualChecker interface { 260 IsEqual(equalString string) bool 261 } 262 263 type IsStringValidRangeUsingArgsChecker interface { 264 IsStringValidRange(val, max, min string) bool 265 } 266 267 type IsSuccessChecker interface { 268 // IsSuccess No error 269 IsSuccess() bool 270 } 271 272 type IsSuccessValidator interface { 273 IsValidChecker 274 IsSuccessChecker 275 IsFailedChecker 276 } 277 278 type IsWithinRangeByteChecker interface { 279 // IsWithinRange r.Min >= value && value <= r.Max 280 // 281 // Or, r.Start >= value && value <= r.End 282 IsWithinRange(value byte) bool 283 } 284 285 type IsWithinRangeInt8Checker interface { 286 // IsWithinRange r.Min >= value && value <= r.Max 287 // 288 // Or, r.Start >= value && value <= r.End 289 IsWithinRange(value int8) bool 290 } 291 292 type IsWithinRangeInt16Checker interface { 293 // IsWithinRange r.Min >= value && value <= r.Max 294 // 295 // Or, r.Start >= value && value <= r.End 296 IsWithinRange(value int16) bool 297 } 298 299 type IsWithinRangeInt32Checker interface { 300 // IsWithinRange r.Min >= value && value <= r.Max 301 // 302 // Or, r.Start >= value && value <= r.End 303 IsWithinRange(value int32) bool 304 } 305 306 type IsWithinRangeIntChecker interface { 307 // IsWithinRange r.Min >= value && value <= r.Max 308 // 309 // Or, r.Start >= value && value <= r.End 310 IsWithinRange(value int) bool 311 } 312 313 type Int16IsAnyOfChecker interface { 314 IsAnyOf(value int16, checkingItems ...int16) bool 315 } 316 317 type ByteIsAnyOfChecker interface { 318 IsAnyOf(value byte, checkingItems ...byte) bool 319 } 320 321 type IsEnabledChecker interface { 322 IsEnabled() bool 323 } 324 325 type IsDisabledChecker interface { 326 IsDisabled() bool 327 } 328 329 type IsEnableAllChecker interface { 330 IsEnableAll() bool 331 } 332 333 type IsEnableAnyChecker interface { 334 IsEnableAny() bool 335 } 336 337 type IsEnableAnyByNamesChecker interface { 338 IsEnableAnyByNames(enabledNames ...string) bool 339 } 340 341 type IsDisableAllChecker interface { 342 IsDisableAll() bool 343 } 344 345 type IsDisableAnyChecker interface { 346 IsDisableAny() bool 347 } 348 349 type IsDisableAnyByNamesChecker interface { 350 IsDisableAnyByNames(disabledNames ...string) bool 351 } 352 353 type IsFlagsEnabledByNamesChecker interface { 354 IsFlagsEnabledByNames(enabledNames ...string) bool 355 } 356 357 type IsFlagsDisabledByNamesChecker interface { 358 IsFlagsDisabledByNames(disabledNames ...string) bool 359 } 360 361 type IsEnableDisableConditionChecker interface { 362 IsEnableAllChecker 363 IsEnableAnyChecker 364 IsEnableAnyByNamesChecker 365 366 IsDisableAllChecker 367 IsDisableAnyChecker 368 IsDisableAnyByNamesChecker 369 } 370 371 type IsKeyMissingChecker interface { 372 IsMissingKey(key string) bool 373 } 374 375 type IsCompletedChecker interface { 376 IsCompleted() bool 377 } 378 379 type IsCompletedLockChecker interface { 380 IsCompletedLock() bool 381 } 382 383 type IsCompletedLockUnlockChecker interface { 384 IsCompletedChecker 385 IsCompletedLockChecker 386 } 387 388 type IsMissingKeyChecker interface { 389 IsMissingKey(key string) bool 390 } 391 392 type IsValueStringChecker interface { 393 IsValueString() bool 394 } 395 396 type IsValueTypeOfChecker interface { 397 IsValueTypeOf(rfType reflect.Type) bool 398 }