ui

package
v5.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidBadgeResponseTimeConfig = errors.New("invalid response time badge configuration: expected parameter 'response-time' to have 5 ascending numerical values")
)

Functions

This section is empty.

Types

type Badge

type Badge struct {
	ResponseTime *ResponseTime `yaml:"response-time"`
}

type Config

type Config struct {
	// HideConditions whether to hide the condition results on the UI
	HideConditions bool `yaml:"hide-conditions"`

	// HideHostname whether to hide the hostname in the Result
	HideHostname bool `yaml:"hide-hostname"`

	// HideURL whether to ensure the URL is not displayed in the results. Useful if the URL contains a token.
	HideURL bool `yaml:"hide-url"`

	// DontResolveFailedConditions whether to resolve failed conditions in the Result for display in the UI
	DontResolveFailedConditions bool `yaml:"dont-resolve-failed-conditions"`

	// Badge is the configuration for the badges generated
	Badge *Badge `yaml:"badge"`
}

Config is the UI configuration for core.Endpoint

func GetDefaultConfig

func GetDefaultConfig() *Config

GetDefaultConfig retrieves the default UI configuration

func (*Config) ValidateAndSetDefaults

func (config *Config) ValidateAndSetDefaults() error

ValidateAndSetDefaults validates the UI configuration and sets the default values

type ResponseTime

type ResponseTime struct {
	Thresholds []int `yaml:"thresholds"`
}

Jump to

Keyboard shortcuts

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