tailf_netconf_query

package
v0.0.0-...-50def94 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

This module introduces four new rpc operations to run advanced search queries.

The operation 'start-query' starts a query, with some search conditions and control parameters for how to return the results. This operation returns a query handle, to be used in subsequent operations.

The operation 'fetch-query-result' is repeatedly to get result chunks from the query evaluation.

The operation 'immediate-query' is used to start a new query, and return the entire result.

The operation 'reset-query' can be used to restart the query.

Finally 'stop-query' is used to clean up query resources on the server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FetchQueryResult

type FetchQueryResult struct {
	EntityData types.CommonEntityData
	YFilter    yfilter.YFilter

	Input FetchQueryResult_Input

	Output FetchQueryResult_Output
}

FetchQueryResult

func (*FetchQueryResult) GetEntityData

func (fetchQueryResult *FetchQueryResult) GetEntityData() *types.CommonEntityData

type FetchQueryResult_Input

type FetchQueryResult_Input struct {
	EntityData types.CommonEntityData
	YFilter    yfilter.YFilter

	// The type is interface{} with range: 0..4294967295.
	QueryHandle interface{}
}

FetchQueryResult_Input

func (*FetchQueryResult_Input) GetEntityData

func (input *FetchQueryResult_Input) GetEntityData() *types.CommonEntityData

type FetchQueryResult_Output

type FetchQueryResult_Output struct {
	EntityData types.CommonEntityData
	YFilter    yfilter.YFilter

	QueryResult FetchQueryResult_Output_QueryResult
}

FetchQueryResult_Output

func (*FetchQueryResult_Output) GetEntityData

func (output *FetchQueryResult_Output) GetEntityData() *types.CommonEntityData

type FetchQueryResult_Output_QueryResult

type FetchQueryResult_Output_QueryResult struct {
	EntityData types.CommonEntityData
	YFilter    yfilter.YFilter

	// There will be one result for each node in the node set produced by
	// evaluating the 'foreach' expression. The type is slice of
	// FetchQueryResult_Output_QueryResult_Result.
	Result []*FetchQueryResult_Output_QueryResult_Result
}

FetchQueryResult_Output_QueryResult

func (*FetchQueryResult_Output_QueryResult) GetEntityData

func (queryResult *FetchQueryResult_Output_QueryResult) GetEntityData() *types.CommonEntityData

type FetchQueryResult_Output_QueryResult_Result

type FetchQueryResult_Output_QueryResult_Result struct {
	EntityData types.CommonEntityData
	YFilter    yfilter.YFilter
	YListKey   string

	// The type is slice of FetchQueryResult_Output_QueryResult_Result_Select.
	Select []*FetchQueryResult_Output_QueryResult_Result_Select
}

FetchQueryResult_Output_QueryResult_Result There will be one result for each node in the node set produced by evaluating the 'foreach' expression.

func (*FetchQueryResult_Output_QueryResult_Result) GetEntityData

type FetchQueryResult_Output_QueryResult_Result_Select

type FetchQueryResult_Output_QueryResult_Result_Select struct {
	EntityData types.CommonEntityData
	YFilter    yfilter.YFilter
	YListKey   string

	// Present if the label was given in the input select entry. The type is
	// string.
	Label interface{}

	// The type is string.
	Path interface{}

	// The type is string.
	Value interface{}

	// A deep structure of XML (or other API dependent format, e.g., JSON). The
	// type is string.
	Data interface{}
}

FetchQueryResult_Output_QueryResult_Result_Select

func (*FetchQueryResult_Output_QueryResult_Result_Select) GetEntityData

type ImmediateQuery

type ImmediateQuery struct {
	EntityData types.CommonEntityData
	YFilter    yfilter.YFilter

	Input ImmediateQuery_Input

	Output ImmediateQuery_Output
}

ImmediateQuery

func (*ImmediateQuery) GetEntityData

func (immediateQuery *ImmediateQuery) GetEntityData() *types.CommonEntityData

type ImmediateQuery_Input

