query

package
v1.0.233 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: Apache-2.0 Imports: 16 Imported by: 23

Documentation

Index

Constants

View Source
const DefaultDepth = 5

Variables

View Source
var DefaultQueryTimeout = 30 * time.Second

Functions

func ArtifactsByCheck added in v1.0.225

func ArtifactsByCheck(ctx context.Context, checkID uuid.UUID, checkTime time.Time) ([]models.Artifact, error)

func ArtifactsByPlaybookRun added in v1.0.225

func ArtifactsByPlaybookRun(ctx context.Context, runID uuid.UUID) ([]models.Artifact, error)

func CheckSummary

func CheckSummary(ctx context.Context, opts ...CheckSummaryOptions) ([]models.CheckSummary, error)

func CheckSummaryByID

func CheckSummaryByID(ctx context.Context, checkID string) (*models.CheckSummary, error)

func Config

func Config(ctx context.Context, sqlQuery string) ([]map[string]any, error)

Query executes a SQL query against the "config_" tables in the database.

func GetComponent

func GetComponent(ctx context.Context, id string) (*models.Component, error)

func RefreshCheckStatusSummary

func RefreshCheckStatusSummary(ctx context.Poolable) error

func RefreshCheckStatusSummaryAged added in v1.0.227

func RefreshCheckStatusSummaryAged(ctx context.Poolable) error

Types

type CheckSummaryOptions

type CheckSummaryOptions struct {
	Timeout    time.Duration
	CheckID    *uuid.UUID
	SortBy     CheckSummarySortBy
	DeleteFrom *time.Time

	// Labels apply to both the canary and check labels
	Labels map[string]string
}

func OrderByName

func OrderByName() CheckSummaryOptions

type CheckSummarySortBy

type CheckSummarySortBy string
var CheckSummarySortByName CheckSummarySortBy = "name"

type Tags

type Tags map[string][]string

Map of tag keys to the list of available values

type TopologyOptions

type TopologyOptions struct {
	ID      string
	Owner   string
	Labels  map[string]string
	AgentID string
	Flatten bool
	Depth   int
	// TODO: Filter status and types in DB Query
	Types  []string
	Status []string
	// contains filtered or unexported fields
}

func (TopologyOptions) String

func (opt TopologyOptions) String() string

type TopologyResponse

type TopologyResponse struct {
	Components     models.Components `json:"components"`
	HealthStatuses []string          `json:"healthStatuses"`
	Teams          []string          `json:"teams"`
	Tags           Tags              `json:"tags"`
	Types          []string          `json:"types"`
}

func Topology

func Topology(ctx context.Context, params TopologyOptions) (*TopologyResponse, error)

Jump to

Keyboard shortcuts

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