Back to godoc.org
bosun.org / annotate / backend

Package backend

v0.0.0-...-8a7cd2d
Latest Go to latest

The latest major version is .

Published: Jun 18, 2020 | License: MIT | Module: bosun.org

Index

Constants

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

type Backend

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

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

func NewElastic2

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

func (*Elastic2) DeleteAnnotation

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

func (*Elastic2) GetAnnotation

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

func (*Elastic2) GetAnnotations

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

func (*Elastic2) GetFieldValues

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

func (*Elastic2) InitBackend

func (e *Elastic2) InitBackend() error

func (*Elastic2) InsertAnnotation

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

type Elastic5

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

func NewElastic5

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

func (*Elastic5) DeleteAnnotation

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

func (*Elastic5) GetAnnotation

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

func (*Elastic5) GetAnnotations

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

func (*Elastic5) GetFieldValues

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

func (*Elastic5) InitBackend

func (e *Elastic5) InitBackend() error

func (*Elastic5) InsertAnnotation

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

type Elastic6

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

func NewElastic6

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

func (*Elastic6) DeleteAnnotation

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

func (*Elastic6) GetAnnotation

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

func (*Elastic6) GetAnnotations

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

func (*Elastic6) GetFieldValues

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

func (*Elastic6) InitBackend

func (e *Elastic6) InitBackend() error

func (*Elastic6) InsertAnnotation

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

type Elastic7

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

func NewElastic7

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

func (*Elastic7) DeleteAnnotation

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

func (*Elastic7) GetAnnotation

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

func (*Elastic7) GetAnnotations

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

func (*Elastic7) GetFieldValues

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

func (*Elastic7) InitBackend

func (e *Elastic7) InitBackend() error

func (*Elastic7) InsertAnnotation

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

type FieldFilter

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

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier