Documentation
¶
Index ¶
- func IsValidationError(err error) bool
- func New(log *slog.Logger, core provider, domain string, opts ...connect.HandlerOption) *http.ServeMux
- func NewLoggingInterceptor(log *slog.Logger) connect.Option
- func NewValidationError(format string, args ...any) error
- func RequestIDFrom(ctx context.Context) string
- func WithRequestID(ctx context.Context, id string) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidationError ¶ added in v0.3.2
IsValidationError reports whether err — or anything in its wrap chain — originated from NewValidationError.
func New ¶
func New( log *slog.Logger, core provider, domain string, opts ...connect.HandlerOption, ) *http.ServeMux
New creates and returns gRPC server.
func NewLoggingInterceptor ¶ added in v0.3.2
NewLoggingInterceptor returns a connect.Option that wraps unary handlers with structured request/response logging at debug level.
func NewValidationError ¶ added in v0.3.2
NewValidationError formats and returns a validation error. Use this anywhere the client sent input we cannot accept; the connect-go handler will surface it as CodeInvalidArgument (HTTP 400) with the formatted message as detail.
func RequestIDFrom ¶ added in v0.3.2
RequestIDFrom extracts the request ID from context, returning empty string if absent.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.