type ImmediateQuery_Input struct {
	EntityData types.CommonEntityData
	YFilter    yfilter.YFilter

	// An XPath 1.0 expression that returns a node set.  For each node in this
	// node set, a 'result' entry is constructed.  For each such node all
	// 'select/expression's are evaluated, and stored in 'result/select'.  The
	// resulting entries are returned from the 'fetch-query-result' function.
	// When this XPath expression is evaluated, the context node is the root node
	// of the requested data store. The type is string. This attribute is
	// mandatory.
	Foreach interface{}

	// It is possible to sort the result using an ordered list of XPath
	// expressions.  For each node in the node set returned by 'foreach', all
	// 'sort-by' expressions are evaluated, in order, with the node from the
	// 'foreach' evaluation as context node, and the result is stored in a tuple.
	// Thus, this tuple has as many elements as entries in the 'sort-by' leaf
	// list.  Each expression should return a node set where the first node should
	// be a leaf.  The value of this leaf is used in the tuple.  If the expression
	// returns something else, the value in the tuple is undefined.  When the
	// 'result' list is fetched, is is sorted according to the associated tuple.
	// The type is slice of string.
	SortBy []interface{}

	// The maximum number of 'result' entries to return in each call to
	// 'fetch-query-result'.  If this parameter is not given, all entries are
	// returned. The type is interface{} with range: 1..4294967295.
	Limit interface{}

	// The type is interface{} with range: 1..4294967295. The default value is 1.
	Offset interface{}

	// The maximum time (in seconds) before a query times out. Resets every new
	// request, i.e. subsequent function calls starts a new timeout timer. The
	// type is interface{} with range: 1..4294967295. The default value is 600.
	Timeout interface{}

	// A list of expressions that define what to return from each node in the node
	// set returned by the 'foreach' expression. The type is slice of
	// ImmediateQuery_Input_Select.
	Select []*ImmediateQuery_Input_Select
}

ImmediateQuery_Input

func (*ImmediateQuery_Input) GetEntityData

func (input *ImmediateQuery_Input) GetEntityData() *types.CommonEntityData

type ImmediateQuery_Input_Select

type ImmediateQuery_Input_Select struct {
	EntityData types.CommonEntityData
	YFilter    yfilter.YFilter
	YListKey   string

	// Optional label which is copied as is to the 'result' list; can be used for
	// easy labeling of the returned node(s). The type is string.
	Label interface{}

	// Declare what node(s) you want to retrieve.  This XPath expression is
	// evaluated once for every node in the node set returned by the 'foreach'
	// expression.  That node is the inital context node when this expression is
	// evaluated. The type is string. This attribute is mandatory.
	Expression interface{}

	// Controls how the result of the select expression is returned in
	// 'fetch-query-result'. The type is slice of ResultType.
	ResultType []interface{}
}

ImmediateQuery_Input_Select A list of expressions that define what to return from each node in the node set returned by the 'foreach' expression.

func (*ImmediateQuery_Input_Select) GetEntityData

func (self *ImmediateQuery_Input_Select) GetEntityData() *types.CommonEntityData

type ImmediateQuery_Input_Select_ResultType

type ImmediateQuery_Input_Select_ResultType string

ImmediateQuery_Input_Select_ResultType represents in 'fetch-query-result'.

const (
	// Return the result of evaluating the expression as if it
	// was surrounded by a call to the xpath function string().
	ImmediateQuery_Input_Select_ResultType_string_ ImmediateQuery_Input_Select_ResultType = "string"

	// If the result is a node set, return the path to the
	// first node in the node set as an instance-identifier.
	//
	// If the result is not a node set, nothing is returned
	// for this expression.
	ImmediateQuery_Input_Select_ResultType_path ImmediateQuery_Input_Select_ResultType = "path"

	// If the result is a node set, return the value of the
	// first node in the node set, if the first node is a leaf.
	// Otherwise, nothing is returned for this expression.
	ImmediateQuery_Input_Select_ResultType_leaf_value ImmediateQuery_Input_Select_ResultType = "leaf-value"

	// The result is returned inline, i.e., a deep structure
	// of XML (or other API dependent format, e.g., JSON)
	ImmediateQuery_Input_Select_ResultType_inline ImmediateQuery_Input_Select_ResultType = "inline"
)

type ImmediateQuery_Output

type ImmediateQuery_Output struct {
	EntityData types.CommonEntityData
	YFilter    yfilter.YFilter

	QueryResult ImmediateQuery_Output_QueryResult
}

ImmediateQuery_Output

