Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DateRangeQuery ¶
type DateRangeQuery struct { Field string Gt string Gte string Lt string Lte string Format string To string From string TermFilter []TermQuery }
DateRangeQuery is the properties required for a date range query in the resource finder
type Finder ¶
Finder is the connection to elasticsearch
func NewFinder ¶
NewFinder creates a new elasticsearch finder. It doesn't currently allow for all possible elasticsearch settings, but only the ones we need.
func (*Finder) DoDateRangeQuery ¶
func (f *Finder) DoDateRangeQuery(index, rtype string, drqs ...*DateRangeQuery) ([]*Resource, error)
DoDateRangeQuery searches elasticsearch for a variable number of date range queries
type Resource ¶
type Resource struct { Account string CreatedBy string `json:"yale:created_by"` SupportDepartmentContact string `json:"SupportDepartmentContact"` ID string Name string `json:"name,omitempty"` Provider string Status string RenewedAt string `json:"yale:renewed_at,omitempty"` NotifiedAt string `json:"yale:notified_at,omitempty"` FQDN string `json:"yale:fqdn,omitempty"` Org string `json:"yale:org,omitempty"` }
Resource is the resource object returned from elasticsearch
type TermQuery ¶
TermQuery is the properties required for a term query in the resource finder
func NewTermQueryList ¶
NewTermQueryList generates a new list of term queries from a map of strings to strings it functions mostly as a helper to get from configuration to implementation.