common

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorFromDecodedResponse

func ErrorFromDecodedResponse[T any](method string, yield func() (any, error)) (*T, error)

func IntoNullable

func IntoNullable[T, U any, P interface {
	*T
	SetToNull()
	SetTo(u U)
}](v *U) T

generic-ish type cast helper function

func IntoOpt

func IntoOpt[T, U any, P interface {
	*T
	Reset()
	SetTo(u U)
}](v *U) T

generic-ish type cast helper function

Types

type Error

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

func NewAPIError

func NewAPIError(method string, code int, err error) *Error

func NewError

func NewError(msg string, err error) *Error

func (*Error) Error

func (e *Error) Error() string

func (*Error) Unwrap

func (e *Error) Unwrap() error

Jump to

Keyboard shortcuts

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