Documentation
¶
Index ¶
- func HttpHandlerInOut[In, Out any](m Marshaller[Out], u Unmarshaller[In], ...) http.Handler
- func HttpHandlerOut[Out any](m Marshaller[Out], handler func(r *http.Request) (int, Out)) http.Handler
- func JsonHandlerInOut[In, Out any](handler func(r *http.Request, in In) (int, Out)) http.Handler
- func JsonHandlerOut[Out any](handler func(r *http.Request) (int, Out)) http.Handler
- func MarshallJson[Type any](value Type) ([]byte, error)
- func MarshallString(value string) ([]byte, error)
- func NewClient(server *httptest.Server) *http.Client
- func StringHandlerInOut(handler func(r *http.Request, in string) (int, string)) http.Handler
- func StringHandlerOut(handler func(r *http.Request) (int, string)) http.Handler
- func UnmarshallJson[Type any](data []byte) (Type, error)
- func UnmarshallString(data []byte) (string, error)
- type Marshaller
- type MarshallerFunc
- type Unmarshaller
- type UnmarshallerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HttpHandlerInOut ¶
func HttpHandlerInOut[In, Out any](m Marshaller[Out], u Unmarshaller[In], handler func(r *http.Request, in In) (int, Out)) http.Handler
func HttpHandlerOut ¶
func JsonHandlerInOut ¶
func JsonHandlerOut ¶
func MarshallJson ¶
func MarshallString ¶
func StringHandlerInOut ¶
func StringHandlerOut ¶
func UnmarshallJson ¶
func UnmarshallString ¶
Types ¶
type Marshaller ¶
type MarshallerFunc ¶
func (MarshallerFunc[Type]) Marshall ¶
func (f MarshallerFunc[Type]) Marshall(v Type) ([]byte, error)
type Unmarshaller ¶
type UnmarshallerFunc ¶
func (UnmarshallerFunc[Type]) Unmarshal ¶
func (f UnmarshallerFunc[Type]) Unmarshal(data []byte) (Type, error)
Click to show internal directories.
Click to hide internal directories.