Help us shape the future of Go! Take the 2026 Go Developer Survey

facets

package
v25.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// IntID represents the integer type.
	IntID = TypeID(api.Facet_INT)
	// FloatID represents the floating-point number type.
	FloatID = TypeID(api.Facet_FLOAT)
	// BoolID represents the boolean type.
	BoolID = TypeID(api.Facet_BOOL)
	// DateTimeID represents the datetime type.
	DateTimeID = TypeID(api.Facet_DATETIME)
	// StringID represents the string type.
	StringID = TypeID(api.Facet_STRING)
)

Variables

This section is empty.

Functions

func CopyFacets

func CopyFacets(fcs []*api.Facet, param *pb.FacetParams) (fs []*api.Facet)

CopyFacets makes a copy of facets of the posting which are requested in param.Keys.

func FacetFor

func FacetFor(key, val string) (*api.Facet, error)

FacetFor returns Facet for given key and val.

func SortAndValidate

func SortAndValidate(fs []*api.Facet) error

SortAndValidate sorts And validates the facets.

func ToBinary

func ToBinary(key string, value interface{}, sourceType api.Facet_ValType) (
	*api.Facet, error)

ToBinary converts the given value into a binary value.

func TypeIDFor

func TypeIDFor(f *api.Facet) (types.TypeID, error)

TypeIDFor gives TypeID for facet.

func ValFor

func ValFor(f *api.Facet) (types.Val, error)

ValFor converts Facet into types.Val.

func ValTypeForTypeID

func ValTypeForTypeID(typId TypeID) api.Facet_ValType

ValTypeForTypeID gives api.Facet_ValType for given TypeID

Types

type TypeID

type TypeID api.Facet_ValType

TypeID represents the type of a facet.

Jump to

Keyboard shortcuts

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