db_utils

package
v1.263.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LastXHours string = "^last \\d+ hour(s)?$"
	LastDay    string = "^last day$"
	LastXDays  string = "^last \\d+ day(s)?$"
	LastMonth  string = "^last month$"
	Yesterday  string = "^yesterday$"
)

Special query cases

Variables

This section is empty.

Functions

func AbsoluteDateStringQuery

func AbsoluteDateStringQuery(absolute string) string

func ValidateDateFilters added in v1.251.0

func ValidateDateFilters(params any, dateFiltersToValidate ...string) error

Types

type PageParams added in v1.251.0

type PageParams struct {
	Limit  int64 `json:"limit,omitempty"`  // Limit number of items returned in list (default: 0 (no limit))
	Offset int64 `json:"offset,omitempty"` // Offset in list (default: 0 (no offset))
}

func (*PageParams) EnforceLimit added in v1.251.0

func (params *PageParams) EnforceLimit()

func (*PageParams) Validate added in v1.251.0

func (params *PageParams) Validate() error

Jump to

Keyboard shortcuts

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