queries

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: MIT Imports: 5 Imported by: 0 modules, 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

This section is empty.

Types

type GateWithStats

type GateWithStats struct {
	Gate  *traffictesting.Gate
	Stats traffictesting.GateStats
}

GateWithStats composes a Gate aggregate with its read-side statistics.

type GetGateHandler

type GetGateHandler struct {
	// contains filtered or unexported fields
}

GetGateHandler handles the GetGate query

func NewGetGateHandler

NewGetGateHandler creates a new GetGateHandler

func (*GetGateHandler) Handle

Handle executes the GetGate query

type GetGateQuery

type GetGateQuery struct {
	ID string
}

GetGateQuery represents a query to retrieve a single gate

type GetGlobalStatsHandler

type GetGlobalStatsHandler struct {
	// contains filtered or unexported fields
}

GetGlobalStatsHandler handles the global stats query

func NewGetGlobalStatsHandler

func NewGetGlobalStatsHandler(repo traffictesting.StatsRepository) *GetGlobalStatsHandler

NewGetGlobalStatsHandler creates a new GetGlobalStatsHandler

func (*GetGlobalStatsHandler) Handle

Handle executes the global stats query

type GetRequestHandler

type GetRequestHandler struct {
	// contains filtered or unexported fields
}

GetRequestHandler handles the GetRequest query

func NewGetRequestHandler

func NewGetRequestHandler(repo traffictesting.RequestRepository) *GetRequestHandler

NewGetRequestHandler creates a new GetRequestHandler

func (*GetRequestHandler) Handle

Handle executes the GetRequest query

type GetRequestQuery

type GetRequestQuery struct {
	ID     string
	GateID string
}

GetRequestQuery represents a query to retrieve a single request

type ListGatesHandler

type ListGatesHandler struct {
	// contains filtered or unexported fields
}

ListGatesHandler handles the ListGates query

func NewListGatesHandler

func NewListGatesHandler(repo traffictesting.GateRepository, statsRepo traffictesting.StatsRepository) *ListGatesHandler

NewListGatesHandler creates a new ListGatesHandler

func (*ListGatesHandler) Handle

Handle executes the ListGates query

type ListGatesQuery

type ListGatesQuery struct {
	// Pagination
	Limit  int
	Offset int

	// Filters (all optional, empty means no filter)
	Name      string // Substring match on name
	LiveURL   string // Substring match on live URL
	ShadowURL string // Substring match on shadow URL

	// Sorting (optional, defaults applied if empty)
	SortField string // Field to sort by: "id", "name", "live_url", "shadow_url", "created_at"
	SortOrder string // Sort direction: "asc", "desc"
}

ListGatesQuery represents a query to list gates with pagination, filters, and sorting

type ListRequestsHandler

type ListRequestsHandler struct {
	// contains filtered or unexported fields
}

ListRequestsHandler handles the ListRequests query

func NewListRequestsHandler

func NewListRequestsHandler(repo traffictesting.RequestRepository) *ListRequestsHandler

NewListRequestsHandler creates a new ListRequestsHandler

func (*ListRequestsHandler) Handle

Handle executes the ListRequests query

type ListRequestsQuery

type ListRequestsQuery struct {
	// Gate identification
	GateID string

	// Pagination
	Limit  int
	Offset int

	// Filters (all optional, empty/nil means no filter)
	Methods     []string   // HTTP methods to filter by (e.g., ["GET", "POST"])
	PathPattern string     // Path pattern with wildcards (e.g., "/api/users/*")
	FromDate    *time.Time // Filter requests created after this date
	ToDate      *time.Time // Filter requests created before this date
	HasDiff     *bool      // Filter by diff existence (true = has diff, false = no diff, nil = no filter)

	// Sorting (optional, defaults applied if empty)
	SortField string // Field to sort by: "created_at", "method", "path"
	SortOrder string // Sort direction: "asc", "desc"
}

ListRequestsQuery represents a query to list requests for a gate with pagination, filters, and sorting

Jump to

Keyboard shortcuts

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