test

package
v0.1.26 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const SpecFile string = `` /* 638-byte string literal not displayed */

Variables

View Source
var LogError = func(err error) {
	log.Println(fmt.Sprintf("Error: %v", err))
}

Functions

func SchemaPath

func SchemaPath(r *http.Request) (string, bool)

func SpecFileHandler

func SpecFileHandler() http.Handler

Types

type API

type API struct {
	PostShopsShopStringShopSchemaPetsHandler PostShopsShopStringShopSchemaPetsHandlerFunc

	// not found
	NotFoundHandler http.Handler
	// spec file
	SpecFileHandler http.Handler

	Middlewares []func(h http.Handler) http.Handler
}

func (*API) ServeHTTP

func (rt *API) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type Client

type Client struct {
	BaseURL    string
	HTTPClient HTTPClient
}

func NewClient

func NewClient(baseURL string, httpClient HTTPClient) *Client

func (*Client) PostShopsShopStringShopSchemaPets

PostShopsShopStringShopSchemaPets POST /shops/{shop_string}/{shop_schema}/pets

type ErrParseParam

type ErrParseParam struct {
	In        string
	Parameter string
	Reason    string
	Err       error
}

func (ErrParseParam) Error

func (e ErrParseParam) Error() string

func (ErrParseParam) Unwrap

func (e ErrParseParam) Unwrap() error

type HTTPClient

type HTTPClient interface {
	Do(*http.Request) (*http.Response, error)
}

type HTTPClientFunc

type HTTPClientFunc func(*http.Request) (*http.Response, error)

func (HTTPClientFunc) Do

type Maybe

type Maybe[T any] struct {
	IsSet bool
	Value T
}

func Just

func Just[T any](v T) Maybe[T]

func (*Maybe[T]) Set

func (m *Maybe[T]) Set(v T)

type Nullable added in v0.1.25

type Nullable[T any] struct {
	IsSet bool
	Value T
}

func Ptr added in v0.1.25

func Ptr[T any](v T) Nullable[T]

func (*Nullable[T]) Set added in v0.1.25

func (m *Nullable[T]) Set(v T)

type PostShopsShopStringShopSchemaPetsHandlerFunc

type PostShopsShopStringShopSchemaPetsHandlerFunc func(ctx context.Context, r PostShopsShopStringShopSchemaPetsRequest) PostShopsShopStringShopSchemaPetsResponse

func (PostShopsShopStringShopSchemaPetsHandlerFunc) ServeHTTP

type PostShopsShopStringShopSchemaPetsParams

type PostShopsShopStringShopSchemaPetsParams struct {
	Path PostShopsShopStringShopSchemaPetsParamsPath
}

func (PostShopsShopStringShopSchemaPetsParams) HTTP

func (PostShopsShopStringShopSchemaPetsParams) Parse

type PostShopsShopStringShopSchemaPetsParamsPath

type PostShopsShopStringShopSchemaPetsParamsPath struct {
	ShopString string

	ShopSchema Shop
}

type PostShopsShopStringShopSchemaPetsRequest

type PostShopsShopStringShopSchemaPetsRequest interface {
	HTTP() *http.Request
	Parse() (PostShopsShopStringShopSchemaPetsParams, error)
}

func PostShopsShopStringShopSchemaPetsHTTPRequest

func PostShopsShopStringShopSchemaPetsHTTPRequest(r *http.Request) PostShopsShopStringShopSchemaPetsRequest

type PostShopsShopStringShopSchemaPetsResponse

type PostShopsShopStringShopSchemaPetsResponse interface {
	// contains filtered or unexported methods
}

func NewPostShopsShopStringShopSchemaPetsResponse200

func NewPostShopsShopStringShopSchemaPetsResponse200() PostShopsShopStringShopSchemaPetsResponse

type PostShopsShopStringShopSchemaPetsResponse200

type PostShopsShopStringShopSchemaPetsResponse200 struct{}

PostShopsShopStringShopSchemaPetsResponse200 - OK response

func (PostShopsShopStringShopSchemaPetsResponse200) Write

type Shop

type Shop string

func NewShop

func NewShop(v string) Shop

func (Shop) String

func (c Shop) String() string

Jump to

Keyboard shortcuts

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