Documentation ¶
Index ¶
- func AnyToReflectVal(any interface{}) reflect.Value
- func IsAnyTypesOf(typeLookup reflect.Type, acceptedTypes ...reflect.Type) (isFound bool)
- func LengthOfReflect(reflectVal reflect.Value) int
- func MustBeAcceptedTypes(input interface{}, acceptedTypes ...reflect.Type)
- func NotAcceptedTypesErr(input interface{}, acceptedTypes ...reflect.Type) error
- func PointerOrNonPointer(isPointerOutput bool, input interface{}) (output interface{}, finalReflectVal reflect.Value)
- func PointerOrNonPointerUsingReflectValue(isPointerOutput bool, rv reflect.Value) (output interface{}, finalReflectVal reflect.Value)
- func ReflectInterfaceVal(any interface{}) interface{}
- func ReflectKindValidation(expectedKind reflect.Kind, anyItem interface{}) error
- func ReflectSetFromTo(from, toPointer interface{}) error
- func ReflectTypeValidation(isNotNullExpected bool, expectedType reflect.Type, anyItem interface{}) error
- func SafeTypeName(any interface{}) string
- func SafeZeroSet(rv reflect.Value)
- func Type(any interface{}) reflect.Type
- func TypeMustBeSame(left, right interface{})
- func TypeNotEqualErr(left, right interface{}) error
- func TypesIndexOf(typeLookup reflect.Type, acceptedTypes ...reflect.Type) (index int)
- func ZeroSet(rvPointer reflect.Value)
- func ZeroSetAny(anyItem interface{})
- type AnyCollection
- func (it *AnyCollection) Add(anyItem interface{}) *AnyCollection
- func (it *AnyCollection) AddAny(anyItem interface{}, isValid bool) *AnyCollection
- func (it *AnyCollection) AddAnyItemsWithTypeValidation(isContinueOnError, isNullNotAllowed bool, expectedType reflect.Type, ...) error
- func (it *AnyCollection) AddAnyManyDynamic(anyItems ...interface{}) *AnyCollection
- func (it *AnyCollection) AddAnySliceFromSingleItem(sliceList interface{}) *AnyCollection
- func (it *AnyCollection) AddAnyWithTypeValidation(isNullNotAllowed bool, expectedType reflect.Type, anyItem interface{}) error
- func (it *AnyCollection) AddMany(anyItems ...interface{}) *AnyCollection
- func (it *AnyCollection) AddNonNull(anyItem interface{}) *AnyCollection
- func (it *AnyCollection) AddNonNullDynamic(anyItem interface{}, isValid bool) *AnyCollection
- func (it *AnyCollection) At(index int) interface{}
- func (it *AnyCollection) AtAsDynamic(index int) Dynamic
- func (it *AnyCollection) Count() int
- func (it *AnyCollection) DynamicCollection() *DynamicCollection
- func (it *AnyCollection) DynamicItems() []Dynamic
- func (it *AnyCollection) First() interface{}
- func (it *AnyCollection) FirstDynamic() interface{}
- func (it *AnyCollection) FirstOrDefault() interface{}
- func (it *AnyCollection) FirstOrDefaultDynamic() interface{}
- func (it *AnyCollection) GetPagedCollection(eachPageSize int) []*AnyCollection
- func (it *AnyCollection) GetPagesSize(eachPageSize int) int
- func (it *AnyCollection) GetPagingInfo(eachPageSize int, pageIndex int) pagingutil.PagingInfo
- func (it *AnyCollection) GetSinglePageCollection(eachPageSize int, pageIndex int) *AnyCollection
- func (it *AnyCollection) HasAnyItem() bool
- func (it *AnyCollection) HasIndex(index int) bool
- func (it *AnyCollection) IsEmpty() bool
- func (it *AnyCollection) Items() []interface{}
- func (it AnyCollection) Json() corejson.Result
- func (it *AnyCollection) JsonModel() []interface{}
- func (it *AnyCollection) JsonModelAny() interface{}
- func (it *AnyCollection) JsonParseSelfInject(jsonResult *corejson.Result) error
- func (it AnyCollection) JsonPtr() *corejson.Result
- func (it *AnyCollection) JsonResultsCollection() *corejson.ResultsCollection
- func (it *AnyCollection) JsonResultsPtrCollection() *corejson.ResultsPtrCollection
- func (it *AnyCollection) JsonString() (jsonString string, err error)
- func (it *AnyCollection) JsonStringMust() string
- func (it *AnyCollection) Last() interface{}
- func (it *AnyCollection) LastDynamic() interface{}
- func (it *AnyCollection) LastIndex() int
- func (it *AnyCollection) LastOrDefault() interface{}
- func (it *AnyCollection) LastOrDefaultDynamic() interface{}
- func (it *AnyCollection) Length() int
- func (it *AnyCollection) Limit(limit int) []interface{}
- func (it *AnyCollection) LimitCollection(limit int) *AnyCollection
- func (it *AnyCollection) LimitDynamic(limit int) interface{}
- func (it *AnyCollection) ListStrings(isIncludeFieldName bool) []string
- func (it *AnyCollection) ListStringsPtr(isIncludeFieldName bool) *[]string
- func (it *AnyCollection) Loop(isRunAsync bool, ...) *AnyCollection
- func (it *AnyCollection) LoopDynamic(isRunAsync bool, ...) *AnyCollection
- func (it *AnyCollection) MarshalJSON() ([]byte, error)
- func (it *AnyCollection) ParseInjectUsingJson(jsonResult *corejson.Result) (*AnyCollection, error)
- func (it *AnyCollection) ParseInjectUsingJsonMust(jsonResult *corejson.Result) *AnyCollection
- func (it *AnyCollection) ReflectSetAt(index int, toPointerOrBytesSet interface{}) error
- func (it *AnyCollection) RemoveAt(index int) (isSuccess bool)
- func (it *AnyCollection) SafeLimitCollection(limit int) *AnyCollection
- func (it *AnyCollection) Skip(skippingItemsCount int) []interface{}
- func (it *AnyCollection) SkipCollection(skippingItemsCount int) *AnyCollection
- func (it *AnyCollection) SkipDynamic(skippingItemsCount int) interface{}
- func (it *AnyCollection) String() string
- func (it *AnyCollection) Strings() []string
- func (it *AnyCollection) Take(takeDynamicItems int) []interface{}
- func (it *AnyCollection) TakeCollection(takeDynamicItems int) *AnyCollection
- func (it *AnyCollection) TakeDynamic(takeDynamicItems int) interface{}
- func (it *AnyCollection) UnmarshalJSON(data []byte) error
- type BytesConverter
- func (it BytesConverter) CastString() (line string, err error)
- func (it BytesConverter) Deserialize(deserializePointer interface{}) error
- func (it BytesConverter) DeserializeMust(deserializePointer interface{})
- func (it BytesConverter) SafeCastString() (line string)
- func (it BytesConverter) ToAnyCollection() (anyCollection *AnyCollection, err error)
- func (it BytesConverter) ToBool() (isResult bool, err error)
- func (it BytesConverter) ToBoolMust() (isResult bool)
- func (it BytesConverter) ToBytesCollection() (bytesCollection *corejson.BytesCollection, err error)
- func (it BytesConverter) ToCollection() (collection *corestr.Collection, err error)
- func (it BytesConverter) ToCollectionMust() (collection *corestr.Collection)
- func (it BytesConverter) ToDynamicCollection() (dynamicCollection *DynamicCollection, err error)
- func (it BytesConverter) ToHashmap() (hashmap *corestr.Hashmap, err error)
- func (it BytesConverter) ToHashmapMust() (hashmap *corestr.Hashmap)
- func (it BytesConverter) ToHashset() (hashset *corestr.Hashset, err error)
- func (it BytesConverter) ToHashsetMust() (hashset *corestr.Hashset)
- func (it BytesConverter) ToInt64() (integer64 int64, err error)
- func (it BytesConverter) ToInt64Must() (integer64 int64)
- func (it BytesConverter) ToJsonMapResults() (jsonMapResults *corejson.MapResults, err error)
- func (it BytesConverter) ToJsonResultCollection() (jsonResultCollection *corejson.ResultsCollection, err error)
- func (it BytesConverter) ToKeyValCollection() (keyValCollection *KeyValCollection, err error)
- func (it BytesConverter) ToMapAnyItems() (mapAnyItems *MapAnyItems, err error)
- func (it BytesConverter) ToSimpleSlice() (simpleSlice *corestr.SimpleSlice, err error)
- func (it BytesConverter) ToSimpleSliceMust() (simpleSlice *corestr.SimpleSlice)
- func (it BytesConverter) ToString() (line string, err error)
- func (it BytesConverter) ToStringMust() (line string)
- func (it BytesConverter) ToStrings() (lines []string, err error)
- func (it BytesConverter) ToStringsMust() (lines []string)
- type CastedResult
- func (it *CastedResult) HasAnyIssues() bool
- func (it *CastedResult) HasError() bool
- func (it *CastedResult) IsInvalid() bool
- func (it *CastedResult) IsNotMatchingAcceptedType() bool
- func (it *CastedResult) IsNotNull() bool
- func (it *CastedResult) IsNotPointer() bool
- func (it *CastedResult) IsSourceKind(kind reflect.Kind) bool
- type Dynamic
- func (it *Dynamic) Bytes() (rawBytes []byte, isSuccess bool)
- func (it Dynamic) Clone() Dynamic
- func (it *Dynamic) ClonePtr() *Dynamic
- func (it *Dynamic) ConvertUsingFunc(converter SimpleInOutConverter, expectedType reflect.Type) *SimpleResult
- func (it *Dynamic) Data() interface{}
- func (it *Dynamic) Deserialize(jsonBytes []byte) (deserialized *Dynamic, err error)
- func (it *Dynamic) FilterAsDynamicCollection(filterFunc func(index int, itemAsDynamic Dynamic) (isTake, isBreak bool)) *DynamicCollection
- func (it *Dynamic) Float64() (val float64, err error)
- func (it *Dynamic) IntDefault(defaultInt int) (val int, isSuccess bool)
- func (it *Dynamic) IsFunc() bool
- func (it *Dynamic) IsInvalid() bool
- func (it *Dynamic) IsMap() bool
- func (it *Dynamic) IsNull() bool
- func (it *Dynamic) IsNumber() bool
- func (it *Dynamic) IsPointer() bool
- func (it *Dynamic) IsPrimitive() bool
- func (it *Dynamic) IsReflectKind(checkingKind reflect.Kind) bool
- func (it *Dynamic) IsReflectTypeOf(typeRequest reflect.Type) bool
- func (it *Dynamic) IsSliceOrArray() bool
- func (it *Dynamic) IsSliceOrArrayOrMap() bool
- func (it *Dynamic) IsStringType() bool
- func (it *Dynamic) IsStruct() bool
- func (it *Dynamic) IsStructStringNullOrEmpty() bool
- func (it *Dynamic) IsStructStringNullOrEmptyOrWhitespace() bool
- func (it *Dynamic) IsValid() bool
- func (it *Dynamic) IsValueType() bool
- func (it *Dynamic) ItemReflectValueUsingIndex(index int) reflect.Value
- func (it *Dynamic) ItemReflectValueUsingKey(key interface{}) reflect.Value
- func (it *Dynamic) ItemUsingIndex(index int) interface{}
- func (it *Dynamic) ItemUsingKey(key interface{}) interface{}
- func (it Dynamic) Json() corejson.Result
- func (it *Dynamic) JsonBytes() (jsonBytesPtr []byte, err error)
- func (it *Dynamic) JsonBytesPtr() (jsonBytesPtr *[]byte, err error)
- func (it *Dynamic) JsonModel() interface{}
- func (it *Dynamic) JsonModelAny() interface{}
- func (it *Dynamic) JsonParseSelfInject(jsonResult *corejson.Result) error
- func (it *Dynamic) JsonPayloadMust() (jsonBytes []byte)
- func (it Dynamic) JsonPtr() *corejson.Result
- func (it *Dynamic) JsonString() (jsonString string, err error)
- func (it *Dynamic) JsonStringMust() string
- func (it *Dynamic) Length() int
- func (it *Dynamic) Loop(loopProcessorFunc func(index int, item interface{}) (isBreak bool)) (isCalled bool)
- func (it *Dynamic) LoopMap(mapLoopProcessorFunc func(index int, key, value interface{}) (isBreak bool)) (isCalled bool)
- func (it *Dynamic) MapToKeyVal() (*KeyValCollection, error)
- func (it *Dynamic) MarshalJSON() ([]byte, error)
- func (it Dynamic) NonPtr() Dynamic
- func (it *Dynamic) ParseInjectUsingJson(jsonResult *corejson.Result) (*Dynamic, error)
- func (it *Dynamic) ParseInjectUsingJsonMust(jsonResult *corejson.Result) *Dynamic
- func (it *Dynamic) Ptr() *Dynamic
- func (it *Dynamic) ReflectKind() reflect.Kind
- func (it *Dynamic) ReflectSetTo(toPointer interface{}) error
- func (it *Dynamic) ReflectType() reflect.Type
- func (it *Dynamic) ReflectTypeName() string
- func (it *Dynamic) ReflectValue() *reflect.Value
- func (it *Dynamic) String() string
- func (it *Dynamic) StructString() string
- func (it *Dynamic) StructStringPtr() *string
- func (it *Dynamic) UnmarshalJSON(data []byte) error
- func (it *Dynamic) Value() interface{}
- func (it *Dynamic) ValueBool() bool
- func (it *Dynamic) ValueInt() int
- func (it *Dynamic) ValueInt64() int64
- func (it *Dynamic) ValueMarshal() (jsonBytes []byte, err error)
- func (it *Dynamic) ValueNullErr() error
- func (it *Dynamic) ValueString() string
- func (it *Dynamic) ValueStrings() []string
- func (it *Dynamic) ValueUInt() uint
- type DynamicCollection
- func (it *DynamicCollection) Add(dynamic Dynamic) *DynamicCollection
- func (it *DynamicCollection) AddAny(anyItem interface{}, isValid bool) *DynamicCollection
- func (it *DynamicCollection) AddAnyItemsWithTypeValidation(isContinueOnError, isNullNotAllowed bool, expectedType reflect.Type, ...) error
- func (it *DynamicCollection) AddAnyMany(anyItems ...interface{}) *DynamicCollection
- func (it *DynamicCollection) AddAnyNonNull(anyItem interface{}, isValid bool) *DynamicCollection
- func (it *DynamicCollection) AddAnySliceFromSingleItem(isValid bool, sliceList interface{}) *DynamicCollection
- func (it *DynamicCollection) AddAnyWithTypeValidation(isNullNotAllowed bool, expectedType reflect.Type, anyItem interface{}) error
- func (it *DynamicCollection) AddManyPtr(dynamicItems ...*Dynamic) *DynamicCollection
- func (it *DynamicCollection) AddPtr(dynamic *Dynamic) *DynamicCollection
- func (it *DynamicCollection) AnyItems() []interface{}
- func (it *DynamicCollection) AnyItemsCollection() *AnyCollection
- func (it *DynamicCollection) At(index int) Dynamic
- func (it *DynamicCollection) Count() int
- func (it *DynamicCollection) First() Dynamic
- func (it *DynamicCollection) FirstDynamic() interface{}
- func (it *DynamicCollection) FirstOrDefault() *Dynamic
- func (it *DynamicCollection) FirstOrDefaultDynamic() interface{}
- func (it *DynamicCollection) GetPagedCollection(eachPageSize int) []*DynamicCollection
- func (it *DynamicCollection) GetPagesSize(eachPageSize int) int
- func (it *DynamicCollection) GetPagingInfo(eachPageSize int, pageIndex int) pagingutil.PagingInfo
- func (it *DynamicCollection) GetSinglePageCollection(eachPageSize int, pageIndex int) *DynamicCollection
- func (it *DynamicCollection) HasAnyItem() bool
- func (it *DynamicCollection) HasIndex(index int) bool
- func (it *DynamicCollection) IsEmpty() bool
- func (it *DynamicCollection) Items() []Dynamic
- func (it DynamicCollection) Json() corejson.Result
- func (it *DynamicCollection) JsonModel() DynamicCollectionModel
- func (it *DynamicCollection) JsonModelAny() interface{}
- func (it *DynamicCollection) JsonParseSelfInject(jsonResult *corejson.Result) error
- func (it DynamicCollection) JsonPtr() *corejson.Result
- func (it *DynamicCollection) JsonResultsCollection() *corejson.ResultsCollection
- func (it *DynamicCollection) JsonResultsPtrCollection() *corejson.ResultsPtrCollection
- func (it *DynamicCollection) JsonString() (jsonString string, err error)
- func (it *DynamicCollection) JsonStringMust() string
- func (it *DynamicCollection) Last() Dynamic
- func (it *DynamicCollection) LastDynamic() interface{}
- func (it *DynamicCollection) LastIndex() int
- func (it *DynamicCollection) LastOrDefault() *Dynamic
- func (it *DynamicCollection) LastOrDefaultDynamic() interface{}
- func (it *DynamicCollection) Length() int
- func (it *DynamicCollection) Limit(limit int) []Dynamic
- func (it *DynamicCollection) LimitCollection(limit int) *DynamicCollection
- func (it *DynamicCollection) LimitDynamic(limit int) interface{}
- func (it *DynamicCollection) ListStrings() []string
- func (it *DynamicCollection) ListStringsPtr() *[]string
- func (it *DynamicCollection) Loop(loopProcessorFunc func(index int, dynamicItem *Dynamic) (isBreak bool))
- func (it *DynamicCollection) MarshalJSON() ([]byte, error)
- func (it *DynamicCollection) ParseInjectUsingJson(jsonResult *corejson.Result) (*DynamicCollection, error)
- func (it *DynamicCollection) ParseInjectUsingJsonMust(jsonResult *corejson.Result) *DynamicCollection
- func (it *DynamicCollection) RemoveAt(index int) (isSuccess bool)
- func (it *DynamicCollection) SafeLimitCollection(limit int) *DynamicCollection
- func (it *DynamicCollection) Skip(skippingItemsCount int) []Dynamic
- func (it *DynamicCollection) SkipCollection(skippingItemsCount int) *DynamicCollection
- func (it *DynamicCollection) SkipDynamic(skippingItemsCount int) interface{}
- func (it *DynamicCollection) String() string
- func (it *DynamicCollection) Strings() []string
- func (it *DynamicCollection) Take(takeDynamicItems int) []Dynamic
- func (it *DynamicCollection) TakeCollection(takeDynamicItems int) *DynamicCollection
- func (it *DynamicCollection) TakeDynamic(takeDynamicItems int) interface{}
- func (it *DynamicCollection) UnmarshalJSON(data []byte) error
- type DynamicCollectionModel
- type DynamicStatus
- type KeyVal
- func (it *KeyVal) CastKeyVal(keyToPointer, valueToPointer interface{}) error
- func (it *KeyVal) IsKeyNull() bool
- func (it *KeyVal) IsKeyNullOrEmptyString() bool
- func (it *KeyVal) IsValueNull() bool
- func (it KeyVal) Json() corejson.Result
- func (it KeyVal) JsonModel() interface{}
- func (it KeyVal) JsonModelAny() interface{}
- func (it *KeyVal) JsonParseSelfInject(jsonResult *corejson.Result) error
- func (it KeyVal) JsonPtr() *corejson.Result
- func (it *KeyVal) KeyDynamic() Dynamic
- func (it *KeyVal) KeyDynamicPtr() *Dynamic
- func (it *KeyVal) KeyNullErr() error
- func (it *KeyVal) KeyReflectSet(toPointer interface{}) error
- func (it *KeyVal) KeyString() string
- func (it *KeyVal) ParseInjectUsingJson(jsonResult *corejson.Result) (*KeyVal, error)
- func (it *KeyVal) ParseInjectUsingJsonMust(jsonResult *corejson.Result) *KeyVal
- func (it *KeyVal) ReflectSetKey(keyToPointer interface{}) error
- func (it *KeyVal) ReflectSetTo(toPointer interface{}) error
- func (it *KeyVal) ReflectSetToMust(toPointer interface{})
- func (it *KeyVal) Serialize() (jsonBytesPtr []byte, err error)
- func (it *KeyVal) String() string
- func (it *KeyVal) ValueBool() bool
- func (it *KeyVal) ValueDynamic() Dynamic
- func (it *KeyVal) ValueDynamicPtr() *Dynamic
- func (it *KeyVal) ValueInt() int
- func (it *KeyVal) ValueInt64() int64
- func (it *KeyVal) ValueNullErr() error
- func (it *KeyVal) ValueReflectSet(toPointer interface{}) error
- func (it *KeyVal) ValueReflectValue() reflect.Value
- func (it *KeyVal) ValueString() string
- func (it *KeyVal) ValueStrings() []string
- func (it *KeyVal) ValueUInt() uint
- type KeyValCollection
- func (it *KeyValCollection) Add(keyVal KeyVal) *KeyValCollection
- func (it *KeyValCollection) AddMany(keyValues ...KeyVal) *KeyValCollection
- func (it *KeyValCollection) AddManyPtr(keyValues ...*KeyVal) *KeyValCollection
- func (it *KeyValCollection) AddPtr(keyVal *KeyVal) *KeyValCollection
- func (it *KeyValCollection) AllKeys() []string
- func (it *KeyValCollection) AllKeysSorted() []string
- func (it *KeyValCollection) AllValues() []interface{}
- func (it KeyValCollection) Clone() KeyValCollection
- func (it *KeyValCollection) ClonePtr() *KeyValCollection
- func (it *KeyValCollection) GetPagedCollection(eachPageSize int) []*KeyValCollection
- func (it *KeyValCollection) GetPagesSize(eachPageSize int) int
- func (it *KeyValCollection) GetPagingInfo(eachPageSize int, pageIndex int) pagingutil.PagingInfo
- func (it *KeyValCollection) GetSinglePageCollection(eachPageSize int, pageIndex int) *KeyValCollection
- func (it *KeyValCollection) HasAnyItem() bool
- func (it *KeyValCollection) IsEmpty() bool
- func (it *KeyValCollection) Items() []KeyVal
- func (it KeyValCollection) Json() corejson.Result
- func (it *KeyValCollection) JsonMapResults() (*corejson.MapResults, error)
- func (it KeyValCollection) JsonModel() interface{}
- func (it KeyValCollection) JsonModelAny() interface{}
- func (it *KeyValCollection) JsonParseSelfInject(jsonResult *corejson.Result) error
- func (it KeyValCollection) JsonPtr() *corejson.Result
- func (it *KeyValCollection) JsonResultsCollection() *corejson.ResultsCollection
- func (it *KeyValCollection) JsonResultsPtrCollection() *corejson.ResultsPtrCollection
- func (it *KeyValCollection) JsonString() (jsonString string, err error)
- func (it *KeyValCollection) JsonStringMust() string
- func (it *KeyValCollection) Length() int
- func (it *KeyValCollection) MapAnyItems() *MapAnyItems
- func (it KeyValCollection) NonPtr() KeyValCollection
- func (it *KeyValCollection) ParseInjectUsingJson(jsonResult *corejson.Result) (*KeyValCollection, error)
- func (it *KeyValCollection) ParseInjectUsingJsonMust(jsonResult *corejson.Result) *KeyValCollection
- func (it *KeyValCollection) Ptr() *KeyValCollection
- func (it *KeyValCollection) Serialize() (jsonBytesPtr []byte, err error)
- func (it *KeyValCollection) String() string
- type LeftRight
- func (it *LeftRight) DeserializeLeft() *corejson.Result
- func (it *LeftRight) DeserializeRight() *corejson.Result
- func (it *LeftRight) HasAnyItem() bool
- func (it *LeftRight) HasLeft() bool
- func (it *LeftRight) HasRight() bool
- func (it *LeftRight) IsEmpty() bool
- func (it *LeftRight) IsLeftEmpty() bool
- func (it *LeftRight) IsRightEmpty() bool
- func (it *LeftRight) LeftReflectSet(toPointerOrBytesPointer interface{}) error
- func (it *LeftRight) LeftToDynamic() *Dynamic
- func (it *LeftRight) RightReflectSet(toPointerOrBytesPointer interface{}) error
- func (it *LeftRight) RightToDynamic() *Dynamic
- func (it *LeftRight) TypeStatus() TypeStatus
- type MapAnyItemDiff
- func (it MapAnyItemDiff) AllKeysSorted() []string
- func (it *MapAnyItemDiff) Clear() MapAnyItemDiff
- func (it *MapAnyItemDiff) DiffJsonMessage(isRegardlessType bool, rightMap map[string]interface{}) string
- func (it *MapAnyItemDiff) DiffRaw(isRegardlessType bool, rightMap map[string]interface{}) map[string]interface{}
- func (it *MapAnyItemDiff) HasAnyChanges(isRegardlessType bool, rightMap map[string]interface{}) bool
- func (it MapAnyItemDiff) HasAnyItem() bool
- func (it *MapAnyItemDiff) HashmapDiffUsingRaw(isRegardlessType bool, rightMap map[string]interface{}) MapAnyItemDiff
- func (it MapAnyItemDiff) IsEmpty() bool
- func (it *MapAnyItemDiff) IsRawEqual(isRegardlessType bool, rightMap map[string]interface{}) bool
- func (it MapAnyItemDiff) Json() corejson.Result
- func (it MapAnyItemDiff) JsonPtr() *corejson.Result
- func (it MapAnyItemDiff) LastIndex() int
- func (it *MapAnyItemDiff) Length() int
- func (it MapAnyItemDiff) LogPrettyJsonString()
- func (it *MapAnyItemDiff) LogShouldDiffMessage(isRegardlessType bool, title string, rightMap map[string]interface{}) (diffMessage string)
- func (it *MapAnyItemDiff) MapAnyItems() *MapAnyItems
- func (it MapAnyItemDiff) PrettyJsonString() string
- func (it *MapAnyItemDiff) Raw() map[string]interface{}
- func (it *MapAnyItemDiff) RawMapDiffer() mapdiffinternal.MapStringAnyDiff
- func (it *MapAnyItemDiff) ShouldDiffMessage(isRegardlessType bool, title string, rightMap map[string]interface{}) string
- func (it *MapAnyItemDiff) ToStringsSliceOfDiffMap(diffMap map[string]interface{}) (diffSlice []string)
- type MapAnyItems
- func (it *MapAnyItems) Add(key string, valInf interface{}) (isNewlyAdded bool)
- func (it *MapAnyItems) AddJsonResultPtr(key string, jsonResult *corejson.Result) *MapAnyItems
- func (it *MapAnyItems) AddKeyAny(keyAny corejson.KeyAny) (isNewlyAdded bool)
- func (it *MapAnyItems) AddKeyAnyWithValidation(typeVerify reflect.Type, keyAny corejson.KeyAny) error
- func (it *MapAnyItems) AddManyMapResultsUsingOption(isOverridingExisting bool, mapsOfMapsResults ...map[string]interface{}) *MapAnyItems
- func (it *MapAnyItems) AddMapResult(mapResults map[string]interface{}) *MapAnyItems
- func (it *MapAnyItems) AddMapResultOption(isOverride bool, mapResults map[string]interface{}) *MapAnyItems
- func (it *MapAnyItems) AddWithValidation(typeVerify reflect.Type, key string, anyInf interface{}) error
- func (it *MapAnyItems) AllKeys() []string
- func (it *MapAnyItems) AllKeysSorted() []string
- func (it *MapAnyItems) AllValues() []interface{}
- func (it *MapAnyItems) Clear()
- func (it *MapAnyItems) ClonePtr() (*MapAnyItems, error)
- func (it *MapAnyItems) DeepClear()
- func (it *MapAnyItems) Deserialize(key string, toPointer interface{}) error
- func (it *MapAnyItems) DeserializeMust(key string, toPointer interface{})
- func (it *MapAnyItems) Diff(isRegardlessType bool, rightMap *MapAnyItems) *MapAnyItems
- func (it *MapAnyItems) DiffJsonMessage(isRegardlessType bool, rightMap map[string]interface{}) string
- func (it *MapAnyItems) DiffRaw(isRegardlessType bool, rightMap map[string]interface{}) map[string]interface{}
- func (it *MapAnyItems) Dispose()
- func (it *MapAnyItems) Get(key string) (any interface{}, has bool)
- func (it *MapAnyItems) GetFieldsMap(key string) (fieldMap map[string]interface{}, parsingErr error, isFound bool)
- func (it *MapAnyItems) GetItemRef(key string, referenceOut interface{}) error
- func (it *MapAnyItems) GetManyItemsRefs(keyAnyItems ...corejson.KeyAny) error
- func (it *MapAnyItems) GetNewMapUsingKeys(isPanicOnMissing bool, keys ...string) *MapAnyItems
- func (it *MapAnyItems) GetPagedCollection(eachPageSize int) []*MapAnyItems
- func (it *MapAnyItems) GetPagesSize(eachPageSize int) int
- func (it *MapAnyItems) GetSafeFieldsMap(key string) (fieldMap map[string]interface{}, isFound bool)
- func (it *MapAnyItems) GetSinglePageCollection(eachPageSize int, pageIndex int, allKeys []string) *MapAnyItems
- func (it *MapAnyItems) GetUsingUnmarshallAt(key string, unmarshalRef interface{}) error
- func (it *MapAnyItems) GetUsingUnmarshallManyAt(keyAnyItems ...corejson.KeyAny) error
- func (it *MapAnyItems) GetValue(key string) (any interface{})
- func (it *MapAnyItems) HasAnyChanges(isRegardlessType bool, rightMap map[string]interface{}) bool
- func (it *MapAnyItems) HasAnyItem() bool
- func (it *MapAnyItems) HasKey(key string) bool
- func (it *MapAnyItems) HashmapDiffUsingRaw(isRegardlessType bool, rightMap map[string]interface{}) MapAnyItemDiff
- func (it *MapAnyItems) IsEmpty() bool
- func (it *MapAnyItems) IsEqual(right *MapAnyItems) bool
- func (it *MapAnyItems) IsEqualRaw(rightMappedItems map[string]interface{}) bool
- func (it *MapAnyItems) IsRawEqual(isRegardlessType bool, rightMap map[string]interface{}) bool
- func (it MapAnyItems) Json() corejson.Result
- func (it *MapAnyItems) JsonMapResults() (*corejson.MapResults, error)
- func (it *MapAnyItems) JsonModel() *corejson.MapResults
- func (it *MapAnyItems) JsonModelAny() interface{}
- func (it *MapAnyItems) JsonParseSelfInject(jsonResult *corejson.Result) error
- func (it MapAnyItems) JsonPtr() *corejson.Result
- func (it *MapAnyItems) JsonResultOfKey(key string) *corejson.Result
- func (it *MapAnyItems) JsonResultOfKeys(keys ...string) *corejson.MapResults
- func (it *MapAnyItems) JsonResultsCollection() *corejson.ResultsCollection
- func (it *MapAnyItems) JsonResultsPtrCollection() *corejson.ResultsPtrCollection
- func (it *MapAnyItems) JsonString() (jsonString string, err error)
- func (it *MapAnyItems) JsonStringMust() string
- func (it *MapAnyItems) Length() int
- func (it *MapAnyItems) LogShouldDiffMessage(isRegardlessType bool, title string, rightMap map[string]interface{}) (diffMessage string)
- func (it *MapAnyItems) MapAnyItems() *MapAnyItems
- func (it *MapAnyItems) MapStringAnyDiff() mapdiffinternal.MapStringAnyDiff
- func (it *MapAnyItems) ParseInjectUsingJson(jsonResult *corejson.Result) (*MapAnyItems, error)
- func (it *MapAnyItems) ParseInjectUsingJsonMust(jsonResult *corejson.Result) *MapAnyItems
- func (it *MapAnyItems) RawMapStringAnyDiff() mapdiffinternal.MapStringAnyDiff
- func (it *MapAnyItems) ReflectSetTo(key string, toPointerOrBytes interface{}) error
- func (it *MapAnyItems) ReflectSetToMust(key string, toPointerOrBytes interface{})
- func (it *MapAnyItems) Set(key string, valInf interface{}) (isNewlyAdded bool)
- func (it *MapAnyItems) ShouldDiffMessage(isRegardlessType bool, title string, rightMap map[string]interface{}) string
- func (it *MapAnyItems) String() string
- func (it *MapAnyItems) Strings() []string
- func (it *MapAnyItems) ToStringsSliceOfDiffMap(diffMap map[string]interface{}) (diffSlice []string)
- type SimpleInOutConverter
- type SimpleRequest
- func (receiver *SimpleRequest) GetErrorOnTypeMismatch(typeMatch reflect.Type, isIncludeInvalidMessage bool) error
- func (receiver *SimpleRequest) InvalidError() error
- func (receiver *SimpleRequest) IsPointer() bool
- func (receiver *SimpleRequest) IsReflectKind(checkingKind reflect.Kind) bool
- func (receiver *SimpleRequest) Message() string
- func (receiver *SimpleRequest) Request() interface{}
- func (receiver *SimpleRequest) Value() interface{}
- type SimpleRequestConverter
- type SimpleResult
- type TypeStatus
- func (it TypeStatus) IsAnyPointer() bool
- func (it TypeStatus) IsBothPointer() bool
- func (it *TypeStatus) IsEqual(next *TypeStatus) bool
- func (it *TypeStatus) IsInvalid() bool
- func (it TypeStatus) IsNotEqualTypes() bool
- func (it TypeStatus) IsNotSame() bool
- func (it TypeStatus) IsSameRegardlessPointer() bool
- func (it *TypeStatus) IsValid() bool
- func (it TypeStatus) LeftFullName() string
- func (it TypeStatus) LeftName() string
- func (it TypeStatus) MustBeSame()
- func (it TypeStatus) NonPointerLeft() reflect.Type
- func (it TypeStatus) NonPointerRight() reflect.Type
- func (it TypeStatus) NotEqualSrcDestinationErr() error
- func (it TypeStatus) NotEqualSrcDestinationMessage() string
- func (it TypeStatus) NotMatchErr(leftName, rightName string) error
- func (it TypeStatus) NotMatchMessage(leftName, rightName string) string
- func (it TypeStatus) RightFullName() string
- func (it TypeStatus) RightName() string
- func (it TypeStatus) SrcDestinationMustBeSame()
- func (it TypeStatus) ValidationError() error
- type TypeToTypeConverterFunc
- type TypeToTypeConverterMustFunc
- type TypeToTypeConverterWithOptionsFunc
- type TypeToTypeConverterWithOptionsMustFunc
- type ValueStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyToReflectVal ¶
func IsAnyTypesOf ¶
func LengthOfReflect ¶
func MustBeAcceptedTypes ¶
func NotAcceptedTypesErr ¶
func PointerOrNonPointer ¶
func ReflectInterfaceVal ¶
func ReflectInterfaceVal(any interface{}) interface{}
ReflectInterfaceVal
Reduce pointer to value (one step only)
func ReflectKindValidation ¶
func ReflectSetFromTo ¶
func ReflectSetFromTo( from, toPointer interface{}, ) error
ReflectSetFromTo
Set any object from to toPointer object ¶
Valid Inputs or Supported (https://t.ly/SGWUx):
- From, To: (null, null) -- do nothing
- From, To: (sameTypePointer, sameTypePointer) -- try reflection
- From, To: (sameTypeNonPointer, sameTypePointer) -- try reflection
- From, To: ([]byte or *[]byte, otherType) -- try unmarshal, reflect
- From, To: (otherType, *[]byte) -- try marshal, reflect
Validations:
- Check null, if both null no error return quickly.
- NotSupported returns as error.
- NotSupported: (from, to) - (..., not pointer)
- NotSupported: (from, to) - (null, notNull)
- NotSupported: (from, to) - (notNull, null)
- NotSupported: (from, to) - not same type and not bytes on any
- `From` null or nil is not supported and will return error.
Reference:
- Reflection String Set Example : https://go.dev/play/p/fySLYuOvoRK.go?download=true
- Method document screenshot : https://prnt.sc/26dmf5g
func ReflectTypeValidation ¶
func SafeTypeName ¶
func SafeTypeName(any interface{}) string
func SafeZeroSet ¶
func TypeMustBeSame ¶
func TypeMustBeSame( left, right interface{}, )
func TypeNotEqualErr ¶
func TypeNotEqualErr( left, right interface{}, ) error
func TypesIndexOf ¶
func ZeroSet ¶
ZeroSet
Sets empty bytes to the struct or the value but don't make it nil.
It only makes all fields to nil or zero values.
Warning :
- Must be set as a pointer reflect value.
func ZeroSetAny ¶
func ZeroSetAny(anyItem interface{})
ZeroSetAny
Sets empty bytes to the struct or the value but don't make it nil.
It only makes all fields to nil or zero values.
Warning :
- Must be set as a pointer any.
Types ¶
type AnyCollection ¶
type AnyCollection struct {
// contains filtered or unexported fields
}
func EmptyAnyCollection ¶
func EmptyAnyCollection() *AnyCollection
func NewAnyCollection ¶
func NewAnyCollection(capacity int) *AnyCollection
func (*AnyCollection) Add ¶
func (it *AnyCollection) Add(anyItem interface{}) *AnyCollection
func (*AnyCollection) AddAny ¶
func (it *AnyCollection) AddAny(anyItem interface{}, isValid bool) *AnyCollection
func (*AnyCollection) AddAnyItemsWithTypeValidation ¶
func (it *AnyCollection) AddAnyItemsWithTypeValidation( isContinueOnError, isNullNotAllowed bool, expectedType reflect.Type, anyItems ...interface{}, ) error
func (*AnyCollection) AddAnyManyDynamic ¶
func (it *AnyCollection) AddAnyManyDynamic(anyItems ...interface{}) *AnyCollection
func (*AnyCollection) AddAnySliceFromSingleItem ¶
func (it *AnyCollection) AddAnySliceFromSingleItem( sliceList interface{}, ) *AnyCollection
func (*AnyCollection) AddAnyWithTypeValidation ¶
func (it *AnyCollection) AddAnyWithTypeValidation( isNullNotAllowed bool, expectedType reflect.Type, anyItem interface{}, ) error
func (*AnyCollection) AddMany ¶
func (it *AnyCollection) AddMany(anyItems ...interface{}) *AnyCollection
func (*AnyCollection) AddNonNull ¶
func (it *AnyCollection) AddNonNull(anyItem interface{}) *AnyCollection
func (*AnyCollection) AddNonNullDynamic ¶
func (it *AnyCollection) AddNonNullDynamic(anyItem interface{}, isValid bool) *AnyCollection
func (*AnyCollection) At ¶
func (it *AnyCollection) At(index int) interface{}
func (*AnyCollection) AtAsDynamic ¶
func (it *AnyCollection) AtAsDynamic(index int) Dynamic
func (*AnyCollection) Count ¶
func (it *AnyCollection) Count() int
func (*AnyCollection) DynamicCollection ¶
func (it *AnyCollection) DynamicCollection() *DynamicCollection
func (*AnyCollection) DynamicItems ¶
func (it *AnyCollection) DynamicItems() []Dynamic
func (*AnyCollection) First ¶
func (it *AnyCollection) First() interface{}
func (*AnyCollection) FirstDynamic ¶
func (it *AnyCollection) FirstDynamic() interface{}
func (*AnyCollection) FirstOrDefault ¶
func (it *AnyCollection) FirstOrDefault() interface{}
func (*AnyCollection) FirstOrDefaultDynamic ¶
func (it *AnyCollection) FirstOrDefaultDynamic() interface{}
func (*AnyCollection) GetPagedCollection ¶
func (it *AnyCollection) GetPagedCollection( eachPageSize int, ) []*AnyCollection
func (*AnyCollection) GetPagesSize ¶
func (it *AnyCollection) GetPagesSize( eachPageSize int, ) int
func (*AnyCollection) GetPagingInfo ¶
func (it *AnyCollection) GetPagingInfo( eachPageSize int, pageIndex int, ) pagingutil.PagingInfo
func (*AnyCollection) GetSinglePageCollection ¶
func (it *AnyCollection) GetSinglePageCollection( eachPageSize int, pageIndex int, ) *AnyCollection
GetSinglePageCollection PageIndex is one based index. Should be above or equal 1
func (*AnyCollection) HasAnyItem ¶
func (it *AnyCollection) HasAnyItem() bool
func (*AnyCollection) HasIndex ¶
func (it *AnyCollection) HasIndex(index int) bool
func (*AnyCollection) IsEmpty ¶
func (it *AnyCollection) IsEmpty() bool
func (*AnyCollection) Items ¶
func (it *AnyCollection) Items() []interface{}
func (AnyCollection) Json ¶
func (it AnyCollection) Json() corejson.Result
func (*AnyCollection) JsonModel ¶
func (it *AnyCollection) JsonModel() []interface{}
func (*AnyCollection) JsonModelAny ¶
func (it *AnyCollection) JsonModelAny() interface{}
func (*AnyCollection) JsonParseSelfInject ¶
func (it *AnyCollection) JsonParseSelfInject( jsonResult *corejson.Result, ) error
func (AnyCollection) JsonPtr ¶
func (it AnyCollection) JsonPtr() *corejson.Result
func (*AnyCollection) JsonResultsCollection ¶
func (it *AnyCollection) JsonResultsCollection() *corejson.ResultsCollection
func (*AnyCollection) JsonResultsPtrCollection ¶
func (it *AnyCollection) JsonResultsPtrCollection() *corejson.ResultsPtrCollection
func (*AnyCollection) JsonString ¶
func (it *AnyCollection) JsonString() (jsonString string, err error)
func (*AnyCollection) JsonStringMust ¶
func (it *AnyCollection) JsonStringMust() string
func (*AnyCollection) Last ¶
func (it *AnyCollection) Last() interface{}
func (*AnyCollection) LastDynamic ¶
func (it *AnyCollection) LastDynamic() interface{}
func (*AnyCollection) LastIndex ¶
func (it *AnyCollection) LastIndex() int
func (*AnyCollection) LastOrDefault ¶
func (it *AnyCollection) LastOrDefault() interface{}
func (*AnyCollection) LastOrDefaultDynamic ¶
func (it *AnyCollection) LastOrDefaultDynamic() interface{}
func (*AnyCollection) Length ¶
func (it *AnyCollection) Length() int
func (*AnyCollection) Limit ¶
func (it *AnyCollection) Limit(limit int) []interface{}
func (*AnyCollection) LimitCollection ¶
func (it *AnyCollection) LimitCollection(limit int) *AnyCollection
func (*AnyCollection) LimitDynamic ¶
func (it *AnyCollection) LimitDynamic(limit int) interface{}
func (*AnyCollection) ListStrings ¶
func (it *AnyCollection) ListStrings(isIncludeFieldName bool) []string
func (*AnyCollection) ListStringsPtr ¶
func (it *AnyCollection) ListStringsPtr(isIncludeFieldName bool) *[]string
func (*AnyCollection) Loop ¶
func (it *AnyCollection) Loop( isRunAsync bool, loopProcessorFunc func(index int, item interface{}) (isBreak bool), ) *AnyCollection
func (*AnyCollection) LoopDynamic ¶
func (it *AnyCollection) LoopDynamic( isRunAsync bool, loopProcessorFunc func(index int, item Dynamic) (isBreak bool), ) *AnyCollection
func (*AnyCollection) MarshalJSON ¶
func (it *AnyCollection) MarshalJSON() ([]byte, error)
func (*AnyCollection) ParseInjectUsingJson ¶
func (it *AnyCollection) ParseInjectUsingJson( jsonResult *corejson.Result, ) (*AnyCollection, error)
func (*AnyCollection) ParseInjectUsingJsonMust ¶
func (it *AnyCollection) ParseInjectUsingJsonMust( jsonResult *corejson.Result, ) *AnyCollection
func (*AnyCollection) ReflectSetAt ¶
func (it *AnyCollection) ReflectSetAt( index int, toPointerOrBytesSet interface{}, ) error
func (*AnyCollection) RemoveAt ¶
func (it *AnyCollection) RemoveAt(index int) (isSuccess bool)
func (*AnyCollection) SafeLimitCollection ¶
func (it *AnyCollection) SafeLimitCollection(limit int) *AnyCollection
func (*AnyCollection) Skip ¶
func (it *AnyCollection) Skip(skippingItemsCount int) []interface{}
func (*AnyCollection) SkipCollection ¶
func (it *AnyCollection) SkipCollection(skippingItemsCount int) *AnyCollection
func (*AnyCollection) SkipDynamic ¶
func (it *AnyCollection) SkipDynamic(skippingItemsCount int) interface{}
func (*AnyCollection) String ¶
func (it *AnyCollection) String() string
func (*AnyCollection) Strings ¶
func (it *AnyCollection) Strings() []string
func (*AnyCollection) Take ¶
func (it *AnyCollection) Take(takeDynamicItems int) []interface{}
func (*AnyCollection) TakeCollection ¶
func (it *AnyCollection) TakeCollection(takeDynamicItems int) *AnyCollection
func (*AnyCollection) TakeDynamic ¶
func (it *AnyCollection) TakeDynamic(takeDynamicItems int) interface{}
func (*AnyCollection) UnmarshalJSON ¶
func (it *AnyCollection) UnmarshalJSON(data []byte) error
type BytesConverter ¶
type BytesConverter struct {
// contains filtered or unexported fields
}
func NewBytesConverter ¶
func NewBytesConverter( rawBytes []byte, ) *BytesConverter
func NewBytesConverterUsingJsonResult ¶
func NewBytesConverterUsingJsonResult( jsonResult *corejson.Result, ) (*BytesConverter, error)
func (BytesConverter) CastString ¶
func (it BytesConverter) CastString() (line string, err error)
func (BytesConverter) Deserialize ¶
func (it BytesConverter) Deserialize( deserializePointer interface{}, ) error
func (BytesConverter) DeserializeMust ¶
func (it BytesConverter) DeserializeMust( deserializePointer interface{}, )
func (BytesConverter) SafeCastString ¶
func (it BytesConverter) SafeCastString() (line string)
func (BytesConverter) ToAnyCollection ¶
func (it BytesConverter) ToAnyCollection() (anyCollection *AnyCollection, err error)
func (BytesConverter) ToBool ¶
func (it BytesConverter) ToBool() (isResult bool, err error)
func (BytesConverter) ToBoolMust ¶
func (it BytesConverter) ToBoolMust() (isResult bool)
func (BytesConverter) ToBytesCollection ¶
func (it BytesConverter) ToBytesCollection() ( bytesCollection *corejson.BytesCollection, err error, )
func (BytesConverter) ToCollection ¶
func (it BytesConverter) ToCollection() (collection *corestr.Collection, err error)
func (BytesConverter) ToCollectionMust ¶
func (it BytesConverter) ToCollectionMust() (collection *corestr.Collection)
func (BytesConverter) ToDynamicCollection ¶
func (it BytesConverter) ToDynamicCollection() (dynamicCollection *DynamicCollection, err error)
func (BytesConverter) ToHashmap ¶
func (it BytesConverter) ToHashmap() (hashmap *corestr.Hashmap, err error)
func (BytesConverter) ToHashmapMust ¶
func (it BytesConverter) ToHashmapMust() (hashmap *corestr.Hashmap)
func (BytesConverter) ToHashset ¶
func (it BytesConverter) ToHashset() (hashset *corestr.Hashset, err error)
func (BytesConverter) ToHashsetMust ¶
func (it BytesConverter) ToHashsetMust() (hashset *corestr.Hashset)
func (BytesConverter) ToInt64 ¶
func (it BytesConverter) ToInt64() (integer64 int64, err error)
func (BytesConverter) ToInt64Must ¶
func (it BytesConverter) ToInt64Must() (integer64 int64)
func (BytesConverter) ToJsonMapResults ¶
func (it BytesConverter) ToJsonMapResults() ( jsonMapResults *corejson.MapResults, err error, )
func (BytesConverter) ToJsonResultCollection ¶
func (it BytesConverter) ToJsonResultCollection() ( jsonResultCollection *corejson.ResultsCollection, err error, )
func (BytesConverter) ToKeyValCollection ¶
func (it BytesConverter) ToKeyValCollection() (keyValCollection *KeyValCollection, err error)
func (BytesConverter) ToMapAnyItems ¶
func (it BytesConverter) ToMapAnyItems() (mapAnyItems *MapAnyItems, err error)
func (BytesConverter) ToSimpleSlice ¶
func (it BytesConverter) ToSimpleSlice() (simpleSlice *corestr.SimpleSlice, err error)
func (BytesConverter) ToSimpleSliceMust ¶
func (it BytesConverter) ToSimpleSliceMust() (simpleSlice *corestr.SimpleSlice)
func (BytesConverter) ToString ¶
func (it BytesConverter) ToString() (line string, err error)
func (BytesConverter) ToStringMust ¶
func (it BytesConverter) ToStringMust() (line string)
func (BytesConverter) ToStrings ¶
func (it BytesConverter) ToStrings() (lines []string, err error)
func (BytesConverter) ToStringsMust ¶
func (it BytesConverter) ToStringsMust() (lines []string)
type CastedResult ¶
type CastedResult struct { Casted interface{} SourceReflectType reflect.Type SourceKind reflect.Kind Error error IsNull, IsMatchingAcceptedType bool IsValid bool IsPointer bool // refers to how returned, ptr or non ptr IsSourcePointer bool }
func CastTo ¶
func CastTo( isOutputPointer bool, input interface{}, acceptedTypes ...reflect.Type, ) CastedResult
func (*CastedResult) HasAnyIssues ¶
func (it *CastedResult) HasAnyIssues() bool
func (*CastedResult) HasError ¶
func (it *CastedResult) HasError() bool
func (*CastedResult) IsInvalid ¶
func (it *CastedResult) IsInvalid() bool
func (*CastedResult) IsNotMatchingAcceptedType ¶
func (it *CastedResult) IsNotMatchingAcceptedType() bool
func (*CastedResult) IsNotNull ¶
func (it *CastedResult) IsNotNull() bool
func (*CastedResult) IsNotPointer ¶
func (it *CastedResult) IsNotPointer() bool
func (*CastedResult) IsSourceKind ¶
func (it *CastedResult) IsSourceKind(kind reflect.Kind) bool
type Dynamic ¶
type Dynamic struct {
// contains filtered or unexported fields
}
func InvalidDynamic ¶
func InvalidDynamic() Dynamic
func InvalidDynamicPtr ¶
func InvalidDynamicPtr() *Dynamic
func NewDynamic ¶
func NewDynamicPtr ¶
func NewDynamicValid ¶
func NewDynamicValid( data interface{}, ) Dynamic
func (*Dynamic) ConvertUsingFunc ¶
func (it *Dynamic) ConvertUsingFunc( converter SimpleInOutConverter, expectedType reflect.Type, ) *SimpleResult
func (*Dynamic) Deserialize ¶
func (*Dynamic) FilterAsDynamicCollection ¶
func (it *Dynamic) FilterAsDynamicCollection( filterFunc func(index int, itemAsDynamic Dynamic) (isTake, isBreak bool), ) *DynamicCollection
func (*Dynamic) IntDefault ¶
func (*Dynamic) IsPrimitive ¶
func (*Dynamic) IsReflectTypeOf ¶
func (*Dynamic) IsSliceOrArray ¶
func (*Dynamic) IsSliceOrArrayOrMap ¶
func (*Dynamic) IsStringType ¶
func (*Dynamic) IsStructStringNullOrEmpty ¶
func (*Dynamic) IsStructStringNullOrEmptyOrWhitespace ¶
func (*Dynamic) IsValueType ¶
func (*Dynamic) ItemReflectValueUsingIndex ¶
func (*Dynamic) ItemReflectValueUsingKey ¶
func (*Dynamic) ItemUsingIndex ¶
func (*Dynamic) ItemUsingKey ¶
func (it *Dynamic) ItemUsingKey(key interface{}) interface{}
func (*Dynamic) JsonBytesPtr ¶
JsonBytesPtr returns empty string on nil. no error on nil.
func (*Dynamic) JsonModelAny ¶
func (it *Dynamic) JsonModelAny() interface{}
func (*Dynamic) JsonParseSelfInject ¶
func (*Dynamic) JsonPayloadMust ¶
func (*Dynamic) JsonString ¶
func (*Dynamic) JsonStringMust ¶
func (*Dynamic) Length ¶
Length Returns length of a slice, map, array
It will also reduce from pointer ¶
Reference : https://cutt.ly/PnaWAFn | https://cutt.ly/jnaEig8 | https://play.golang.org/p/UCORoShXlv1
func (*Dynamic) MapToKeyVal ¶
func (it *Dynamic) MapToKeyVal() (*KeyValCollection, error)
func (*Dynamic) MarshalJSON ¶
func (*Dynamic) ParseInjectUsingJson ¶
func (*Dynamic) ParseInjectUsingJsonMust ¶
ParseInjectUsingJsonMust Panic if error
func (*Dynamic) ReflectKind ¶
func (*Dynamic) ReflectSetTo ¶
func (*Dynamic) ReflectType ¶
func (*Dynamic) ReflectTypeName ¶
func (*Dynamic) ReflectValue ¶
func (*Dynamic) StructString ¶
func (*Dynamic) StructStringPtr ¶
func (*Dynamic) UnmarshalJSON ¶
func (*Dynamic) ValueInt64 ¶
func (*Dynamic) ValueMarshal ¶
func (*Dynamic) ValueNullErr ¶
func (*Dynamic) ValueString ¶
func (*Dynamic) ValueStrings ¶
type DynamicCollection ¶
type DynamicCollection struct {
// contains filtered or unexported fields
}
func EmptyDynamicCollection ¶
func EmptyDynamicCollection() *DynamicCollection
func NewDynamicCollection ¶
func NewDynamicCollection(capacity int) *DynamicCollection
func (*DynamicCollection) Add ¶
func (it *DynamicCollection) Add( dynamic Dynamic, ) *DynamicCollection
func (*DynamicCollection) AddAny ¶
func (it *DynamicCollection) AddAny( anyItem interface{}, isValid bool, ) *DynamicCollection
func (*DynamicCollection) AddAnyItemsWithTypeValidation ¶
func (it *DynamicCollection) AddAnyItemsWithTypeValidation( isContinueOnError, isNullNotAllowed bool, expectedType reflect.Type, anyItems ...interface{}, ) error
func (*DynamicCollection) AddAnyMany ¶
func (it *DynamicCollection) AddAnyMany( anyItems ...interface{}, ) *DynamicCollection
func (*DynamicCollection) AddAnyNonNull ¶
func (it *DynamicCollection) AddAnyNonNull( anyItem interface{}, isValid bool, ) *DynamicCollection
func (*DynamicCollection) AddAnySliceFromSingleItem ¶
func (it *DynamicCollection) AddAnySliceFromSingleItem( isValid bool, sliceList interface{}, ) *DynamicCollection
func (*DynamicCollection) AddAnyWithTypeValidation ¶
func (it *DynamicCollection) AddAnyWithTypeValidation( isNullNotAllowed bool, expectedType reflect.Type, anyItem interface{}, ) error
func (*DynamicCollection) AddManyPtr ¶
func (it *DynamicCollection) AddManyPtr( dynamicItems ...*Dynamic, ) *DynamicCollection
func (*DynamicCollection) AddPtr ¶
func (it *DynamicCollection) AddPtr( dynamic *Dynamic, ) *DynamicCollection
func (*DynamicCollection) AnyItems ¶
func (it *DynamicCollection) AnyItems() []interface{}
func (*DynamicCollection) AnyItemsCollection ¶
func (it *DynamicCollection) AnyItemsCollection() *AnyCollection
func (*DynamicCollection) At ¶
func (it *DynamicCollection) At(index int) Dynamic
func (*DynamicCollection) Count ¶
func (it *DynamicCollection) Count() int
func (*DynamicCollection) First ¶
func (it *DynamicCollection) First() Dynamic
func (*DynamicCollection) FirstDynamic ¶
func (it *DynamicCollection) FirstDynamic() interface{}
func (*DynamicCollection) FirstOrDefault ¶
func (it *DynamicCollection) FirstOrDefault() *Dynamic
func (*DynamicCollection) FirstOrDefaultDynamic ¶
func (it *DynamicCollection) FirstOrDefaultDynamic() interface{}
func (*DynamicCollection) GetPagedCollection ¶
func (it *DynamicCollection) GetPagedCollection( eachPageSize int, ) []*DynamicCollection
func (*DynamicCollection) GetPagesSize ¶
func (it *DynamicCollection) GetPagesSize( eachPageSize int, ) int
func (*DynamicCollection) GetPagingInfo ¶
func (it *DynamicCollection) GetPagingInfo( eachPageSize int, pageIndex int, ) pagingutil.PagingInfo
func (*DynamicCollection) GetSinglePageCollection ¶
func (it *DynamicCollection) GetSinglePageCollection( eachPageSize int, pageIndex int, ) *DynamicCollection
GetSinglePageCollection PageIndex is one based index. Should be above or equal 1
func (*DynamicCollection) HasAnyItem ¶
func (it *DynamicCollection) HasAnyItem() bool
func (*DynamicCollection) HasIndex ¶
func (it *DynamicCollection) HasIndex(index int) bool
func (*DynamicCollection) IsEmpty ¶
func (it *DynamicCollection) IsEmpty() bool
func (*DynamicCollection) Items ¶
func (it *DynamicCollection) Items() []Dynamic
func (DynamicCollection) Json ¶
func (it DynamicCollection) Json() corejson.Result
func (*DynamicCollection) JsonModel ¶
func (it *DynamicCollection) JsonModel() DynamicCollectionModel
func (*DynamicCollection) JsonModelAny ¶
func (it *DynamicCollection) JsonModelAny() interface{}
func (*DynamicCollection) JsonParseSelfInject ¶
func (it *DynamicCollection) JsonParseSelfInject( jsonResult *corejson.Result, ) error
func (DynamicCollection) JsonPtr ¶
func (it DynamicCollection) JsonPtr() *corejson.Result
func (*DynamicCollection) JsonResultsCollection ¶
func (it *DynamicCollection) JsonResultsCollection() *corejson.ResultsCollection
func (*DynamicCollection) JsonResultsPtrCollection ¶
func (it *DynamicCollection) JsonResultsPtrCollection() *corejson.ResultsPtrCollection
func (*DynamicCollection) JsonString ¶
func (it *DynamicCollection) JsonString() (jsonString string, err error)
func (*DynamicCollection) JsonStringMust ¶
func (it *DynamicCollection) JsonStringMust() string
func (*DynamicCollection) Last ¶
func (it *DynamicCollection) Last() Dynamic
func (*DynamicCollection) LastDynamic ¶
func (it *DynamicCollection) LastDynamic() interface{}
func (*DynamicCollection) LastIndex ¶
func (it *DynamicCollection) LastIndex() int
func (*DynamicCollection) LastOrDefault ¶
func (it *DynamicCollection) LastOrDefault() *Dynamic
func (*DynamicCollection) LastOrDefaultDynamic ¶
func (it *DynamicCollection) LastOrDefaultDynamic() interface{}
func (*DynamicCollection) Length ¶
func (it *DynamicCollection) Length() int
func (*DynamicCollection) Limit ¶
func (it *DynamicCollection) Limit(limit int) []Dynamic
func (*DynamicCollection) LimitCollection ¶
func (it *DynamicCollection) LimitCollection(limit int) *DynamicCollection
func (*DynamicCollection) LimitDynamic ¶
func (it *DynamicCollection) LimitDynamic(limit int) interface{}
func (*DynamicCollection) ListStrings ¶
func (it *DynamicCollection) ListStrings() []string
func (*DynamicCollection) ListStringsPtr ¶
func (it *DynamicCollection) ListStringsPtr() *[]string
func (*DynamicCollection) Loop ¶
func (it *DynamicCollection) Loop( loopProcessorFunc func(index int, dynamicItem *Dynamic) (isBreak bool), )
func (*DynamicCollection) MarshalJSON ¶
func (it *DynamicCollection) MarshalJSON() ([]byte, error)
func (*DynamicCollection) ParseInjectUsingJson ¶
func (it *DynamicCollection) ParseInjectUsingJson( jsonResult *corejson.Result, ) (*DynamicCollection, error)
func (*DynamicCollection) ParseInjectUsingJsonMust ¶
func (it *DynamicCollection) ParseInjectUsingJsonMust( jsonResult *corejson.Result, ) *DynamicCollection
func (*DynamicCollection) RemoveAt ¶
func (it *DynamicCollection) RemoveAt(index int) (isSuccess bool)
func (*DynamicCollection) SafeLimitCollection ¶
func (it *DynamicCollection) SafeLimitCollection(limit int) *DynamicCollection
func (*DynamicCollection) Skip ¶
func (it *DynamicCollection) Skip(skippingItemsCount int) []Dynamic
func (*DynamicCollection) SkipCollection ¶
func (it *DynamicCollection) SkipCollection(skippingItemsCount int) *DynamicCollection
func (*DynamicCollection) SkipDynamic ¶
func (it *DynamicCollection) SkipDynamic(skippingItemsCount int) interface{}
func (*DynamicCollection) String ¶
func (it *DynamicCollection) String() string
func (*DynamicCollection) Strings ¶
func (it *DynamicCollection) Strings() []string
func (*DynamicCollection) Take ¶
func (it *DynamicCollection) Take(takeDynamicItems int) []Dynamic
func (*DynamicCollection) TakeCollection ¶
func (it *DynamicCollection) TakeCollection(takeDynamicItems int) *DynamicCollection
func (*DynamicCollection) TakeDynamic ¶
func (it *DynamicCollection) TakeDynamic(takeDynamicItems int) interface{}
func (*DynamicCollection) UnmarshalJSON ¶
func (it *DynamicCollection) UnmarshalJSON(data []byte) error
type DynamicCollectionModel ¶
type DynamicCollectionModel struct {
Items []Dynamic
}
type DynamicStatus ¶
func InvalidDynamicStatus ¶
func InvalidDynamicStatus(message string) *DynamicStatus
func InvalidDynamicStatusNoMessage ¶
func InvalidDynamicStatusNoMessage() *DynamicStatus
func (DynamicStatus) Clone ¶
func (it DynamicStatus) Clone() DynamicStatus
Clone Warning: Cannot clone dynamic data or interface properly but set it again
If it is a pointer one needs to copy it manually.
func (*DynamicStatus) ClonePtr ¶
func (it *DynamicStatus) ClonePtr() *DynamicStatus
type KeyVal ¶
type KeyVal struct { Key interface{} Value interface{} }
func (*KeyVal) CastKeyVal ¶
func (*KeyVal) IsKeyNullOrEmptyString ¶
func (*KeyVal) IsValueNull ¶
func (KeyVal) JsonModelAny ¶
func (it KeyVal) JsonModelAny() interface{}
func (*KeyVal) JsonParseSelfInject ¶
func (*KeyVal) KeyDynamic ¶
func (*KeyVal) KeyDynamicPtr ¶
func (*KeyVal) KeyNullErr ¶
func (*KeyVal) KeyReflectSet ¶
func (*KeyVal) ParseInjectUsingJson ¶
func (*KeyVal) ParseInjectUsingJsonMust ¶
ParseInjectUsingJsonMust Panic if error
func (*KeyVal) ReflectSetKey ¶
func (*KeyVal) ReflectSetTo ¶
func (*KeyVal) ReflectSetToMust ¶
func (it *KeyVal) ReflectSetToMust(toPointer interface{})
func (*KeyVal) ValueDynamic ¶
func (*KeyVal) ValueDynamicPtr ¶
func (*KeyVal) ValueInt64 ¶
func (*KeyVal) ValueNullErr ¶
func (*KeyVal) ValueReflectSet ¶
func (*KeyVal) ValueReflectValue ¶
func (*KeyVal) ValueString ¶
func (*KeyVal) ValueStrings ¶
type KeyValCollection ¶
type KeyValCollection struct {
// contains filtered or unexported fields
}
func EmptyKeyValCollection ¶
func EmptyKeyValCollection() *KeyValCollection
func MapAsKeyValSlice ¶
func MapAsKeyValSlice(reflectVal reflect.Value) (*KeyValCollection, error)
MapAsKeyValSlice
expectation : map[key:interface{}]interface{}
func NewKeyValCollection ¶
func NewKeyValCollection(capacity int) *KeyValCollection
func (*KeyValCollection) Add ¶
func (it *KeyValCollection) Add( keyVal KeyVal, ) *KeyValCollection
func (*KeyValCollection) AddMany ¶
func (it *KeyValCollection) AddMany( keyValues ...KeyVal, ) *KeyValCollection
func (*KeyValCollection) AddManyPtr ¶
func (it *KeyValCollection) AddManyPtr( keyValues ...*KeyVal, ) *KeyValCollection
func (*KeyValCollection) AddPtr ¶
func (it *KeyValCollection) AddPtr( keyVal *KeyVal, ) *KeyValCollection
func (*KeyValCollection) AllKeys ¶
func (it *KeyValCollection) AllKeys() []string
func (*KeyValCollection) AllKeysSorted ¶
func (it *KeyValCollection) AllKeysSorted() []string
func (*KeyValCollection) AllValues ¶
func (it *KeyValCollection) AllValues() []interface{}
func (KeyValCollection) Clone ¶
func (it KeyValCollection) Clone() KeyValCollection
func (*KeyValCollection) ClonePtr ¶
func (it *KeyValCollection) ClonePtr() *KeyValCollection
func (*KeyValCollection) GetPagedCollection ¶
func (it *KeyValCollection) GetPagedCollection( eachPageSize int, ) []*KeyValCollection
func (*KeyValCollection) GetPagesSize ¶
func (it *KeyValCollection) GetPagesSize( eachPageSize int, ) int
func (*KeyValCollection) GetPagingInfo ¶
func (it *KeyValCollection) GetPagingInfo( eachPageSize int, pageIndex int, ) pagingutil.PagingInfo
func (*KeyValCollection) GetSinglePageCollection ¶
func (it *KeyValCollection) GetSinglePageCollection( eachPageSize int, pageIndex int, ) *KeyValCollection
GetSinglePageCollection PageIndex is one based index. Should be above or equal 1
func (*KeyValCollection) HasAnyItem ¶
func (it *KeyValCollection) HasAnyItem() bool
func (*KeyValCollection) IsEmpty ¶
func (it *KeyValCollection) IsEmpty() bool
func (*KeyValCollection) Items ¶
func (it *KeyValCollection) Items() []KeyVal
func (KeyValCollection) Json ¶
func (it KeyValCollection) Json() corejson.Result
func (*KeyValCollection) JsonMapResults ¶
func (it *KeyValCollection) JsonMapResults() (*corejson.MapResults, error)
func (KeyValCollection) JsonModel ¶
func (it KeyValCollection) JsonModel() interface{}
func (KeyValCollection) JsonModelAny ¶
func (it KeyValCollection) JsonModelAny() interface{}
func (*KeyValCollection) JsonParseSelfInject ¶
func (it *KeyValCollection) JsonParseSelfInject( jsonResult *corejson.Result, ) error
func (KeyValCollection) JsonPtr ¶
func (it KeyValCollection) JsonPtr() *corejson.Result
func (*KeyValCollection) JsonResultsCollection ¶
func (it *KeyValCollection) JsonResultsCollection() *corejson.ResultsCollection
func (*KeyValCollection) JsonResultsPtrCollection ¶
func (it *KeyValCollection) JsonResultsPtrCollection() *corejson.ResultsPtrCollection
func (*KeyValCollection) JsonString ¶
func (it *KeyValCollection) JsonString() (jsonString string, err error)
func (*KeyValCollection) JsonStringMust ¶
func (it *KeyValCollection) JsonStringMust() string
func (*KeyValCollection) Length ¶
func (it *KeyValCollection) Length() int
func (*KeyValCollection) MapAnyItems ¶
func (it *KeyValCollection) MapAnyItems() *MapAnyItems
func (KeyValCollection) NonPtr ¶
func (it KeyValCollection) NonPtr() KeyValCollection
func (*KeyValCollection) ParseInjectUsingJson ¶
func (it *KeyValCollection) ParseInjectUsingJson( jsonResult *corejson.Result, ) (*KeyValCollection, error)
func (*KeyValCollection) ParseInjectUsingJsonMust ¶
func (it *KeyValCollection) ParseInjectUsingJsonMust( jsonResult *corejson.Result, ) *KeyValCollection
ParseInjectUsingJsonMust Panic if error
func (*KeyValCollection) Ptr ¶
func (it *KeyValCollection) Ptr() *KeyValCollection
func (*KeyValCollection) Serialize ¶
func (it *KeyValCollection) Serialize() (jsonBytesPtr []byte, err error)
func (*KeyValCollection) String ¶
func (it *KeyValCollection) String() string
type LeftRight ¶
type LeftRight struct {
Left, Right interface{}
}
func (*LeftRight) DeserializeLeft ¶
func (*LeftRight) DeserializeRight ¶
func (*LeftRight) HasAnyItem ¶
func (*LeftRight) IsLeftEmpty ¶
func (*LeftRight) IsRightEmpty ¶
func (*LeftRight) LeftReflectSet ¶
func (*LeftRight) LeftToDynamic ¶
func (*LeftRight) RightReflectSet ¶
func (*LeftRight) RightToDynamic ¶
func (*LeftRight) TypeStatus ¶
func (it *LeftRight) TypeStatus() TypeStatus
type MapAnyItemDiff ¶
type MapAnyItemDiff map[string]interface{}
func (MapAnyItemDiff) AllKeysSorted ¶
func (it MapAnyItemDiff) AllKeysSorted() []string
func (*MapAnyItemDiff) Clear ¶
func (it *MapAnyItemDiff) Clear() MapAnyItemDiff
func (*MapAnyItemDiff) DiffJsonMessage ¶
func (it *MapAnyItemDiff) DiffJsonMessage( isRegardlessType bool, rightMap map[string]interface{}, ) string
func (*MapAnyItemDiff) DiffRaw ¶
func (it *MapAnyItemDiff) DiffRaw( isRegardlessType bool, rightMap map[string]interface{}, ) map[string]interface{}
func (*MapAnyItemDiff) HasAnyChanges ¶
func (it *MapAnyItemDiff) HasAnyChanges( isRegardlessType bool, rightMap map[string]interface{}, ) bool
func (MapAnyItemDiff) HasAnyItem ¶
func (it MapAnyItemDiff) HasAnyItem() bool
func (*MapAnyItemDiff) HashmapDiffUsingRaw ¶
func (it *MapAnyItemDiff) HashmapDiffUsingRaw( isRegardlessType bool, rightMap map[string]interface{}, ) MapAnyItemDiff
func (MapAnyItemDiff) IsEmpty ¶
func (it MapAnyItemDiff) IsEmpty() bool
func (*MapAnyItemDiff) IsRawEqual ¶
func (it *MapAnyItemDiff) IsRawEqual( isRegardlessType bool, rightMap map[string]interface{}, ) bool
func (MapAnyItemDiff) Json ¶
func (it MapAnyItemDiff) Json() corejson.Result
func (MapAnyItemDiff) JsonPtr ¶
func (it MapAnyItemDiff) JsonPtr() *corejson.Result
func (MapAnyItemDiff) LastIndex ¶
func (it MapAnyItemDiff) LastIndex() int
func (*MapAnyItemDiff) Length ¶
func (it *MapAnyItemDiff) Length() int
func (MapAnyItemDiff) LogPrettyJsonString ¶
func (it MapAnyItemDiff) LogPrettyJsonString()
func (*MapAnyItemDiff) LogShouldDiffMessage ¶
func (it *MapAnyItemDiff) LogShouldDiffMessage( isRegardlessType bool, title string, rightMap map[string]interface{}, ) (diffMessage string)
func (*MapAnyItemDiff) MapAnyItems ¶
func (it *MapAnyItemDiff) MapAnyItems() *MapAnyItems
func (MapAnyItemDiff) PrettyJsonString ¶
func (it MapAnyItemDiff) PrettyJsonString() string
func (*MapAnyItemDiff) Raw ¶
func (it *MapAnyItemDiff) Raw() map[string]interface{}
func (*MapAnyItemDiff) RawMapDiffer ¶
func (it *MapAnyItemDiff) RawMapDiffer() mapdiffinternal.MapStringAnyDiff
func (*MapAnyItemDiff) ShouldDiffMessage ¶
func (it *MapAnyItemDiff) ShouldDiffMessage( isRegardlessType bool, title string, rightMap map[string]interface{}, ) string
func (*MapAnyItemDiff) ToStringsSliceOfDiffMap ¶
func (it *MapAnyItemDiff) ToStringsSliceOfDiffMap( diffMap map[string]interface{}, ) (diffSlice []string)
type MapAnyItems ¶
type MapAnyItems struct {
Items map[string]interface{}
}
func EmptyMapAnyItems ¶
func EmptyMapAnyItems() *MapAnyItems
func NewMapAnyItems ¶
func NewMapAnyItems(capacity int) *MapAnyItems
func NewMapAnyItemsUsingAnyTypeMap ¶
func NewMapAnyItemsUsingAnyTypeMap( anyTypeOfMap interface{}, ) (*MapAnyItems, error)
func NewMapAnyItemsUsingItems ¶
func NewMapAnyItemsUsingItems( itemsMap map[string]interface{}, ) *MapAnyItems
func (*MapAnyItems) Add ¶
func (it *MapAnyItems) Add( key string, valInf interface{}, ) (isNewlyAdded bool)
func (*MapAnyItems) AddJsonResultPtr ¶
func (it *MapAnyItems) AddJsonResultPtr( key string, jsonResult *corejson.Result, ) *MapAnyItems
func (*MapAnyItems) AddKeyAny ¶
func (it *MapAnyItems) AddKeyAny( keyAny corejson.KeyAny, ) (isNewlyAdded bool)
func (*MapAnyItems) AddKeyAnyWithValidation ¶
func (*MapAnyItems) AddManyMapResultsUsingOption ¶
func (it *MapAnyItems) AddManyMapResultsUsingOption( isOverridingExisting bool, mapsOfMapsResults ...map[string]interface{}, ) *MapAnyItems
func (*MapAnyItems) AddMapResult ¶
func (it *MapAnyItems) AddMapResult( mapResults map[string]interface{}, ) *MapAnyItems
AddMapResult
apply override on existing result
func (*MapAnyItems) AddMapResultOption ¶
func (it *MapAnyItems) AddMapResultOption( isOverride bool, mapResults map[string]interface{}, ) *MapAnyItems
func (*MapAnyItems) AddWithValidation ¶
func (it *MapAnyItems) AddWithValidation( typeVerify reflect.Type, key string, anyInf interface{}, ) error
func (*MapAnyItems) AllKeys ¶
func (it *MapAnyItems) AllKeys() []string
func (*MapAnyItems) AllKeysSorted ¶
func (it *MapAnyItems) AllKeysSorted() []string
func (*MapAnyItems) AllValues ¶
func (it *MapAnyItems) AllValues() []interface{}
func (*MapAnyItems) Clear ¶
func (it *MapAnyItems) Clear()
func (*MapAnyItems) ClonePtr ¶
func (it *MapAnyItems) ClonePtr() (*MapAnyItems, error)
func (*MapAnyItems) DeepClear ¶
func (it *MapAnyItems) DeepClear()
func (*MapAnyItems) Deserialize ¶
func (it *MapAnyItems) Deserialize( key string, toPointer interface{}, ) error
func (*MapAnyItems) DeserializeMust ¶
func (it *MapAnyItems) DeserializeMust( key string, toPointer interface{}, )
func (*MapAnyItems) Diff ¶
func (it *MapAnyItems) Diff( isRegardlessType bool, rightMap *MapAnyItems, ) *MapAnyItems
func (*MapAnyItems) DiffJsonMessage ¶
func (it *MapAnyItems) DiffJsonMessage( isRegardlessType bool, rightMap map[string]interface{}, ) string
func (*MapAnyItems) DiffRaw ¶
func (it *MapAnyItems) DiffRaw( isRegardlessType bool, rightMap map[string]interface{}, ) map[string]interface{}
func (*MapAnyItems) Dispose ¶
func (it *MapAnyItems) Dispose()
func (*MapAnyItems) Get ¶
func (it *MapAnyItems) Get( key string, ) (any interface{}, has bool)
func (*MapAnyItems) GetFieldsMap ¶
func (it *MapAnyItems) GetFieldsMap( key string, ) ( fieldMap map[string]interface{}, parsingErr error, isFound bool, )
func (*MapAnyItems) GetItemRef ¶
func (it *MapAnyItems) GetItemRef( key string, referenceOut interface{}, ) error
func (*MapAnyItems) GetManyItemsRefs ¶
func (it *MapAnyItems) GetManyItemsRefs( keyAnyItems ...corejson.KeyAny, ) error
func (*MapAnyItems) GetNewMapUsingKeys ¶
func (it *MapAnyItems) GetNewMapUsingKeys( isPanicOnMissing bool, keys ...string, ) *MapAnyItems
func (*MapAnyItems) GetPagedCollection ¶
func (it *MapAnyItems) GetPagedCollection( eachPageSize int, ) []*MapAnyItems
func (*MapAnyItems) GetPagesSize ¶
func (it *MapAnyItems) GetPagesSize( eachPageSize int, ) int
func (*MapAnyItems) GetSafeFieldsMap ¶
func (it *MapAnyItems) GetSafeFieldsMap( key string, ) ( fieldMap map[string]interface{}, isFound bool, )
GetSafeFieldsMap
Warning:
Swallows the parsing err if any
func (*MapAnyItems) GetSinglePageCollection ¶
func (it *MapAnyItems) GetSinglePageCollection( eachPageSize int, pageIndex int, allKeys []string, ) *MapAnyItems
GetSinglePageCollection PageIndex is one based index. Should be above or equal 1
func (*MapAnyItems) GetUsingUnmarshallAt ¶
func (it *MapAnyItems) GetUsingUnmarshallAt( key string, unmarshalRef interface{}, ) error
func (*MapAnyItems) GetUsingUnmarshallManyAt ¶
func (it *MapAnyItems) GetUsingUnmarshallManyAt( keyAnyItems ...corejson.KeyAny, ) error
func (*MapAnyItems) GetValue ¶
func (it *MapAnyItems) GetValue( key string, ) (any interface{})
func (*MapAnyItems) HasAnyChanges ¶
func (it *MapAnyItems) HasAnyChanges( isRegardlessType bool, rightMap map[string]interface{}, ) bool
func (*MapAnyItems) HasAnyItem ¶
func (it *MapAnyItems) HasAnyItem() bool
func (*MapAnyItems) HasKey ¶
func (it *MapAnyItems) HasKey(key string) bool
func (*MapAnyItems) HashmapDiffUsingRaw ¶
func (it *MapAnyItems) HashmapDiffUsingRaw( isRegardlessType bool, rightMap map[string]interface{}, ) MapAnyItemDiff
func (*MapAnyItems) IsEmpty ¶
func (it *MapAnyItems) IsEmpty() bool
func (*MapAnyItems) IsEqual ¶
func (it *MapAnyItems) IsEqual( right *MapAnyItems, ) bool
func (*MapAnyItems) IsEqualRaw ¶
func (it *MapAnyItems) IsEqualRaw( rightMappedItems map[string]interface{}, ) bool
func (*MapAnyItems) IsRawEqual ¶
func (it *MapAnyItems) IsRawEqual( isRegardlessType bool, rightMap map[string]interface{}, ) bool
func (MapAnyItems) Json ¶
func (it MapAnyItems) Json() corejson.Result
func (*MapAnyItems) JsonMapResults ¶
func (it *MapAnyItems) JsonMapResults() (*corejson.MapResults, error)
func (*MapAnyItems) JsonModel ¶
func (it *MapAnyItems) JsonModel() *corejson.MapResults
func (*MapAnyItems) JsonModelAny ¶
func (it *MapAnyItems) JsonModelAny() interface{}
func (*MapAnyItems) JsonParseSelfInject ¶
func (it *MapAnyItems) JsonParseSelfInject( jsonResult *corejson.Result, ) error
func (MapAnyItems) JsonPtr ¶
func (it MapAnyItems) JsonPtr() *corejson.Result
func (*MapAnyItems) JsonResultOfKey ¶
func (it *MapAnyItems) JsonResultOfKey( key string, ) *corejson.Result
func (*MapAnyItems) JsonResultOfKeys ¶
func (it *MapAnyItems) JsonResultOfKeys( keys ...string, ) *corejson.MapResults
func (*MapAnyItems) JsonResultsCollection ¶
func (it *MapAnyItems) JsonResultsCollection() *corejson.ResultsCollection
func (*MapAnyItems) JsonResultsPtrCollection ¶
func (it *MapAnyItems) JsonResultsPtrCollection() *corejson.ResultsPtrCollection
func (*MapAnyItems) JsonString ¶
func (it *MapAnyItems) JsonString() (jsonString string, err error)
func (*MapAnyItems) JsonStringMust ¶
func (it *MapAnyItems) JsonStringMust() string
func (*MapAnyItems) Length ¶
func (it *MapAnyItems) Length() int
func (*MapAnyItems) LogShouldDiffMessage ¶
func (it *MapAnyItems) LogShouldDiffMessage( isRegardlessType bool, title string, rightMap map[string]interface{}, ) (diffMessage string)
func (*MapAnyItems) MapAnyItems ¶
func (it *MapAnyItems) MapAnyItems() *MapAnyItems
func (*MapAnyItems) MapStringAnyDiff ¶
func (it *MapAnyItems) MapStringAnyDiff() mapdiffinternal.MapStringAnyDiff
func (*MapAnyItems) ParseInjectUsingJson ¶
func (it *MapAnyItems) ParseInjectUsingJson( jsonResult *corejson.Result, ) (*MapAnyItems, error)
func (*MapAnyItems) ParseInjectUsingJsonMust ¶
func (it *MapAnyItems) ParseInjectUsingJsonMust( jsonResult *corejson.Result, ) *MapAnyItems
ParseInjectUsingJsonMust Panic if error
func (*MapAnyItems) RawMapStringAnyDiff ¶
func (it *MapAnyItems) RawMapStringAnyDiff() mapdiffinternal.MapStringAnyDiff
func (*MapAnyItems) ReflectSetTo ¶
func (it *MapAnyItems) ReflectSetTo( key string, toPointerOrBytes interface{}, ) error
func (*MapAnyItems) ReflectSetToMust ¶
func (it *MapAnyItems) ReflectSetToMust( key string, toPointerOrBytes interface{}, )
func (*MapAnyItems) Set ¶
func (it *MapAnyItems) Set( key string, valInf interface{}, ) (isNewlyAdded bool)
func (*MapAnyItems) ShouldDiffMessage ¶
func (it *MapAnyItems) ShouldDiffMessage( isRegardlessType bool, title string, rightMap map[string]interface{}, ) string
func (*MapAnyItems) String ¶
func (it *MapAnyItems) String() string
func (*MapAnyItems) Strings ¶
func (it *MapAnyItems) Strings() []string
func (*MapAnyItems) ToStringsSliceOfDiffMap ¶
func (it *MapAnyItems) ToStringsSliceOfDiffMap( diffMap map[string]interface{}, ) (diffSlice []string)
type SimpleInOutConverter ¶
type SimpleInOutConverter func(in interface{}, typeMust reflect.Type) *SimpleResult
type SimpleRequest ¶
type SimpleRequest struct { Dynamic // contains filtered or unexported fields }
func InvalidSimpleRequest ¶
func InvalidSimpleRequest( message string, ) *SimpleRequest
func InvalidSimpleRequestNoMessage ¶
func InvalidSimpleRequestNoMessage() *SimpleRequest
func NewSimpleRequest ¶
func NewSimpleRequest( request interface{}, isValid bool, message string, ) *SimpleRequest
func NewSimpleRequestValid ¶
func NewSimpleRequestValid( request interface{}, ) *SimpleRequest
func (*SimpleRequest) GetErrorOnTypeMismatch ¶
func (receiver *SimpleRequest) GetErrorOnTypeMismatch( typeMatch reflect.Type, isIncludeInvalidMessage bool, ) error
func (*SimpleRequest) InvalidError ¶
func (receiver *SimpleRequest) InvalidError() error
func (*SimpleRequest) IsPointer ¶
func (receiver *SimpleRequest) IsPointer() bool
func (*SimpleRequest) IsReflectKind ¶
func (receiver *SimpleRequest) IsReflectKind(checkingKind reflect.Kind) bool
func (*SimpleRequest) Message ¶
func (receiver *SimpleRequest) Message() string
func (*SimpleRequest) Request ¶
func (receiver *SimpleRequest) Request() interface{}
func (*SimpleRequest) Value ¶
func (receiver *SimpleRequest) Value() interface{}
type SimpleRequestConverter ¶
type SimpleRequestConverter func(request SimpleRequest) *SimpleResult
type SimpleResult ¶
type SimpleResult struct { Dynamic Result interface{} Message string // contains filtered or unexported fields }
func InvalidSimpleResult ¶
func InvalidSimpleResult( invalidMessage string, ) *SimpleResult
func InvalidSimpleResultNoMessage ¶
func InvalidSimpleResultNoMessage() *SimpleResult
func NewSimpleResult ¶
func NewSimpleResult( result interface{}, isValid bool, invalidMessage string, ) *SimpleResult
func NewSimpleResultValid ¶
func NewSimpleResultValid( result interface{}, ) *SimpleResult
func (*SimpleResult) Clone ¶
func (it *SimpleResult) Clone() SimpleResult
func (*SimpleResult) ClonePtr ¶
func (it *SimpleResult) ClonePtr() *SimpleResult
func (*SimpleResult) GetErrorOnTypeMismatch ¶
func (it *SimpleResult) GetErrorOnTypeMismatch( typeMatch reflect.Type, isIncludeInvalidMessage bool, ) error
func (*SimpleResult) InvalidError ¶
func (it *SimpleResult) InvalidError() error
type TypeStatus ¶
type TypeStatus struct { IsSame bool IsLeftUnknownNull, IsRightUnknownNull bool IsRightPointer, IsLeftPointer bool Left, Right reflect.Type // contains filtered or unexported fields }
func TypeSameStatus ¶
func TypeSameStatus( left, right interface{}, ) TypeStatus
func (TypeStatus) IsAnyPointer ¶
func (it TypeStatus) IsAnyPointer() bool
func (TypeStatus) IsBothPointer ¶
func (it TypeStatus) IsBothPointer() bool
func (*TypeStatus) IsEqual ¶
func (it *TypeStatus) IsEqual(next *TypeStatus) bool
func (*TypeStatus) IsInvalid ¶
func (it *TypeStatus) IsInvalid() bool
func (TypeStatus) IsNotEqualTypes ¶
func (it TypeStatus) IsNotEqualTypes() bool
func (TypeStatus) IsNotSame ¶
func (it TypeStatus) IsNotSame() bool
func (TypeStatus) IsSameRegardlessPointer ¶
func (it TypeStatus) IsSameRegardlessPointer() bool
func (*TypeStatus) IsValid ¶
func (it *TypeStatus) IsValid() bool
func (TypeStatus) LeftFullName ¶
func (it TypeStatus) LeftFullName() string
func (TypeStatus) LeftName ¶
func (it TypeStatus) LeftName() string
func (TypeStatus) MustBeSame ¶
func (it TypeStatus) MustBeSame()
func (TypeStatus) NonPointerLeft ¶
func (it TypeStatus) NonPointerLeft() reflect.Type
func (TypeStatus) NonPointerRight ¶
func (it TypeStatus) NonPointerRight() reflect.Type
func (TypeStatus) NotEqualSrcDestinationErr ¶
func (it TypeStatus) NotEqualSrcDestinationErr() error
func (TypeStatus) NotEqualSrcDestinationMessage ¶
func (it TypeStatus) NotEqualSrcDestinationMessage() string
func (TypeStatus) NotMatchErr ¶
func (it TypeStatus) NotMatchErr( leftName, rightName string, ) error
func (TypeStatus) NotMatchMessage ¶
func (it TypeStatus) NotMatchMessage( leftName, rightName string, ) string
func (TypeStatus) RightFullName ¶
func (it TypeStatus) RightFullName() string
func (TypeStatus) RightName ¶
func (it TypeStatus) RightName() string
func (TypeStatus) SrcDestinationMustBeSame ¶
func (it TypeStatus) SrcDestinationMustBeSame()
func (TypeStatus) ValidationError ¶ added in v1.5.0
func (it TypeStatus) ValidationError() error
type TypeToTypeConverterFunc ¶ added in v1.4.3
type TypeToTypeConverterFunc func(in interface{}) (output interface{}, err error)
type TypeToTypeConverterMustFunc ¶ added in v1.4.3
type TypeToTypeConverterMustFunc func(in interface{}) (output interface{})
type TypeToTypeConverterWithOptionsFunc ¶ added in v1.4.3
type TypeToTypeConverterWithOptionsFunc func(in interface{}, options interface{}) (output interface{}, err error)
type TypeToTypeConverterWithOptionsMustFunc ¶ added in v1.4.3
type TypeToTypeConverterWithOptionsMustFunc func(in interface{}, options interface{}) (output interface{})
type ValueStatus ¶
func InvalidValueStatus ¶
func InvalidValueStatus(message string) *ValueStatus
func InvalidValueStatusNoMessage ¶
func InvalidValueStatusNoMessage() *ValueStatus
Source Files ¶
- AnyCollection.go
- AnyToReflectVal.go
- AnyTypeMapToMapStringAny.go
- BytesConverter.go
- CastTo.go
- CastedResult.go
- Dynamic.go
- DynamicCollection.go
- DynamicCollectionModel.go
- DynamicStatus.go
- IsAnyTypesOf.go
- KeyVal.go
- KeyValCollection.go
- LeftRight.go
- LengthOfReflect.go
- MapAnyItemDiff.go
- MapAnyItems.go
- MapAsKeyValSlice.go
- MustBeAcceptedTypes.go
- NotAcceptedTypesErr.go
- PointerOrNonPointer.go
- PointerOrNonPointerUsingReflectValue.go
- ReflectInterfaceVal.go
- ReflectKindValidation.go
- ReflectSetFromTo.go
- ReflectTypeValidation.go
- SafeTypeName.go
- SafeZeroSet.go
- SimpleRequest.go
- SimpleResult.go
- Type.go
- TypeMustBeSame.go
- TypeNotEqualErr.go
- TypeSameStatus.go
- TypeStatus.go
- TypesIndexOf.go
- ValueStatus.go
- ZeroSet.go
- ZeroSetAny.go
- consts.go
- funcs.go
- vars.go