errdefs

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrBadCredentials   = "bad-credentials"
	ErrNoSuchSSID       = "no-such-ssid"
	ErrAssocTimeout     = "assoc-timeout"
	ErrDhcpTimeout      = "dhcp-timeout"
	ErrUserCanceled     = "user-canceled"
	ErrWifiDisabled     = "wifi-disabled"
	ErrAlreadyConnected = "already-connected"
	ErrConnectionFailed = "connection-failed"
)

Variables

View Source
var (
	ErrUpdateCancelled       = NewCustomError(ErrTypeUpdateCancelled, "update cancelled by user")
	ErrNoUpdateNeeded        = NewCustomError(ErrTypeNoUpdateNeeded, "no update needed")
	ErrInvalidTemperature    = NewCustomError(ErrTypeInvalidTemperature, "temperature must be between 1000 and 10000")
	ErrInvalidGamma          = NewCustomError(ErrTypeInvalidGamma, "gamma must be between 0 and 10")
	ErrInvalidLocation       = NewCustomError(ErrTypeInvalidLocation, "invalid latitude/longitude")
	ErrInvalidManualTimes    = NewCustomError(ErrTypeInvalidManualTimes, "both sunrise and sunset must be set or neither")
	ErrNoWaylandDisplay      = NewCustomError(ErrTypeNoWaylandDisplay, "no wayland display available")
	ErrNoGammaControl        = NewCustomError(ErrTypeNoGammaControl, "compositor does not support gamma control")
	ErrNotInitialized        = NewCustomError(ErrTypeNotInitialized, "manager not initialized")
	ErrSecretPromptCancelled = NewCustomError(ErrTypeSecretPromptCancelled, "secret prompt cancelled by user")
	ErrSecretPromptTimeout   = NewCustomError(ErrTypeSecretPromptTimeout, "secret prompt timed out")
	ErrSecretAgentFailed     = NewCustomError(ErrTypeSecretAgentFailed, "secret agent operation failed")
)

Functions

func NewCustomError

func NewCustomError(errType ErrorType, message string) error

Types

type CustomError

type CustomError struct {
	Type    ErrorType
	Message string
}

func (*CustomError) Error

func (e *CustomError) Error() string

type ErrorType

type ErrorType int
const (
	ErrTypeNotLinux ErrorType = iota
	ErrTypeInvalidArchitecture
	ErrTypeUnsupportedDistribution
	ErrTypeUnsupportedVersion
	ErrTypeUpdateCancelled
	ErrTypeNoUpdateNeeded
	ErrTypeInvalidTemperature
	ErrTypeInvalidGamma
	ErrTypeInvalidLocation
	ErrTypeInvalidManualTimes
	ErrTypeNoWaylandDisplay
	ErrTypeNoGammaControl
	ErrTypeNotInitialized
	ErrTypeSecretPromptCancelled
	ErrTypeSecretPromptTimeout
	ErrTypeSecretAgentFailed
	ErrTypeGeneric
)

Jump to

Keyboard shortcuts

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