backend

package
v0.0.0-...-e25bc3e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2021 License: MIT Imports: 12 Imported by: 5

Documentation

Index

Constants

View Source
const Empty = "Empty"
View Source
const Is = "Is"

Variables

This section is empty.

Functions

This section is empty.

Types

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL