logfilter

package
v0.0.0-...-1c5d739 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: Apache-2.0 Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// MAPPING is the elastic mapping for a log filter
	MAPPING, _ = elastic.NewMapping(mappingString)
)

Functions

func GetType

func GetType() string

GetType return the LogFilter's type It returns the type as a string

func Key

func Key(name, version string) datastore.Key

Key creates a Key suitable for getting, putting and deleting LogFilters

Types

type LogFilter

type LogFilter struct {
	Name    string // Name of the filter
	Version string // Version of the parent service
	Filter  string // the filter string
	datastore.VersionedEntity
}

LogFilter is the definition of a log filter

func (*LogFilter) Equals

func (a *LogFilter) Equals(b *LogFilter) bool

Equals checks the equality of two log filters

func (*LogFilter) GetID

func (lf *LogFilter) GetID() string

GetID return a LogFilter instance's ID It returns the ID as a string

func (*LogFilter) GetType

func (lf *LogFilter) GetType() string

GetType returns the LogFilter instance's type It returns the type as a string

func (LogFilter) String

func (lf LogFilter) String() string

func (*LogFilter) ValidEntity

func (lf *LogFilter) ValidEntity() error

ValidEntity validates LogFilter fields

type Store

type Store interface {
	// Get a LogFilter by name and version. Return ErrNoSuchEntity if not found
	Get(ctx datastore.Context, name, version string) (*LogFilter, error)

	// Put adds or updates a LogFilter
	Put(ctx datastore.Context, lf *LogFilter) error

	// Delete removes the a LogFilter if it exists
	Delete(ctx datastore.Context, name, version string) error

	// GetLogFilters returns all LogFilters
	GetLogFilters(ctx datastore.Context) ([]*LogFilter, error)
}

Store is the database for the LogFilters

func NewStore

func NewStore() Store

NewStore creates a Store for LogFilters

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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