cmds

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestCmd = &cobra.Command{
	Use:   "test",
	Short: "Test commands for debugging Datadog CLI",
	Long:  "Collection of test commands to help debug authentication and API issues with the Datadog CLI",
}

TestCmd is the parent command for all test commands

Functions

This section is empty.

Types

type AuthTestCommand

type AuthTestCommand struct {
	*cmds.CommandDescription
}

AuthTestCommand tests authentication with Datadog API

func NewAuthTestCommand

func NewAuthTestCommand() (*AuthTestCommand, error)

func (*AuthTestCommand) RunIntoGlazeProcessor

func (c *AuthTestCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedLayers *layers.ParsedLayers,
	gp middlewares.Processor,
) error

type AuthTestSettings

type AuthTestSettings struct {
	Verbose bool `glazed.parameter:"verbose"`
}

AuthTestSettings holds parameters for the auth test command

type DatadogQueryCommand

type DatadogQueryCommand struct {
	*cmds.CommandDescription
	Query      string                 `yaml:"query"`
	Subqueries dd_types.QueryMetadata `yaml:"subqueries"`
}

DatadogQueryCommand implements a YAML-driven Datadog logs query command

func NewDatadogQueryCommand

func NewDatadogQueryCommand(description *cmds.CommandDescription, query string, subqueries dd_types.QueryMetadata) (*DatadogQueryCommand, error)

NewDatadogQueryCommand creates a new DatadogQueryCommand from a CommandDescription

func (*DatadogQueryCommand) RunIntoGlazeProcessor

func (d *DatadogQueryCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedLayers *layers.ParsedLayers,
	gp middlewares.Processor,
) error

RunIntoGlazeProcessor executes the Datadog query and streams results

type LogsV1TestCommand

type LogsV1TestCommand struct {
	*cmds.CommandDescription
}

LogsV1TestCommand tests Datadog Logs API v1

func NewLogsV1TestCommand

func NewLogsV1TestCommand() (*LogsV1TestCommand, error)

func (*LogsV1TestCommand) RunIntoGlazeProcessor

func (c *LogsV1TestCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedLayers *layers.ParsedLayers,
	gp middlewares.Processor,
) error

type LogsV1TestSettings

type LogsV1TestSettings struct {
	Query   string `glazed.parameter:"query"`
	Limit   int    `glazed.parameter:"limit"`
	Verbose bool   `glazed.parameter:"verbose"`
}

LogsV1TestSettings holds parameters for the logs v1 test command

type LogsV2TestCommand

type LogsV2TestCommand struct {
	*cmds.CommandDescription
}

LogsV2TestCommand tests Datadog Logs API v2

func NewLogsV2TestCommand

func NewLogsV2TestCommand() (*LogsV2TestCommand, error)

func (*LogsV2TestCommand) RunIntoGlazeProcessor

func (c *LogsV2TestCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedLayers *layers.ParsedLayers,
	gp middlewares.Processor,
) error

type LogsV2TestSettings

type LogsV2TestSettings struct {
	Query   string `glazed.parameter:"query"`
	Limit   int    `glazed.parameter:"limit"`
	Verbose bool   `glazed.parameter:"verbose"`
}

LogsV2TestSettings holds parameters for the logs v2 test command

type QueryCommand

type QueryCommand struct {
	*cmds.CommandDescription
}

QueryCommand executes raw Datadog search queries

func NewQueryCommand

func NewQueryCommand() (*QueryCommand, error)

NewQueryCommand creates a new command for executing raw Datadog queries

func (*QueryCommand) RunIntoGlazeProcessor

func (q *QueryCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedLayers *layers.ParsedLayers,
	gp middlewares.Processor,
) error

RunIntoGlazeProcessor executes the raw Datadog query

type QuerySettings

type QuerySettings struct {
	SearchQuery string `glazed.parameter:"search-query"`
	From        string `glazed.parameter:"from"`
	To          string `glazed.parameter:"to"`
	Limit       int    `glazed.parameter:"limit"`
	Sort        string `glazed.parameter:"sort"`
}

QuerySettings represents the settings for the query command

type RunCommand

type RunCommand struct {
	*cmds.CommandDescription
}

RunCommand allows running ad-hoc YAML query files

func NewRunCommand

func NewRunCommand() (*RunCommand, error)

NewRunCommand creates a new command for running YAML query files

func (*RunCommand) RunIntoGlazeProcessor

func (r *RunCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedLayers *layers.ParsedLayers,
	gp middlewares.Processor,
) error

RunIntoGlazeProcessor loads and executes a YAML query file

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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