Help us shape the future of Go! Take the 2026 Go Developer Survey

event

package
v2.17.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: BSD-3-Clause Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	// ID of the event.
	//
	// Required: true
	ID string `json:"id"`

	// Type of the event.
	//
	// Required: true
	Type string `json:"type"`

	// Severity level of the event.
	//
	// Required: true
	Severity string `json:"severity"`

	// Title of the event.
	//
	// Required: true
	Title string `json:"title"`

	// Description of the event.
	//
	// Required: false
	Description string `json:"description,omitempty"`

	// ResourceType is the type of the resource associated with the event.
	//
	// Required: false
	ResourceType *string `json:"resourceType,omitempty"`

	// ResourceID is the ID of the resource associated with the event.
	//
	// Required: false
	ResourceID *string `json:"resourceId,omitempty"`

	// ResourceName is the name of the resource associated with the event.
	//
	// Required: false
	ResourceName *string `json:"resourceName,omitempty"`

	// UserID is the ID of the user who triggered the event.
	//
	// Required: false
	UserID *string `json:"userId,omitempty"`

	// Username is the username of the user who triggered the event.
	//
	// Required: false
	Username *string `json:"username,omitempty"`

	// EnvironmentID is the ID of the environment associated with the event.
	//
	// Required: false
	EnvironmentID *string `json:"environmentId,omitempty"`

	// Metadata contains additional key-value data associated with the event.
	//
	// Required: false
	Metadata map[string]any `json:"metadata,omitempty"`

	// Timestamp is when the event occurred.
	//
	// Required: true
	Timestamp time.Time `json:"timestamp"`

	// CreatedAt is the date and time at which the event was created.
	//
	// Required: true
	CreatedAt time.Time `json:"createdAt"`

	// UpdatedAt is the date and time at which the event was last updated.
	//
	// Required: false
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`
}

Event represents an event in API responses.

type ListReponse

type ListReponse struct {
	// Events is a list of events.
	//
	// Required: true
	Events []Event `json:"events"`

	// Total number of events.
	//
	// Required: true
	Total int `json:"total"`

	// Page number of the current result set.
	//
	// Required: true
	Page int `json:"page"`

	// PageSize is the number of events per page.
	//
	// Required: true
	PageSize int `json:"pageSize"`

	// TotalPages is the total number of pages.
	//
	// Required: true
	TotalPages int `json:"totalPages"`

	// HasNext indicates if there is a next page.
	//
	// Required: true
	HasNext bool `json:"hasNext"`

	// HasPrevious indicates if there is a previous page.
	//
	// Required: true
	HasPrevious bool `json:"hasPrevious"`
}

type SeverityCounts added in v2.16.0

type SeverityCounts struct {
	Total   int64 `json:"total"`
	Info    int64 `json:"info"`
	Success int64 `json:"success"`
	Warning int64 `json:"warning"`
	Error   int64 `json:"error"`
}

SeverityCounts holds global event counts per severity.

type StreamEvent added in v2.11.0

type StreamEvent struct {
	// Type is "changed"; clients reload their current event query.
	Type string `json:"type"`
	// Timestamp is when the invalidation was emitted.
	Timestamp time.Time `json:"timestamp"`
}

StreamEvent invalidates event queries after persistence changes.

Jump to

Keyboard shortcuts

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