func (*ImmediateQuery_Output) GetEntityData

func (output *ImmediateQuery_Output) GetEntityData() *types.CommonEntityData

type ImmediateQuery_Output_QueryResult

type ImmediateQuery_Output_QueryResult struct {
	EntityData types.CommonEntityData
	YFilter    yfilter.YFilter

	// There will be one result for each node in the node set produced by
	// evaluating the 'foreach' expression. The type is slice of
	// ImmediateQuery_Output_QueryResult_Result.
	Result []*ImmediateQuery_Output_QueryResult_Result
}

ImmediateQuery_Output_QueryResult

func (*ImmediateQuery_Output_QueryResult) GetEntityData

func (queryResult *ImmediateQuery_Output_QueryResult) GetEntityData() *types.CommonEntityData

type ImmediateQuery_Output_QueryResult_Result

type ImmediateQuery_Output_QueryResult_Result struct {
	EntityData types.CommonEntityData
	YFilter    yfilter.YFilter
	YListKey   string

	// The type is slice of ImmediateQuery_Output_QueryResult_Result_Select.
	Select []*ImmediateQuery_Output_QueryResult_Result_Select
}

ImmediateQuery_Output_QueryResult_Result There will be one result for each node in the node set produced by evaluating the 'foreach' expression.

func (*ImmediateQuery_Output_QueryResult_Result) GetEntityData

type ImmediateQuery_Output_QueryResult_Result_Select

type ImmediateQuery_Output_QueryResult_Result_Select struct {
	EntityData types.CommonEntityData
	YFilter    yfilter.YFilter
	YListKey   string

	// Present if the label was given in the input select entry. The type is
	// string.
	Label interface{}

	// The type is string.
	Path interface{}

	// The type is string.
	Value interface{}

	// A deep structure of XML (or other API dependent format, e.g., JSON). The
	// type is string.
	Data interface{}
}

ImmediateQuery_Output_QueryResult_Result_Select

func (*ImmediateQuery_Output_QueryResult_Result_Select) GetEntityData

type ResetQuery

type ResetQuery struct {
	EntityData types.CommonEntityData
	YFilter    yfilter.YFilter

	Input ResetQuery_Input
}

ResetQuery

func (*ResetQuery) GetEntityData

func (resetQuery *ResetQuery) GetEntityData() *types.CommonEntityData

type ResetQuery_Input

type ResetQuery_Input struct {
	EntityData types.CommonEntityData
	YFilter    yfilter.YFilter

	// The type is interface{} with range: 0..4294967295.
	QueryHandle interface{}

	// The type is interface{} with range: 1..4294967295. The default value is 1.
	Offset interface{}

	// The maximum time (in seconds) before a query times out. Resets every new
	// request, i.e. subsequent function calls starts a new timeout timer. The
	// type is interface{} with range: 1..4294967295. The default value is 600.
	Timeout interface{}
}

ResetQuery_Input

func (*ResetQuery_Input) GetEntityData

func (input *ResetQuery_Input) GetEntityData() *types.CommonEntityData

type StartQuery

type StartQuery struct {
	EntityData types.CommonEntityData
	YFilter    yfilter.YFilter

	Input StartQuery_Input

	Output StartQuery_Output
}

StartQuery

func (*StartQuery) GetEntityData

func (startQuery *StartQuery) GetEntityData() *types.CommonEntityData

type StartQuery_Input

