Documentation
¶
Index ¶
- func GetIndexKey(indexParts types.Oid) string
- type Client
- func (c Client) Close() error
- func (c Client) Connect() (err error)
- func (c *Client) Debug(debug bool)
- func (c Client) Get(node models.ScalarNode, format ...models.Format) (val models.Value, err error)
- func (c Client) GetAll(q Query) (results map[string]models.Value, err error)
- func (c Client) GetIndex(node models.ColumnNode, index types.Oid, format ...models.Format) (val models.Value, err error)
- func (c *Client) SetCommunity(community string)
- func (c *Client) SetReusePort(reusePort bool)
- func (c *Client) SetSecurity(username, authPassword, privPassword string) error
- func (c *Client) SetTarget(target string) error
- func (c *Client) SetTimeout(d time.Duration)
- func (c Client) Table(table Table, index ...interface{}) (results map[string]Row, err error)
- type Column
- type Query
- func (q *Query) Column(node models.ColumnNode, index types.Oid, format ...models.Format)
- func (q *Query) NamedColumn(name string, node models.ColumnNode, index types.Oid, format ...models.Format)
- func (q *Query) NamedScalar(name string, node models.ScalarNode, format ...models.Format)
- func (q *Query) Scalar(node models.ScalarNode, format ...models.Format)
- type QueryItem
- type Row
- type Table
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetIndexKey ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a snmpquery client
func (Client) GetIndex ¶
func (c Client) GetIndex(node models.ColumnNode, index types.Oid, format ...models.Format) (val models.Value, err error)
Get is used to get the given column node with the given index formatted with the given format
func (*Client) SetCommunity ¶
func (*Client) SetReusePort ¶
func (*Client) SetSecurity ¶
func (*Client) SetTimeout ¶
type Column ¶
type Column struct { Name string Node models.ColumnNode Format models.Format }
Column represents a table column
func (Column) FormatValue ¶
type Query ¶
Query contains the items to query
func (*Query) NamedColumn ¶
func (q *Query) NamedColumn(name string, node models.ColumnNode, index types.Oid, format ...models.Format)
NamedColumn is a helper method to add an explicitly named column to the query
func (*Query) NamedScalar ¶
NamedScalar is a helper method to add an explicitly named scalar to the query
type QueryItem ¶
type QueryItem struct { Format models.ValueFormatter Name string Oid types.Oid }
QueryItem contains the information for a single query item
Click to show internal directories.
Click to hide internal directories.