server

package
v1.38.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: Apache-2.0 Imports: 48 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCache added in v1.20.2

func NewCache(ctx context.Context, store *store.Store, searchOptions SearchOptions,
) (*resource.Cache, error)

NewCache initializes the cache for stat var hierarchy.

func NewMetadata

func NewMetadata(
	bqDataset, storeProject, branchInstance, schemaPath string) (*resource.Metadata, error)

NewMetadata initialize the metadata for translator.

func ReadBranchTableName added in v1.14.0

func ReadBranchTableName(
	ctx context.Context, bucket, versionFile string) (string, error)

ReadBranchTableName reads branch cache folder from GCS.

Types

type SearchOptions added in v1.35.2

type SearchOptions struct {
	UseSearch           bool
	BuildSvgSearchIndex bool
	BuildSqliteIndex    bool
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server holds resources for a mixer server

func NewMixerServer added in v1.33.0

func NewMixerServer(
	store *store.Store,
	metadata *resource.Metadata,
	cache *resource.Cache,
) *Server

NewMixerServer creates a new mixer server instance.

func NewReconServer added in v1.33.0

func NewReconServer(store *store.Store) *Server

NewReconServer creates a new recon server instance.

func (*Server) BioPage added in v1.38.0

func (s *Server) BioPage(
	ctx context.Context, in *pb.BioPageRequest,
) (*pb.GraphNodes, error)

BioPage implements API for mixer.BioPage.

func (*Server) BulkLinkedPropertyValues added in v1.35.2

func (s *Server) BulkLinkedPropertyValues(
	ctx context.Context, in *pb.BulkLinkedPropertyValuesRequest,
) (*pb.BulkPropertyValuesResponse, error)

BulkLinkedPropertyValues implements API for mixer.BulkLinkedPropertyValues.

func (*Server) BulkObservationsPoint added in v1.35.0

func (s *Server) BulkObservationsPoint(
	ctx context.Context, in *pb.BulkObservationsPointRequest,
) (*pb.BulkObservationsPointResponse, error)

BulkObservationsPoint implements API for mixer.BulkObservationsPoint.

func (*Server) BulkObservationsPointLinked added in v1.35.0

func (s *Server) BulkObservationsPointLinked(
	ctx context.Context, in *pb.BulkObservationsPointLinkedRequest,
) (*pb.BulkObservationsPointResponse, error)

BulkObservationsPointLinked implements API for mixer.BulkObservationsPointLinked.

func (*Server) BulkObservationsSeries added in v1.35.0

func (s *Server) BulkObservationsSeries(
	ctx context.Context, in *pb.BulkObservationsSeriesRequest,
) (*pb.BulkObservationsSeriesResponse, error)

BulkObservationsSeries implements API for mixer.BulkObservationsSeries.

func (*Server) BulkObservationsSeriesLinked added in v1.35.2

func (s *Server) BulkObservationsSeriesLinked(
	ctx context.Context, in *pb.BulkObservationsSeriesLinkedRequest,
) (*pb.BulkObservationsSeriesResponse, error)

BulkObservationsSeriesLinked implements API for mixer.BulkObservationsSeriesLinked.

func (*Server) BulkPlaceInfo added in v1.34.0

func (s *Server) BulkPlaceInfo(
	ctx context.Context, in *pb.BulkPlaceInfoRequest,
) (*pb.BulkPlaceInfoResponse, error)

BulkPlaceInfo implements API for mixer.BulkPlaceInfo.

func (*Server) BulkProperties added in v1.34.0

func (s *Server) BulkProperties(
	ctx context.Context, in *pb.BulkPropertiesRequest,
) (*pb.BulkPropertiesResponse, error)

BulkProperties implements API for mixer.BulkProperties.

func (*Server) BulkPropertyValues added in v1.35.2

func (s *Server) BulkPropertyValues(
	ctx context.Context, in *pb.BulkPropertyValuesRequest,
) (*pb.BulkPropertyValuesResponse, error)

BulkPropertyValues implements API for mixer.BulkPropertyValues.

func (*Server) BulkTriples added in v1.35.2

func (s *Server) BulkTriples(
	ctx context.Context, in *pb.BulkTriplesRequest,
) (*pb.BulkTriplesResponse, error)

BulkTriples implements API for mixer.BulkTriples.

func (*Server) BulkVariableInfo added in v1.34.0

func (s *Server) BulkVariableInfo(
	ctx context.Context, in *pb.BulkVariableInfoRequest,
) (*pb.BulkVariableInfoResponse, error)

BulkVariableInfo implements API for mixer.BulkVariableInfo.

func (*Server) BulkVariables added in v1.34.0

func (s *Server) BulkVariables(
	ctx context.Context, in *pb.BulkVariablesRequest,
) (*pb.BulkVariablesResponse, error)

BulkVariables implements API for mixer.BulkVariables.

func (*Server) CompareEntities added in v1.33.0

func (s *Server) CompareEntities(
	ctx context.Context, in *pb.CompareEntitiesRequest,
) (
	*pb.CompareEntitiesResponse, error)

CompareEntities implements API for Recon.CompareEntities.

func (*Server) GetBioPageData added in v1.22.0

func (s *Server) GetBioPageData(
	ctx context.Context, in *pb.GetBioPageDataRequest,
) (*pb.GraphNodes, error)

GetBioPageData implements API for Mixer.GetBioPageData.

func (*Server) GetLocationsRankings

func (s *Server) GetLocationsRankings(
	ctx context.Context, in *pb.GetLocationsRankingsRequest,
) (*pb.GetLocationsRankingsResponse, error)

GetLocationsRankings implements API for Mixer.GetLocationsRankings.

func (*Server) GetPlaceMetadata added in v1.30.0

func (s *Server) GetPlaceMetadata(
	ctx context.Context, in *pb.GetPlaceMetadataRequest,
) (*pb.GetPlaceMetadataResponse, error)

GetPlaceMetadata implements API for Mixer.GetPlaceMetadata.

func (*Server) GetPlacePageData added in v1.22.0

func (s *Server) GetPlacePageData(
	ctx context.Context, in *pb.GetPlacePageDataRequest,
) (*pb.GetPlacePageDataResponse, error)

GetPlacePageData implements API for Mixer.GetPlacePageData.

TODO(shifucun):For each related place, it is supposed to have dcid, name and population but it's not complete now as the client in most cases only requires the dcid. Should consider have the full name, even with parent place abbreviations like "CA" filled in here so the client won't bother to fetch those again.

func (*Server) GetPlaceStatDateWithinPlace

GetPlaceStatDateWithinPlace implements API for Mixer.GetPlaceStatDateWithinPlace. Endpoint: /place/stat/date/within-place

func (*Server) GetPlaceStatVars

func (s *Server) GetPlaceStatVars(
	ctx context.Context, in *pb.GetPlaceStatVarsRequest,
) (*pb.GetPlaceStatVarsResponse, error)

GetPlaceStatVars implements API for Mixer.GetPlaceStatVars.

func (*Server) GetPlaceStatVarsUnionV1 added in v1.20.3

func (s *Server) GetPlaceStatVarsUnionV1(
	ctx context.Context, in *pb.GetPlaceStatVarsUnionRequest,
) (*pb.GetPlaceStatVarsUnionResponse, error)

GetPlaceStatVarsUnionV1 implements API for Mixer.GetPlaceStatVarsUnionV1.

func (*Server) GetPlaceStatsVar

func (s *Server) GetPlaceStatsVar(
	ctx context.Context, in *pb.GetPlaceStatsVarRequest,
) (*pb.GetPlaceStatsVarResponse, error)

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

func (*Server) GetPlacesIn

func (s *Server) GetPlacesIn(ctx context.Context, in *pb.GetPlacesInRequest,
) (*pb.GetPlacesInResponse, error)

GetPlacesIn implements API for Mixer.GetPlacesIn.

func (*Server) GetPropertyLabels

func (s *Server) GetPropertyLabels(
	ctx context.Context, in *pb.GetPropertyLabelsRequest,
) (*pb.PayloadResponse, error)

GetPropertyLabels implements API for Mixer.GetPropertyLabels.

func (*Server) GetPropertyValues

func (s *Server) GetPropertyValues(
	ctx context.Context, in *pb.GetPropertyValuesRequest,
) (*pb.PayloadResponse, error)

GetPropertyValues implements API for Mixer.GetPropertyValues.

func (*Server) GetRelatedLocations

func (s *Server) GetRelatedLocations(
	ctx context.Context, in *pb.GetRelatedLocationsRequest,
) (*pb.GetRelatedLocationsResponse, error)

GetRelatedLocations implements API for Mixer.GetRelatedLocations.

func (*Server) GetStatAll

func (s *Server) GetStatAll(ctx context.Context, in *pb.GetStatAllRequest,
) (*pb.GetStatAllResponse, error)

GetStatAll implements API for Mixer.GetStatAll. Endpoint: /stat/set/series/all Endpoint: /stat/all

func (*Server) GetStatDateWithinPlace added in v1.34.0

func (s *Server) GetStatDateWithinPlace(
	ctx context.Context, in *pb.GetStatDateWithinPlaceRequest,
) (*pb.GetStatDateWithinPlaceResponse, error)

GetStatDateWithinPlace implements API for Mixer.GetStatDateWithinPlace. Endpoint: /v1/stat/date/within-place

func (*Server) GetStatSeries

func (s *Server) GetStatSeries(ctx context.Context, in *pb.GetStatSeriesRequest) (
	*pb.GetStatSeriesResponse, error,
)

GetStatSeries implements API for Mixer.GetStatSeries. Endpoint: /stat/series TODO(shifucun): consilidate and dedup the logic among these similar APIs.

func (*Server) GetStatSet

func (s *Server) GetStatSet(ctx context.Context, in *pb.GetStatSetRequest) (
	*pb.GetStatSetResponse, error,
)

GetStatSet implements API for Mixer.GetStatSet. Endpoint: /stat/set

func (*Server) GetStatSetSeries added in v1.14.0

func (s *Server) GetStatSetSeries(
	ctx context.Context, in *pb.GetStatSetSeriesRequest,
) (*pb.GetStatSetSeriesResponse, error)

GetStatSetSeries implements API for Mixer.GetStatSetSeries. Endpoint: /v1/stat/set/series

func (*Server) GetStatSetSeriesWithinPlace added in v1.26.0

func (s *Server) GetStatSetSeriesWithinPlace(
	ctx context.Context, in *pb.GetStatSetSeriesWithinPlaceRequest,
) (*pb.GetStatSetSeriesResponse, error)

GetStatSetSeriesWithinPlace implements API for Mixer.GetStatSetSeriesWithinPlace. Endpoint: /v1/stat/set/series/within-place

func (*Server) GetStatSetWithinPlace added in v1.19.1

func (s *Server) GetStatSetWithinPlace(
	ctx context.Context, in *pb.GetStatSetWithinPlaceRequest,
) (*pb.GetStatSetResponse, error)

GetStatSetWithinPlace implements API for Mixer.GetStatSetWithinPlace. Endpoint: /stat/set/within-place

func (*Server) GetStatSetWithinPlaceAll added in v1.29.0

func (s *Server) GetStatSetWithinPlaceAll(
	ctx context.Context, in *pb.GetStatSetWithinPlaceRequest,
) (*pb.GetStatSetAllResponse, error)

GetStatSetWithinPlaceAll implements API for Mixer.GetStatSetWithinPlaceAll. Endpoint: /stat/set/within-place/all

func (*Server) GetStatValue

func (s *Server) GetStatValue(ctx context.Context, in *pb.GetStatValueRequest) (
	*pb.GetStatValueResponse, error,
)

GetStatValue implements API for Mixer.GetStatValue. Endpoint: /stat (/stat/value)

func (*Server) GetStatVarGroup added in v1.18.0

func (s *Server) GetStatVarGroup(
	ctx context.Context, in *pb.GetStatVarGroupRequest,
) (*pb.StatVarGroups, error)

GetStatVarGroup implements API for Mixer.GetStatVarGroup.

func (*Server) GetStatVarGroupNode added in v1.21.0

func (s *Server) GetStatVarGroupNode(
	ctx context.Context, in *pb.GetStatVarGroupNodeRequest,
) (*pb.StatVarGroupNode, error)

GetStatVarGroupNode implements API for Mixer.GetStatVarGroupNode.

func (*Server) GetStatVarMatch added in v1.34.0

func (s *Server) GetStatVarMatch(
	ctx context.Context, in *pb.GetStatVarMatchRequest,
) (*pb.GetStatVarMatchResponse, error)

GetStatVarMatch implements API for Mixer.GetStatVarMatch.

func (*Server) GetStatVarPath added in v1.21.0

func (s *Server) GetStatVarPath(
	ctx context.Context, in *pb.GetStatVarPathRequest,
) (*pb.GetStatVarPathResponse, error)

GetStatVarPath implements API for Mixer.GetStatVarPath.

func (*Server) GetStatVarSummary added in v1.21.0

func (s *Server) GetStatVarSummary(
	ctx context.Context, in *pb.GetStatVarSummaryRequest,
) (*pb.GetStatVarSummaryResponse, error)

GetStatVarSummary implements API for Mixer.GetStatVarSummary.

func (*Server) GetStats

func (s *Server) GetStats(ctx context.Context, in *pb.GetStatsRequest,
) (*pb.GetStatsResponse, error)

GetStats implements API for Mixer.GetStats. Endpoint: /stat/set/series Endpoint: /bulk/stats

func (*Server) GetTriples

func (s *Server) GetTriples(ctx context.Context, in *pb.GetTriplesRequest,
) (*pb.PayloadResponse, error)

GetTriples implements API for Mixer.GetTriples.

func (*Server) GetVersion added in v1.18.0

func (s *Server) GetVersion(
	ctx context.Context, in *pb.GetVersionRequest,
) (*pb.GetVersionResponse, error)

GetVersion implements API for Mixer.GetVersion.

func (*Server) LinkedPropertyValues added in v1.35.2

func (s *Server) LinkedPropertyValues(
	ctx context.Context, in *pb.LinkedPropertyValuesRequest,
) (*pb.PropertyValuesResponse, error)

LinkedPropertyValues implements API for mixer.LinkedPropertyValues.

func (*Server) ObservationsPoint added in v1.34.0

func (s *Server) ObservationsPoint(
	ctx context.Context, in *pb.ObservationsPointRequest,
) (*pb.PointStat, error)

ObservationsPoint implements API for mixer.ObservationsPoint.

func (*Server) ObservationsSeries added in v1.35.0

func (s *Server) ObservationsSeries(
	ctx context.Context, in *pb.ObservationsSeriesRequest,
) (*pb.ObservationsSeriesResponse, error)

ObservationsSeries implements API for mixer.ObservationsSeries.

func (*Server) PlaceInfo added in v1.34.0

func (s *Server) PlaceInfo(
	ctx context.Context, in *pb.PlaceInfoRequest,
) (*pb.PlaceInfoResponse, error)

PlaceInfo implements API for mixer.PlaceInfo.

func (*Server) PlacePage added in v1.34.0

func (s *Server) PlacePage(
	ctx context.Context, in *pb.PlacePageRequest,
) (*pb.GetPlacePageDataResponse, error)

PlacePage implements API for mixer.PlacePage.

func (*Server) Properties added in v1.34.0

func (s *Server) Properties(
	ctx context.Context, in *pb.PropertiesRequest,
) (*pb.PropertiesResponse, error)

Properties implements API for mixer.Properties.

func (*Server) PropertyValues added in v1.35.2

func (s *Server) PropertyValues(
	ctx context.Context, in *pb.PropertyValuesRequest,
) (*pb.PropertyValuesResponse, error)

PropertyValues implements API for mixer.PropertyValues.

func (*Server) Query

func (s *Server) Query(ctx context.Context, in *pb.QueryRequest) (
	*pb.QueryResponse, error,
)

Query implements API for Mixer.Query.

func (*Server) ResolveCoordinates added in v1.33.0

func (s *Server) ResolveCoordinates(
	ctx context.Context, in *pb.ResolveCoordinatesRequest,
) (*pb.ResolveCoordinatesResponse, error)

ResolveCoordinates implements API for ReconServer.ResolveCoordinates.

func (*Server) ResolveEntities added in v1.33.0

func (s *Server) ResolveEntities(
	ctx context.Context, in *pb.ResolveEntitiesRequest,
) (*pb.ResolveEntitiesResponse, error)

ResolveEntities implements API for ReconServer.ResolveEntities.

func (*Server) ResolveIds added in v1.33.0

func (s *Server) ResolveIds(
	ctx context.Context, in *pb.ResolveIdsRequest,
) (*pb.ResolveIdsResponse, error)

ResolveIds implements API for Recon.ResolveIds.

func (*Server) Search

func (s *Server) Search(
	ctx context.Context, in *pb.SearchRequest,
) (*pb.SearchResponse, error)

Search implements API for Mixer.Search.

func (*Server) SearchStatVar added in v1.21.0

func (s *Server) SearchStatVar(
	ctx context.Context, in *pb.SearchStatVarRequest,
) (*pb.SearchStatVarResponse, error)

SearchStatVar implements API for Mixer.SearchStatVar.

func (*Server) SubscribeBranchCacheUpdate

func (s *Server) SubscribeBranchCacheUpdate(ctx context.Context,
	pubsubProject, subscriberPrefix, pubsubTopic string,
) error

SubscribeBranchCacheUpdate subscribe for branch cache update.

func (*Server) Translate

func (s *Server) Translate(ctx context.Context, in *pb.TranslateRequest) (
	*pb.TranslateResponse, error,
)

Translate implements API for Mixer.Translate.

func (*Server) Triples added in v1.35.2

func (s *Server) Triples(
	ctx context.Context, in *pb.TriplesRequest,
) (*pb.TriplesResponse, error)

Triples implements API for mixer.Triples.

func (*Server) VariableAncestors added in v1.35.2

func (s *Server) VariableAncestors(
	ctx context.Context, in *pb.VariableAncestorsRequest,
) (*pb.VariableAncestorsResponse, error)

VariableAncestors implements API for Mixer.VariableAncestors.

func (*Server) VariableGroupInfo added in v1.38.0

func (s *Server) VariableGroupInfo(
	ctx context.Context, in *pb.VariableGroupInfoRequest,
) (*pb.StatVarGroupNode, error)

VariableGroupInfo implements API for mixer.VariableGroupInfo.

func (*Server) VariableGroups added in v1.35.2

func (s *Server) VariableGroups(
	ctx context.Context, in *pb.VariableGroupsRequest,
) (*pb.VariableGroupsResponse, error)

VariableGroups implements API for Mixer.VariableGroups.

func (*Server) VariableInfo added in v1.34.0

func (s *Server) VariableInfo(
	ctx context.Context, in *pb.VariableInfoRequest,
) (*pb.VariableInfoResponse, error)

VariableInfo implements API for mixer.VariableInfo.

func (*Server) Variables added in v1.34.0

func (s *Server) Variables(
	ctx context.Context, in *pb.VariablesRequest,
) (*pb.VariablesResponse, error)

Variables implements API for mixer.Variables.

Jump to

Keyboard shortcuts

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