Documentation
¶
Index ¶
- func CaptureError(err error)
- func CaptureErrorResult(errResult AnyResult)
- func CaptureErrorResultWithExtra(errResult AnyResult, extraKey string, extraValue any)
- func GetEnvAsBool(key string, defaultValue bool) bool
- func GetEnvAsInt(key string, defaultValue int) (int, error)
- func GetEnvOrDefault(key string, defaultValue string) string
- func LogAndPanic(err error, message string)
- func ParseBrokersEnv(brokersStr string) []string
- func StringPtr(s string) *string
- func TimePtr(t time.Time) *time.Time
- type AnyResult
- type CustomTime
- type ErrorDetails
- type LevelHandler
- type Result
- func (r Result[T]) AddErrorDetails(code string, message string) Result[T]
- func (r Result[T]) Error() error
- func (r Result[T]) ErrorCode() string
- func (r Result[T]) ErrorDetails() *ErrorDetails
- func (r Result[T]) ErrorMessage() string
- func (r Result[T]) ErrorMsg() string
- func (r Result[T]) Failure() bool
- func (r Result[T]) IsCapturable() bool
- func (r Result[T]) IsRetryable() bool
- func (r Result[T]) NonCapturable() Result[T]
- func (r Result[T]) NonRetryable() Result[T]
- func (r Result[T]) Success() bool
- func (r Result[T]) Value() T
- func (r Result[T]) ValueOrPanic() T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CaptureError ¶
func CaptureError(err error)
func CaptureErrorResult ¶
func CaptureErrorResult(errResult AnyResult)
func GetEnvAsBool ¶
func GetEnvOrDefault ¶
func LogAndPanic ¶
func ParseBrokersEnv ¶
Types ¶
type CustomTime ¶
func (CustomTime) MarshalJSON ¶
func (ct CustomTime) MarshalJSON() ([]byte, error)
func (CustomTime) String ¶
func (ct CustomTime) String() string
func (CustomTime) Time ¶
func (ct CustomTime) Time() time.Time
func (*CustomTime) UnmarshalJSON ¶
func (ct *CustomTime) UnmarshalJSON(b []byte) error
type ErrorDetails ¶
type LevelHandler ¶
type LevelHandler struct {
// contains filtered or unexported fields
}
LevelHandler wraps a slog.Handler and enforces a minimum log level, regardless of the underlying handler's level.
func NewLevelHandler ¶
func NewLevelHandler(level slog.Leveler, handler slog.Handler) *LevelHandler
type Result ¶
func FailedBoolResult ¶
func FailedResult ¶
func SuccessResult ¶
func ToFloat64Timestamp ¶
func (Result[T]) AddErrorDetails ¶
func (Result[T]) ErrorDetails ¶
func (r Result[T]) ErrorDetails() *ErrorDetails
func (Result[T]) ErrorMessage ¶
func (Result[T]) IsCapturable ¶
func (Result[T]) IsRetryable ¶
func (Result[T]) NonCapturable ¶
func (Result[T]) NonRetryable ¶
func (Result[T]) ValueOrPanic ¶
func (r Result[T]) ValueOrPanic() T
Click to show internal directories.
Click to hide internal directories.