facets

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2018 License: AGPL-3.0, Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IntID      = TypeID(api.Facet_INT)
	FloatID    = TypeID(api.Facet_FLOAT)
	BoolID     = TypeID(api.Facet_BOOL)
	DateTimeID = TypeID(api.Facet_DATETIME)
	StringID   = TypeID(api.Facet_STRING)
)

Variables

This section is empty.

Functions

func CopyFacets added in v0.8.2

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

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

func FacetFor added in v0.8.2

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

FacetFor returns Facet for given key and val.

func SameFacets

func SameFacets(a []*api.Facet, b []*api.Facet) bool

SameFacets returns whether two facets are same or not. both should be sorted by key.

func SortAndValidate added in v0.8.2

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

Sorts And validates the facets.

func TypeIDFor added in v0.8.2

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

TypeIDFor gives TypeID for facet.

func ValFor added in v0.8.2

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

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

func TypeIDForValType

func TypeIDForValType(valType api.Facet_ValType) TypeID

TypeIDForValType gives TypeID for api.Facet_ValType

Jump to

Keyboard shortcuts

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