Documentation
¶
Overview ¶
Package update handles requests to modify the graph.
Note: this package currently only handles Insert, but lots of things are called Update so that they can be generalized to handle Delete and combined Delete+Insert requests later.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Insert ¶
func Insert(ctx context.Context, req *api.InsertRequest, recentIdx blog.Index, store Store, aLog ALog, ) (*api.InsertResult, error)
Insert handles an api.InsertRequest. recentIdx is a recent log index used to read the supporting data in the initial attempt; if recentIdx is too stale, Insert will waste some effort.
func ResolveExternalIDs ¶
func ResolveExternalIDs(ctx context.Context, store lookups.PO, index blog.Index, externalIDs []string, ) (map[string]uint64, error)
ResolveExternalIDs looks up a KID for each given external ID. It executes all the lookups at the given index. It returns an error if unable to complete the lookups. Otherwise, every string in 'externalIDs' becomes as a key in the returned map; the value is a corresponding KID if found or 0 otherwise.
This is public because it might be useful elsewhere. TODO: Perhaps it should move into viewclient.