Documentation ¶
Overview ¶
Copyright (c) 2023 the go-mongr8 Authors and Contributors [@see Authors file]
Licensed under the MIT License (https://opensource.org/licenses/MIT)
Copyright (c) 2023 the go-mongr8 Authors and Contributors [@see Authors file]
Licensed under the MIT License (https://opensource.org/licenses/MIT)
Copyright (c) 2023 the go-mongr8 Authors and Contributors [@see Authors file]
Licensed under the MIT License (https://opensource.org/licenses/MIT)
Copyright (c) 2023 the go-mongr8 Authors and Contributors [@see Authors file]
Licensed under the MIT License (https://opensource.org/licenses/MIT)
Copyright (c) 2023 the go-mongr8 Authors and Contributors [@see Authors file]
Licensed under the MIT License (https://opensource.org/licenses/MIT)
Copyright (c) 2023 the go-mongr8 Authors and Contributors [@see Authors file]
Licensed under the MIT License (https://opensource.org/licenses/MIT)
Index ¶
- Constants
- func Array(children ...interface{}) []interface{}
- func ConvertAnyToValueType(value interface{}) interface{}
- type DataType
- type SchemaValidation
- type SchemaValidationIf
- type TranslatedField
- type TranslatedFieldIf
- type TranslatedIndex
- type TranslatedIndexIf
- type Validation
- type ValidationIf
- type ValueType
- func Boolean(value bool) ValueType
- func Float32(value float32) ValueType
- func Float64(value float64) ValueType
- func Int(value int) ValueType
- func Int16(value int16) ValueType
- func Int32(value int32) ValueType
- func Int64(value int64) ValueType
- func Int8(value int8) ValueType
- func String(value string) ValueType
- func Time(value time.Time) ValueType
Constants ¶
const ( DataTypeInt = "int" DataTypeInt8 = "int8" DataTypeInt16 = "int16" DataTypeInt32 = "int32" DataTypeInt64 = "int64" DataTypeFloat32 = "float32" DataTypeFloat64 = "float64" DataTypeString = "string" DataTypeBoolean = "boolean" DataTypeTime = "time" )
list of primitive and non-primitive data types
Variables ¶
This section is empty.
Functions ¶
func ConvertAnyToValueType ¶
func ConvertAnyToValueType(value interface{}) interface{}
keep all elements/payloads in the same logical level type to ensure the integrity of data if other layer might have breaking changes
Types ¶
type SchemaValidation ¶
type SchemaValidation struct {
SchemaValidationIf
}
type SchemaValidationIf ¶
type SchemaValidationIf interface {
// contains filtered or unexported methods
}
type TranslatedField ¶
type TranslatedField struct { TranslatedFieldIf // contains filtered or unexported fields }
type TranslatedFieldIf ¶
type TranslatedFieldIf interface { // still not find the proper usecase // for GetArray() GetArray() []interface{} // get object of current field GetObject() map[string]interface{} }
translated field to bson.M doc @ee field_impl.go for implementation
func GetTranslatedField ¶
func GetTranslatedField(_field collection.Field) TranslatedFieldIf
map field to correct translated field
type TranslatedIndex ¶
type TranslatedIndex struct { TranslatedIndexIf // contains filtered or unexported fields }
type TranslatedIndexIf ¶
type TranslatedIndexIf interface { // get object of indexes GetObject() map[string]interface{} // get rules GetRules() *map[string]interface{} }
translated field to bson.M doc @ee index_impl.go for implementation
func GetTranslatedIndex ¶
func GetTranslatedIndex(_index collection.Index) TranslatedIndexIf
map index to correct translated index
type Validation ¶
type Validation struct { ValidationIf // raw collection data Collections []collection.Collection // contains filtered or unexported fields }
func (*Validation) Validate ¶
func (v *Validation) Validate() error
type ValidationIf ¶
type ValidationIf interface {
Validate()
}