type StartQuery_Input struct {
	EntityData types.CommonEntityData
	YFilter    yfilter.YFilter

	// An XPath 1.0 expression that returns a node set.  For each node in this
	// node set, a 'result' entry is constructed.  For each such node all
	// 'select/expression's are evaluated, and stored in 'result/select'.  The
	// resulting entries are returned from the 'fetch-query-result' function.
	// When this XPath expression is evaluated, the context node is the root node
	// of the requested data store. The type is string. This attribute is
	// mandatory.
	Foreach interface{}

	// It is possible to sort the result using an ordered list of XPath
	// expressions.  For each node in the node set returned by 'foreach', all
	// 'sort-by' expressions are evaluated, in order, with the node from the
	// 'foreach' evaluation as context node, and the result is stored in a tuple.
	// Thus, this tuple has as many elements as entries in the 'sort-by' leaf
	// list.  Each expression should return a node set where the first node should
	// be a leaf.  The value of this leaf is used in the tuple.  If the expression
	// returns something else, the value in the tuple is undefined.  When the
	// 'result' list is fetched, is is sorted according to the associated tuple.
	// The type is slice of string.
	SortBy []interface{}

	// The maximum number of 'result' entries to return in each call to
	// 'fetch-query-result'.  If this parameter is not given, all entries are
	// returned. The type is interface{} with range: 1..4294967295.
	Limit interface{}

	// The type is interface{} with range: 1..4294967295. The default value is 1.
	Offset interface{}

	// The maximum time (in seconds) before a query times out. Resets every new
	// request, i.e. subsequent function calls starts a new timeout timer. The
	// type is interface{} with range: 1..4294967295. The default value is 600.
	Timeout interface{}

	// A list of expressions that define what to return from each node in the node
	// set returned by the 'foreach' expression. The type is slice of
	// StartQuery_Input_Select.
	Select []*StartQuery_Input_Select
}

StartQuery_Input

func (*StartQuery_Input) GetEntityData

func (input *StartQuery_Input) GetEntityData() *types.CommonEntityData

type StartQuery_Input_Select

type StartQuery_Input_Select struct {
	EntityData types.CommonEntityData
	YFilter    yfilter.YFilter
	YListKey   string

	// Optional label which is copied as is to the 'result' list; can be used for
	// easy labeling of the returned node(s). The type is string.
	Label interface{}

	// Declare what node(s) you want to retrieve.  This XPath expression is
	// evaluated once for every node in the node set returned by the 'foreach'
	// expression.  That node is the inital context node when this expression is
	// evaluated. The type is string. This attribute is mandatory.
	Expression interface{}

	// Controls how the result of the select expression is returned in
	// 'fetch-query-result'. The type is slice of ResultType.
	ResultType []interface{}
}

StartQuery_Input_Select A list of expressions that define what to return from each node in the node set returned by the 'foreach' expression.

func (*StartQuery_Input_Select) GetEntityData

func (self *StartQuery_Input_Select) GetEntityData() *types.CommonEntityData

type StartQuery_Input_Select_ResultType

type StartQuery_Input_Select_ResultType string

StartQuery_Input_Select_ResultType represents in 'fetch-query-result'.

const (
	// Return the result of evaluating the expression as if it
	// was surrounded by a call to the xpath function string().
	StartQuery_Input_Select_ResultType_string_ StartQuery_Input_Select_ResultType = "string"

	// If the result is a node set, return the path to the
	// first node in the node set as an instance-identifier.
	//
	// If the result is not a node set, nothing is returned
	// for this expression.
	StartQuery_Input_Select_ResultType_path StartQuery_Input_Select_ResultType = "path"

	// If the result is a node set, return the value of the
	// first node in the node set, if the first node is a leaf.
	// Otherwise, nothing is returned for this expression.
	StartQuery_Input_Select_ResultType_leaf_value StartQuery_Input_Select_ResultType = "leaf-value"

	// The result is returned inline, i.e., a deep structure
	// of XML (or other API dependent format, e.g., JSON)
	StartQuery_Input_Select_ResultType_inline StartQuery_Input_Select_ResultType = "inline"
)

type StartQuery_Output

type StartQuery_Output struct {
	EntityData types.CommonEntityData
	YFilter    yfilter.YFilter

	// The type is interface{} with range: 0..4294967295.
	QueryHandle interface{}
}

StartQuery_Output

func (*StartQuery_Output) GetEntityData

func (output *StartQuery_Output) GetEntityData() *types.CommonEntityData

type StopQuery

type StopQuery struct {
	EntityData types.CommonEntityData
	YFilter    yfilter.YFilter

	Input StopQuery_Input
}

StopQuery

func (*StopQuery) GetEntityData

func (stopQuery *StopQuery) GetEntityData() *types.CommonEntityData

type StopQuery_Input

type StopQuery_Input struct {
	EntityData types.CommonEntityData
	YFilter    yfilter.YFilter

	// The type is interface{} with range: 0..4294967295.
	QueryHandle interface{}
}

StopQuery_Input

func (*StopQuery_Input) GetEntityData

func (input *StopQuery_Input) GetEntityData() *types.CommonEntityData

Jump to

Keyboard shortcuts

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