Documentation
¶
Index ¶
- func NewInfoFinder(elastic *Elastic) db.InfoFinder
- type Elastic
- func (es *Elastic) AddAlert(alerts ...*cap.Alert) error
- func (es *Elastic) AlertExists(reference *cap.Reference) (bool, error)
- func (es *Elastic) GetAlert(reference *cap.Reference) (*cap.Alert, error)
- func (es *Elastic) GetAlertById(id string) (*cap.Alert, error)
- func (es *Elastic) NewInfoFinder() db.InfoFinder
- func (es *Elastic) Setup() error
- type GeoShapeQuery
- func (q *GeoShapeQuery) QueryName(queryName string) *GeoShapeQuery
- func (q *GeoShapeQuery) SetPoint(lat, lon float64) *GeoShapeQuery
- func (q *GeoShapeQuery) SetPolygon(points [][][]float64) *GeoShapeQuery
- func (q *GeoShapeQuery) SetRelation(rel string) *GeoShapeQuery
- func (q *GeoShapeQuery) Source() (interface{}, error)
- type InfoFinder
- func (f *InfoFinder) AlertId(id string) db.InfoFinder
- func (f *InfoFinder) Area(area string) db.InfoFinder
- func (f *InfoFinder) Certainty(certainty cap.Certainty) db.InfoFinder
- func (f *InfoFinder) Count(count int) db.InfoFinder
- func (f *InfoFinder) Description(description string) db.InfoFinder
- func (f *InfoFinder) EffectiveGt(t time.Time) db.InfoFinder
- func (f *InfoFinder) EffectiveGte(t time.Time) db.InfoFinder
- func (f *InfoFinder) EffectiveLt(t time.Time) db.InfoFinder
- func (f *InfoFinder) EffectiveLte(t time.Time) db.InfoFinder
- func (f *InfoFinder) ExpiresGt(t time.Time) db.InfoFinder
- func (f *InfoFinder) ExpiresGte(t time.Time) db.InfoFinder
- func (f *InfoFinder) ExpiresLt(t time.Time) db.InfoFinder
- func (f *InfoFinder) ExpiresLte(t time.Time) db.InfoFinder
- func (f *InfoFinder) Find() (*db.InfoResults, error)
- func (f *InfoFinder) Headline(headline string) db.InfoFinder
- func (f *InfoFinder) Instruction(instruction string) db.InfoFinder
- func (f *InfoFinder) Language(language string) db.InfoFinder
- func (f *InfoFinder) MessageType(messageType cap.MessageType) db.InfoFinder
- func (f *InfoFinder) OnsetGt(t time.Time) db.InfoFinder
- func (f *InfoFinder) OnsetGte(t time.Time) db.InfoFinder
- func (f *InfoFinder) OnsetLt(t time.Time) db.InfoFinder
- func (f *InfoFinder) OnsetLte(t time.Time) db.InfoFinder
- func (f *InfoFinder) Point(lat, lon float64) db.InfoFinder
- func (f *InfoFinder) Scope(scope cap.Scope) db.InfoFinder
- func (f *InfoFinder) Severity(severity cap.Severity) db.InfoFinder
- func (f *InfoFinder) Sort(fields ...string) db.InfoFinder
- func (f *InfoFinder) Start(start int) db.InfoFinder
- func (f *InfoFinder) Status(status cap.Status) db.InfoFinder
- func (f *InfoFinder) Superseded(superseded bool) db.InfoFinder
- func (f *InfoFinder) Urgency(urgency cap.Urgency) db.InfoFinder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInfoFinder ¶
func NewInfoFinder(elastic *Elastic) db.InfoFinder
Types ¶
type Elastic ¶
type Elastic struct {
// contains filtered or unexported fields
}
func (*Elastic) AlertExists ¶
func (*Elastic) NewInfoFinder ¶
func (es *Elastic) NewInfoFinder() db.InfoFinder
type GeoShapeQuery ¶
type GeoShapeQuery struct {
// contains filtered or unexported fields
}
GeoShapeQuery allows to include hits that match a geoshape
For more details, see: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-shape-query.html
func NewGeoShapeQuery ¶
func NewGeoShapeQuery(name string) *GeoShapeQuery
NewGeoShapeQuery creates and initializes a new GeoShapeQuery.
func (*GeoShapeQuery) QueryName ¶
func (q *GeoShapeQuery) QueryName(queryName string) *GeoShapeQuery
func (*GeoShapeQuery) SetPoint ¶
func (q *GeoShapeQuery) SetPoint(lat, lon float64) *GeoShapeQuery
SetPoint adds a point from latitude and longitude.
func (*GeoShapeQuery) SetPolygon ¶
func (q *GeoShapeQuery) SetPolygon(points [][][]float64) *GeoShapeQuery
SetPolygon adds a polygon from a list of latitude and longitude.
func (*GeoShapeQuery) SetRelation ¶
func (q *GeoShapeQuery) SetRelation(rel string) *GeoShapeQuery
SetRelation sets the geoJSON relation for the query
func (*GeoShapeQuery) Source ¶
func (q *GeoShapeQuery) Source() (interface{}, error)
Source returns JSON for the function score query.
type InfoFinder ¶
type InfoFinder struct {
// contains filtered or unexported fields
}
func (*InfoFinder) Area ¶
func (f *InfoFinder) Area(area string) db.InfoFinder
func (*InfoFinder) Certainty ¶
func (f *InfoFinder) Certainty(certainty cap.Certainty) db.InfoFinder
func (*InfoFinder) Count ¶
func (f *InfoFinder) Count(count int) db.InfoFinder
func (*InfoFinder) Description ¶
func (f *InfoFinder) Description(description string) db.InfoFinder
func (*InfoFinder) EffectiveGt ¶
func (f *InfoFinder) EffectiveGt(t time.Time) db.InfoFinder
func (*InfoFinder) EffectiveGte ¶
func (f *InfoFinder) EffectiveGte(t time.Time) db.InfoFinder
func (*InfoFinder) EffectiveLt ¶
func (f *InfoFinder) EffectiveLt(t time.Time) db.InfoFinder
func (*InfoFinder) EffectiveLte ¶
func (f *InfoFinder) EffectiveLte(t time.Time) db.InfoFinder
func (*InfoFinder) ExpiresGt ¶
func (f *InfoFinder) ExpiresGt(t time.Time) db.InfoFinder
func (*InfoFinder) ExpiresGte ¶
func (f *InfoFinder) ExpiresGte(t time.Time) db.InfoFinder
func (*InfoFinder) ExpiresLt ¶
func (f *InfoFinder) ExpiresLt(t time.Time) db.InfoFinder
func (*InfoFinder) ExpiresLte ¶
func (f *InfoFinder) ExpiresLte(t time.Time) db.InfoFinder
func (*InfoFinder) Headline ¶
func (f *InfoFinder) Headline(headline string) db.InfoFinder
func (*InfoFinder) Instruction ¶
func (f *InfoFinder) Instruction(instruction string) db.InfoFinder
func (*InfoFinder) Language ¶
func (f *InfoFinder) Language(language string) db.InfoFinder
func (*InfoFinder) MessageType ¶
func (f *InfoFinder) MessageType(messageType cap.MessageType) db.InfoFinder
func (*InfoFinder) OnsetGt ¶
func (f *InfoFinder) OnsetGt(t time.Time) db.InfoFinder
func (*InfoFinder) OnsetGte ¶
func (f *InfoFinder) OnsetGte(t time.Time) db.InfoFinder
func (*InfoFinder) OnsetLt ¶
func (f *InfoFinder) OnsetLt(t time.Time) db.InfoFinder
func (*InfoFinder) OnsetLte ¶
func (f *InfoFinder) OnsetLte(t time.Time) db.InfoFinder
func (*InfoFinder) Point ¶
func (f *InfoFinder) Point(lat, lon float64) db.InfoFinder
func (*InfoFinder) Scope ¶
func (f *InfoFinder) Scope(scope cap.Scope) db.InfoFinder
func (*InfoFinder) Severity ¶
func (f *InfoFinder) Severity(severity cap.Severity) db.InfoFinder
func (*InfoFinder) Status ¶
func (f *InfoFinder) Status(status cap.Status) db.InfoFinder
func (*InfoFinder) Superseded ¶
func (f *InfoFinder) Superseded(superseded bool) db.InfoFinder
func (*InfoFinder) Urgency ¶
func (f *InfoFinder) Urgency(urgency cap.Urgency) db.InfoFinder
Click to show internal directories.
Click to hide internal directories.