connectx

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler[T any](
	fn func(svc T, opts ...connect.HandlerOption) (string, http.Handler),
	svc T, opts ...connect.HandlerOption,
) (string, http.Handler)

func Response

func Response[T any](res *T, err error) (*connect.Response[T], error)

Types

type Mux

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

func NewMux

func NewMux(ib *i18nx.I18N, opts ...connect.HandlerOption) *Mux

NewMux builds a Connect mux that returns Connect errors by default.

func NewVProtoMux

func NewVProtoMux(ib *i18nx.I18N, opts ...connect.HandlerOption) *Mux

NewVProtoMux builds a Connect mux that returns VProto errors by default.

func (*Mux) Handle

func (h *Mux) Handle(fns ...func(opts ...connect.HandlerOption) (string, http.Handler)) *Mux

func (*Mux) ServeHTTP

func (h *Mux) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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