bosun.org: bosun.org/annotate/backend Index | Files

package backend

import "bosun.org/annotate/backend"

Index

Package Files

backend.go elastic2.go elastic5.go elastic6.go elastic7.go

Constants

const Empty = "Empty"
const Is = "Is"

type Backend Uses

type Backend interface {
    InsertAnnotation(a *annotate.Annotation) error
    GetAnnotation(id string) (*annotate.Annotation, bool, error)
    GetAnnotations(start, end *time.Time, filters ...FieldFilter) (annotate.Annotations, error)
    DeleteAnnotation(id string) error
    GetFieldValues(field string) ([]string, error)
    InitBackend() error
}

type Elastic2 Uses

type Elastic2 struct {
    *elastic.Client
    // contains filtered or unexported fields
}

func NewElastic2 Uses

func NewElastic2(urls []string, simpleclient bool, index string, clientoptions []elastic.ClientOptionFunc) *Elastic2

func (*Elastic2) DeleteAnnotation Uses

func (e *Elastic2) DeleteAnnotation(id string) error

func (*Elastic2) GetAnnotation Uses

func (e *Elastic2) GetAnnotation(id string) (*annotate.Annotation, bool, error)

func (*Elastic2) GetAnnotations Uses

func (e *Elastic2) GetAnnotations(start, end *time.Time, fieldFilters ...FieldFilter) (annotate.Annotations, error)

func (*Elastic2) GetFieldValues Uses

func (e *Elastic2) GetFieldValues(field string) ([]string, error)

func (*Elastic2) InitBackend Uses

func (e *Elastic2) InitBackend() error

func (*Elastic2) InsertAnnotation Uses

func (e *Elastic2) InsertAnnotation(a *annotate.Annotation) error

type Elastic5 Uses

type Elastic5 struct {
    *elastic.Client
    // contains filtered or unexported fields
}

func NewElastic5 Uses

func NewElastic5(urls []string, simpleclient bool, index string, clientoptions []elastic.ClientOptionFunc) *Elastic5

func (*Elastic5) DeleteAnnotation Uses

func (e *Elastic5) DeleteAnnotation(id string) error

func (*Elastic5) GetAnnotation Uses

func (e *Elastic5) GetAnnotation(id string) (*annotate.Annotation, bool, error)

func (*Elastic5) GetAnnotations Uses

func (e *Elastic5) GetAnnotations(start, end *time.Time, fieldFilters ...FieldFilter) (annotate.Annotations, error)

func (*Elastic5) GetFieldValues Uses

func (e *Elastic5) GetFieldValues(field string) ([]string, error)

func (*Elastic5) InitBackend Uses

func (e *Elastic5) InitBackend() error

func (*Elastic5) InsertAnnotation Uses

func (e *Elastic5) InsertAnnotation(a *annotate.Annotation) error

type Elastic6 Uses

type Elastic6 struct {
    *elastic.Client
    // contains filtered or unexported fields
}

func NewElastic6 Uses

func NewElastic6(urls []string, simpleclient bool, index string, clientoptions []elastic.ClientOptionFunc) *Elastic6

func (*Elastic6) DeleteAnnotation Uses

func (e *Elastic6) DeleteAnnotation(id string) error

func (*Elastic6) GetAnnotation Uses

func (e *Elastic6) GetAnnotation(id string) (*annotate.Annotation, bool, error)

func (*Elastic6) GetAnnotations Uses

func (e *Elastic6) GetAnnotations(start, end *time.Time, fieldFilters ...FieldFilter) (annotate.Annotations, error)

func (*Elastic6) GetFieldValues Uses

func (e *Elastic6) GetFieldValues(field string) ([]string, error)

func (*Elastic6) InitBackend Uses

func (e *Elastic6) InitBackend() error

func (*Elastic6) InsertAnnotation Uses

func (e *Elastic6) InsertAnnotation(a *annotate.Annotation) error

type Elastic7 Uses

type Elastic7 struct {
    *elastic.Client
    // contains filtered or unexported fields
}

func NewElastic7 Uses

func NewElastic7(urls []string, simpleclient bool, index string, clientoptions []elastic.ClientOptionFunc) *Elastic7

func (*Elastic7) DeleteAnnotation Uses

func (e *Elastic7) DeleteAnnotation(id string) error

func (*Elastic7) GetAnnotation Uses

func (e *Elastic7) GetAnnotation(id string) (*annotate.Annotation, bool, error)

func (*Elastic7) GetAnnotations Uses

func (e *Elastic7) GetAnnotations(start, end *time.Time, fieldFilters ...FieldFilter) (annotate.Annotations, error)

func (*Elastic7) GetFieldValues Uses

func (e *Elastic7) GetFieldValues(field string) ([]string, error)

func (*Elastic7) InitBackend Uses

func (e *Elastic7) InitBackend() error

func (*Elastic7) InsertAnnotation Uses

func (e *Elastic7) InsertAnnotation(a *annotate.Annotation) error

type FieldFilter Uses

type FieldFilter struct {
    Field string
    Verb  string
    Not   bool
    Value string
}

Package backend imports 12 packages (graph) and is imported by 7 packages. Updated 2020-08-07. Refresh now. Tools for package owners.