statvar

package
v1.34.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildParentSvgMap

func BuildParentSvgMap(rawSvg map[string]*pb.StatVarGroupNode) map[string][]string

BuildParentSvgMap gets the mapping of svg/sv id to the parent svg for that svg/sv. Only gets the parent svg that have a path to the root node.

func BuildStatVarSearchIndex

func BuildStatVarSearchIndex(
	rawSvg map[string]*pb.StatVarGroupNode,
	parentSvg map[string][]string,
	blocklist bool) *resource.SearchIndex

BuildStatVarSearchIndex builds the search index for the stat var hierarchy.

func Count added in v1.33.0

func Count(
	ctx context.Context,
	btGroup *bigtable.Group,
	svOrSvgs []string,
	places []string,
) (map[string]map[string]int32, error)

Count checks if places have data for stat vars and stat var groups.

Returns a two level map from stat var dcid to place dcid to the number of stat vars with data. For a given stat var, if a place has no data, it will not show up in the second level map.

func GetEntityStatVarsHelper added in v1.34.0

func GetEntityStatVarsHelper(
	ctx context.Context, entities []string, store *store.Store) (
	map[string]*pb.StatVars, error)

GetEntityStatVarsHelper is a wrapper to get stat vars for given entities.

func GetPlaceStatVarsUnionV1

func GetPlaceStatVarsUnionV1(
	ctx context.Context, in *pb.GetPlaceStatVarsUnionRequest, store *store.Store,
) (*pb.GetPlaceStatVarsUnionResponse, error)

GetPlaceStatVarsUnionV1 implements API for Mixer.GetPlaceStatVarsUnionV1.

func GetPlaceStatsVar

func GetPlaceStatsVar(
	ctx context.Context, in *pb.GetPlaceStatsVarRequest, store *store.Store) (
	*pb.GetPlaceStatsVarResponse, error)

GetPlaceStatsVar implements API for Mixer.GetPlaceStatsVar. TODO(shifucun): Migrate clients to use GetPlaceStatVars and deprecate this.

func GetRawSvg

func GetRawSvg(ctx context.Context, store *store.Store) (
	map[string]*pb.StatVarGroupNode, error)

GetRawSvg gets the raw svg mapping.

func GetStatVarGroup

func GetStatVarGroup(
	ctx context.Context,
	in *pb.GetStatVarGroupRequest,
	store *store.Store,
	cache *resource.Cache,
) (
	*pb.StatVarGroups, error)

GetStatVarGroup implements API for Mixer.GetStatVarGroup.

func GetStatVarGroupNode

func GetStatVarGroupNode(
	ctx context.Context,
	in *pb.GetStatVarGroupNodeRequest,
	store *store.Store,
	cache *resource.Cache,
) (*pb.StatVarGroupNode, error)

GetStatVarGroupNode implements API for Mixer.GetStatVarGroupNode.

func GetStatVarMatch added in v1.34.0

func GetStatVarMatch(
	ctx context.Context,
	in *pb.GetStatVarMatchRequest,
	store *store.Store,
) (*pb.GetStatVarMatchResponse, error)

GetStatVarMatch implements API for Mixer.GetStatVarMatch.

func GetStatVarPath

func GetStatVarPath(
	ctx context.Context,
	in *pb.GetStatVarPathRequest,
	store *store.Store,
	cache *resource.Cache,
) (
	*pb.GetStatVarPathResponse, error)

GetStatVarPath implements API for Mixer.GetStatVarPath.

func GetStatVarSummaryHelper added in v1.34.0

func GetStatVarSummaryHelper(
	ctx context.Context, entities []string, store *store.Store) (
	map[string]*pb.StatVarSummary, error)

GetStatVarSummaryHelper is a wrapper to get stat var summary.

func SearchStatVar

func SearchStatVar(
	ctx context.Context,
	in *pb.SearchStatVarRequest,
	btGroup *bigtable.Group,
	cache *resource.Cache,
) (
	*pb.SearchStatVarResponse, error,
)

SearchStatVar implements API for Mixer.SearchStatVar.

Types

type TokenToMatches added in v1.33.0

type TokenToMatches map[string]map[string]struct{}

TokenToMatches is a map of token to a set of strings that match the token

Jump to

Keyboard shortcuts

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