facets

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2017 License: AGPL-3.0, Apache-2.0 Imports: 10 Imported by: 203

Documentation

Index

Constants

Variables

This section is empty.

Functions

func CopyFacets added in v0.8.2

func CopyFacets(fcs []*protos.Facet, param *protos.Param) (fs []*protos.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) (*protos.Facet, error)

FacetFor returns Facet for given key and val.

func SameFacets

func SameFacets(a []*protos.Facet, b []*protos.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 []*protos.Facet) error

Sorts And validates the facets.

func TypeIDFor added in v0.8.2

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

TypeIDFor gives TypeID for facet.

func ValFor added in v0.8.2

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

ValFor converts Facet into types.Val.

func ValTypeForTypeID

func ValTypeForTypeID(typId TypeID) protos.Facet_ValType

ValTypeForTypeID gives protos.Facet_ValType for given TypeID

Types

type TypeID

type TypeID protos.Facet_ValType

func TypeIDForValType

func TypeIDForValType(valType protos.Facet_ValType) TypeID

TypeIDForValType gives TypeID for protos.Facet_ValType

Jump to

Keyboard shortcuts

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