Versions in this module Expand all Collapse all v1 v1.0.0 Nov 16, 2024 v0 v0.1.31 Dec 2, 2024 v0.1.30 Nov 16, 2024 v0.1.29 Oct 23, 2024 v0.1.28 Sep 30, 2024 Changes in this version type API + func (a API) TestClient() *Client type Nullable + func (m *Nullable[T]) UnmarshalJSON(bs []byte) error + func (m Nullable[T]) MarshalJSON() ([]byte, error) v0.1.27 Sep 10, 2024 Changes in this version + const SpecFile + var LogError = func(err error) + func SchemaPath(r *http.Request) (string, bool) + func SpecFileHandler() http.Handler + type API struct + GetPetHandler GetPetHandlerFunc + Middlewares []func(h http.Handler) http.Handler + NotFoundHandler http.Handler + SpecFileHandler http.Handler + func (rt *API) ServeHTTP(rw http.ResponseWriter, r *http.Request) + type Client struct + BaseURL string + HTTPClient HTTPClient + func NewClient(baseURL string, httpClient HTTPClient) *Client + func (c *Client) GetPet(ctx context.Context, request GetPetParams) (GetPetResponse, error) + type ErrParseParam struct + Err error + In string + Parameter string + Reason string + func (e ErrParseParam) Error() string + func (e ErrParseParam) Unwrap() error + type GetPetHandlerFunc func(ctx context.Context, r GetPetRequest) GetPetResponse + func (f GetPetHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request) + type GetPetParams struct + func (r GetPetParams) HTTP() *http.Request + func (r GetPetParams) Parse() GetPetParams + type GetPetRequest interface + HTTP func() *http.Request + Parse func() GetPetParams + func GetPetHTTPRequest(r *http.Request) GetPetRequest + type GetPetResponse interface + func NewGetPetResponse200JSON(body Pet) GetPetResponse + type GetPetResponse200JSON struct + Body Pet + func (r GetPetResponse200JSON) Write(w http.ResponseWriter) + type HTTPClient interface + Do func(*http.Request) (*http.Response, error) + type HTTPClientFunc func(*http.Request) (*http.Response, error) + func (f HTTPClientFunc) Do(r *http.Request) (*http.Response, error) + type Maybe struct + IsSet bool + Value T + func Just[T any](v T) Maybe[T] + func Nothing[T any]() Maybe[T] + func (m *Maybe[T]) Set(v T) + func (m Maybe[T]) Get() (zero T, _ bool) + type Nullable struct + IsSet bool + Value T + func Null[T any]() Nullable[T] + func Pointer[T any](v T) Nullable[T] + func (m *Nullable[T]) Set(v T) + func (m Nullable[T]) Get() (zero T, _ bool) + type Pet struct + CreatedAt Maybe[Nullable[time.Time]] + ID int64 + Name string + func (c *Pet) UnmarshalJSON(bs []byte) error + func (c Pet) MarshalJSON() ([]byte, error)