Documentation
¶
Overview ¶
Package store is a library for querying datacommons backend storage.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface {
Query(ctx context.Context,
in *pb.QueryRequest, out *pb.QueryResponse) error
GetPropertyLabels(ctx context.Context,
in *pb.GetPropertyLabelsRequest, out *pb.GetPropertyLabelsResponse) error
GetPropertyValues(ctx context.Context,
in *pb.GetPropertyValuesRequest, out *pb.GetPropertyValuesResponse) error
GetTriples(ctx context.Context,
in *pb.GetTriplesRequest, out *pb.GetTriplesResponse) error
GetPopObs(ctx context.Context,
in *pb.GetPopObsRequest, out *pb.GetPopObsResponse) error
GetPlaceObs(ctx context.Context,
in *pb.GetPlaceObsRequest, out *pb.GetPlaceObsResponse) error
GetPopulations(ctx context.Context,
in *pb.GetPopulationsRequest, out *pb.GetPopulationsResponse) error
GetObservations(ctx context.Context,
in *pb.GetObservationsRequest, out *pb.GetObservationsResponse) error
GetPlacesIn(ctx context.Context,
in *pb.GetPlacesInRequest, out *pb.GetPlacesInResponse) error
GetPlaceKML(ctx context.Context,
in *pb.GetPlaceKMLRequest, out *pb.GetPlaceKMLResponse) error
}
Interface exposes the database access for mixer.
type Node ¶
type Node struct {
Dcid string `json:"dcid,omitempty"`
Name string `json:"name,omitempty"`
ProvID string `json:"provenanceId,omitempty"`
Value string `json:"value,omitempty"`
Types []string `json:"types,omitempty"`
}
Node represents a information about a node.
type PlacePopInfo ¶
type PlacePopInfo struct {
PlaceID string `json:"dcid,omitempty"`
PopulationID string `json:"population,omitempty"`
}
PlacePopInfo contains basic info for a place and a population.
type PopObs ¶
type PopObs struct {
PopulationID string `json:"dcid,omitempty"`
ObservationValue string `json:"observation,omitempty"`
}
PopObs represents a pair of population and observation node.
type PropLabelCache ¶
type PropLabelCache struct {
InLabels []string `json:"inLabels"`
OutLabels []string `json:"outLabels"`
}
PropLabelCache represents the json structure returned by the BT Prop cache
type PropValueCache ¶
type PropValueCache struct {
Nodes []Node `json:"entities,omitempty"`
}
PropValueCache represents the json structure returned by the BT PropVal cache
type Triple ¶
type Triple struct {
SubjectID string `json:"subjectId,omitempty"`
SubjectName string `json:"subjectName,omitempty"`
SubjectTypes []string `json:"subjectTypes,omitempty"`
Predicate string `json:"predicate,omitempty"`
ObjectID string `json:"objectId,omitempty"`
ObjectName string `json:"objectName,omitempty"`
ObjectValue string `json:"objectValue,omitempty"`
ObjectTypes string `json:"objectTypes,omitempty"`
}
Triple represents a triples entry in the BT triples cache.
type TriplesCache ¶
type TriplesCache struct {
Triples []Triple `json:"triples"`
}
TriplesCache represents the json structure returned by the BT triples cache
Click to show internal directories.
Click to hide internal directories.