dictionary

package
v0.1.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2023 License: MIT Imports: 9 Imported by: 0

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

View Source
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 Array

func Array(children ...interface{}) []interface{}

helpers

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 DataType

type DataType string

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()
}

type ValueType

type ValueType struct {
	Type  DataType
	Value interface{}
}

func Boolean

func Boolean(value bool) ValueType

func Float32

func Float32(value float32) ValueType

func Float64

func Float64(value float64) ValueType

func Int

func Int(value int) ValueType

func Int16

func Int16(value int16) ValueType

func Int32

func Int32(value int32) ValueType

func Int64

func Int64(value int64) ValueType

func Int8

func Int8(value int8) ValueType

func String

func String(value string) ValueType

func Time

func Time(value time.Time) ValueType

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL