sfloat

package
v0.0.341 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RawKey  = "raw"
	TextKey = "text"
)

Variables

View Source
var (
	RawKeyFn  = contract.PathKeyFn(RawKey)
	TextKeyFn = contract.PathKeyFn(TextKey)
)

Functions

func Idx

func Idx(p ...string) []contract.IndexEntry

func IdxSrch

func IdxSrch(p ...string) []contract.SearchIndexEntry

func Rules

Types

type Core

type Core struct {
	contract.SNum[float64] `bson:",inline" validate:"recurse"`
}

func ApplyCore

func ApplyCore(c *Core, modifiers ...CoreOption) Core

type CoreOption

type CoreOption = contracti.CoreOption[Core]

func WithSNum

func WithSNum(x contract.SNum[float64]) CoreOption

type Meta

type Meta struct{}

func ApplyMeta

func ApplyMeta(m *Meta, modifiers ...MetaOption) Meta

type MetaOption

type MetaOption = contract.MetaOption[Meta]

type SFloat

type SFloat struct {
	Meta `bson:",inline" validate:"recurse"`
	Core `bson:",inline" validate:"recurse"`
}

SFloat stores a float and its text form for searchable numerical fields.

func Mock

func Mock() *SFloat

func New

func New(m Meta, cr Core) *SFloat

func Zero

func Zero() *SFloat

Jump to

Keyboard shortcuts

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