Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetGraphResponse ¶
type GetGraphsResponse ¶
type GetGraphsResponse struct {
Graphs map[string]GetGraphResponse `json:"graphs,omitempty"`
}
type GetRequest ¶
type GetSetResponse ¶
type GetSetsResponse ¶
type GetSetsResponse struct {
Sets map[string]GetSetResponse `json:"sets,omitempty"`
}
type IGraphProvider ¶
type IGraphProvider interface { GetSet(ctx context.Context, request GetRequest) (GetSetResponse, error) GetTree(ctx context.Context, request GetRequest) (GetSetResponse, error) GetGraph(ctx context.Context, request GetRequest) (GetGraphResponse, error) GetChain(ctx context.Context, request GetRequest) (GetSetResponse, error) GetSets(ctx context.Context, request ListRequest) (GetSetsResponse, error) GetTrees(ctx context.Context, request ListRequest) (GetSetsResponse, error) GetChains(ctx context.Context, request ListRequest) (GetSetsResponse, error) GetGraphs(ctx context.Context, request ListRequest) (GetGraphsResponse, error) IsPure() bool SetData(data []v1alpha2.INode) error }
/ IGraphProvider is the interface that provides a graph query interface that is able to return: / * a set of nodes (of a given parent), or all sets of nodes (GetSet, GetSets) / * a tree of nodes (of a given root), or all trees of nodes (GetTree, GetTrees) / * a graph of nodes and edges (of a given collection of edges and nodes), or all graphs of nodes and edges (GetGraph, GetGraphs) / * a chain of nodes (of a given root), or all chains of nodes (GetChain, GetChains) / If a graph provider is pure (for instnace, backed by a graph database engine), it means that it does not need to be initialized with a set of nodes, / and can return a graph of nodes and edges without any input. / Otherwise, it needs to be initialized with a set of nodes, and can return a graph of nodes and edges only if the input contains a set of nodes. / At this point, the behavior of Filter hasn't been clearly defined. It is used to filter the nodes returned by the graph provider, but it is not clear / what happens if filter breaks tree/chain/graph relationships.
type ListRequest ¶
type ListRequest struct {
Filter string `json:"filter,omitempty"`
}