api

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildRunsPageMetadata added in v0.46.0

func BuildRunsPageMetadata(r *http.Request) (rules.PageMetadata, error)

func LoggingMiddleware

func LoggingMiddleware(svc rules.Service, logger log.Logger) rules.Service

LoggingMiddleware adds logging facilities to the core service.

func MetricsMiddleware

func MetricsMiddleware(svc rules.Service, counter metrics.Counter, latency metrics.Histogram) rules.Service

MetricsMiddleware instruments core service by tracking request count and latency.

func ValidatePageMetadata added in v0.41.1

func ValidatePageMetadata(pm rules.PageMetadata, maxLimitSize, maxNameSize int, orderFields map[string]string) error

ValidatePageMetadata validates the page metadata against the given set of allowed order fields.

Types

type RunRes added in v0.46.0

type RunRes struct {
	ID         string                   `json:"id"`
	RuleID     string                   `json:"rule_id"`
	ThingID    string                   `json:"thing_id"`
	StartedAt  time.Time                `json:"started_at"`
	FinishedAt time.Time                `json:"finished_at"`
	Status     string                   `json:"status"`
	Error      string                   `json:"error,omitempty"`
	Conditions []rules.RuleRunCondition `json:"conditions,omitempty"`
	Actions    []rules.RuleRunAction    `json:"actions,omitempty"`
}

func ToRunRes added in v0.46.0

func ToRunRes(run rules.RuleRun) RunRes

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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