test

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const SpecFile string = `` /* 2314-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 OrgIntHeader

type OrgIntHeader int

func (*OrgIntHeader) Parse

func (h *OrgIntHeader) Parse(s string) error

func (OrgIntHeader) String

func (h OrgIntHeader) String() string

type OrgIntHeaderRequired

type OrgIntHeaderRequired int

func (*OrgIntHeaderRequired) Parse

func (h *OrgIntHeaderRequired) Parse(s string) error

func (OrgIntHeaderRequired) String

func (h OrgIntHeaderRequired) String() string

type OrgSchemaHeader

type OrgSchemaHeader Organization

func (*OrgSchemaHeader) Parse

func (h *OrgSchemaHeader) Parse(s string) error

func (OrgSchemaHeader) String

func (h OrgSchemaHeader) String() string

type OrgSchemaHeaderRequired

type OrgSchemaHeaderRequired Organization

func (*OrgSchemaHeaderRequired) Parse

func (h *OrgSchemaHeaderRequired) Parse(s string) error

func (OrgSchemaHeaderRequired) String

func (h OrgSchemaHeaderRequired) String() string

type Organization

type Organization int

func (*Organization) Parse

func (c *Organization) Parse(s string) error

func (Organization) String

func (q Organization) String() string

type Page

type Page int32

func (*Page) Parse

func (c *Page) Parse(s string) error

func (Page) String

func (q Page) String() string

type PageIntQuery

type PageIntQuery int

func (*PageIntQuery) ParseQuery

func (q *PageIntQuery) ParseQuery(vs []string) error

func (PageIntQuery) String

func (q PageIntQuery) String() string

type PageIntQueryRequired

type PageIntQueryRequired int

func (*PageIntQueryRequired) ParseQuery

func (q *PageIntQueryRequired) ParseQuery(vs []string) error

func (PageIntQueryRequired) String

func (q PageIntQueryRequired) String() string

type PageSchemaQuery

type PageSchemaQuery Page

func (*PageSchemaQuery) ParseQuery

func (q *PageSchemaQuery) ParseQuery(vs []string) error

func (PageSchemaQuery) String

func (q PageSchemaQuery) String() string

type PageSchemaQueryRequired

type PageSchemaQueryRequired Page

func (*PageSchemaQueryRequired) ParseQuery

func (q *PageSchemaQueryRequired) ParseQuery(vs []string) error

func (PageSchemaQueryRequired) String

func (q PageSchemaQueryRequired) String() string

type PostShopsShopStringSepShopSchemaPetsHandlerFunc

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

func (PostShopsShopStringSepShopSchemaPetsHandlerFunc) ServeHTTP

type PostShopsShopStringSepShopSchemaPetsParams

type PostShopsShopStringSepShopSchemaPetsParams struct {
	Query struct {
		PageInt *PageIntQuery

		PageSchema *PageSchemaQuery

		PageIntReq PageIntQueryRequired

		PageSchemaReq PageSchemaQueryRequired
	}

	Path struct {
		ShopString ShopStringPath

		ShopSchema ShopSchemaPath
	}

	Headers struct {
		XOrganizationInt *OrgIntHeader

		XOrganizationSchema *OrgSchemaHeader

		XOrganizationIntRequired OrgIntHeaderRequired

		XOrganizationSchemaRequired OrgSchemaHeaderRequired
	}
}

func (PostShopsShopStringSepShopSchemaPetsParams) HTTP

func (PostShopsShopStringSepShopSchemaPetsParams) Parse

type PostShopsShopStringSepShopSchemaPetsRequest

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

type PostShopsShopStringSepShopSchemaPetsResponse

type PostShopsShopStringSepShopSchemaPetsResponse interface {
	Write(w http.ResponseWriter)
	// 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 string

func (*Shop) Parse

func (c *Shop) Parse(s string) error

func (Shop) String

func (q Shop) String() string

type ShopSchemaPath

type ShopSchemaPath Shop

func (*ShopSchemaPath) Parse

func (q *ShopSchemaPath) Parse(s string) error

func (ShopSchemaPath) String

func (q ShopSchemaPath) String() string

type ShopStringPath

type ShopStringPath string

func (*ShopStringPath) Parse

func (q *ShopStringPath) Parse(s string) error

func (ShopStringPath) String

func (q ShopStringPath) String() string

Jump to

Keyboard shortcuts

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