helpers

package
v0.0.0-...-87f5de6 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clamp

func Clamp(v, min, max int64) int64

Clamp is a small helper that ensures that a given number v lies between bounds m, n. If it is outside of those bounds, it sets v to the closer of (m, n)

Types

type DateRange

type DateRange struct {
	From time.Time
	To   time.Time
}

DateRange is a simple struct representing a slice of time From a point To a point

type TimelineFilters

type TimelineFilters struct {
	UUID             string
	Text             []string
	Tags             []string
	Operator         string
	DateRange        *DateRange
	WithEvidenceUUID string
	Linked           *bool
}

TimelineFilters represents all of the parsed timeline configuraions

func ParseTimelineQuery

func ParseTimelineQuery(query string) (TimelineFilters, error)

ParseTimelineQuery parses a query a user may type into the search box on the timeline page into a TimelineFilters struct that the events/evidence services expect

Jump to

Keyboard shortcuts

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