test

package
v0.1.27 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const SpecFile string = `` /* 2799-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 {
	PostShopsShopStringSepShopSchemaPetsHandler PostShopsShopStringSepShopSchemaPetsHandlerFunc

	// 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) PostShopsShopStringSepShopSchemaPets

PostShopsShopStringSepShopSchemaPets POST /shops/{shop_string}/sep/{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 added in v0.1.5

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

func Just added in v0.1.5

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

func Nothing added in v0.1.27

func Nothing[T any]() Maybe[T]

func (Maybe[T]) Get added in v0.1.27

func (m Maybe[T]) Get() (zero T, _ bool)

func (*Maybe[T]) Set added in v0.1.6

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

type Nullable added in v0.1.25

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

func Null added in v0.1.27

func Null[T any]() Nullable[T]

func Pointer added in v0.1.27

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

func (Nullable[T]) Get added in v0.1.27

func (m Nullable[T]) Get() (zero T, _ bool)

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

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

type Organization

type Organization int

func NewOrganization added in v0.1.23

func NewOrganization(v int) Organization

func (Organization) Int added in v0.1.23

func (c Organization) Int() int

type Page

type Page int32

func NewPage added in v0.1.23

func NewPage(v int32) Page

func (Page) Int32 added in v0.1.23

func (c Page) Int32() int32

type Pages added in v0.1.4

type Pages []int32

func NewPages added in v0.1.23

func NewPages(v []int32) Pages

func (Pages) Int32s added in v0.1.23

func (c Pages) Int32s() []int32

type PostShopsShopStringSepShopSchemaPetsHandlerFunc

type PostShopsShopStringSepShopSchemaPetsHandlerFunc func(ctx context.Context, r PostShopsShopStringSepShopSchemaPetsRequest) PostShopsShopStringSepShopSchemaPetsResponse

func (PostShopsShopStringSepShopSchemaPetsHandlerFunc) ServeHTTP

type PostShopsShopStringSepShopSchemaPetsParams

func (PostShopsShopStringSepShopSchemaPetsParams) HTTP

func (PostShopsShopStringSepShopSchemaPetsParams) Parse

type PostShopsShopStringSepShopSchemaPetsParamsHeaders added in v0.1.18

type PostShopsShopStringSepShopSchemaPetsParamsHeaders struct {
	XOrganizationInt Maybe[int]

	XOrganizationSchema Maybe[Organization]

	XOrganizationIntRequired int

	XOrganizationSchemaRequired Organization
}

type PostShopsShopStringSepShopSchemaPetsParamsPath added in v0.1.18

type PostShopsShopStringSepShopSchemaPetsParamsPath struct {
	ShopString string

	ShopSchema Shop
}

type PostShopsShopStringSepShopSchemaPetsParamsQuery added in v0.1.18

type PostShopsShopStringSepShopSchemaPetsParamsQuery struct {
	PageInt Maybe[int]

	PageSchema Maybe[Page]

	PagesSchema Maybe[Pages]

	PageIntReq int

	PageSchemaReq Page
}

type PostShopsShopStringSepShopSchemaPetsRequest

type PostShopsShopStringSepShopSchemaPetsRequest interface {
	HTTP() *http.Request
	Parse() (PostShopsShopStringSepShopSchemaPetsParams, error)
}

type PostShopsShopStringSepShopSchemaPetsResponse

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

func NewPostShopsShopStringSepShopSchemaPetsResponse200

func NewPostShopsShopStringSepShopSchemaPetsResponse200() PostShopsShopStringSepShopSchemaPetsResponse

type PostShopsShopStringSepShopSchemaPetsResponse200

type PostShopsShopStringSepShopSchemaPetsResponse200 struct{}

PostShopsShopStringSepShopSchemaPetsResponse200 - OK response

func (PostShopsShopStringSepShopSchemaPetsResponse200) Write

type Shop

type Shop Shopa

func NewShop added in v0.1.23

func NewShop(v Shopa) Shop

func (Shop) Shopa added in v0.1.23

func (c Shop) Shopa() Shopa

type Shopa added in v0.1.4

type Shopa Shopb

func NewShopa added in v0.1.23

func NewShopa(v Shopb) Shopa

func (Shopa) Shopb added in v0.1.23

func (c Shopa) Shopb() Shopb

type Shopb added in v0.1.23

type Shopb Shopc

func NewShopb added in v0.1.23

func NewShopb(v Shopc) Shopb

func (Shopb) Shopc added in v0.1.23

func (c Shopb) Shopc() Shopc

type Shopc added in v0.1.23

type Shopc string

func NewShopc added in v0.1.23

func NewShopc(v string) Shopc

func (Shopc) String added in v0.1.23

func (c Shopc) String() string

type Shops added in v0.1.4

type Shops []string

func NewShops added in v0.1.23

func NewShops(v []string) Shops

func (Shops) Strings added in v0.1.4

func (c Shops) Strings() []string

Jump to

Keyboard shortcuts

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