Documentation ¶
Index ¶
- Constants
- Variables
- func SchemaPath(r *http.Request) (string, bool)
- func SpecFileHandler() http.Handler
- type API
- type Client
- type Environment
- type EnvironmentSchema
- type Environments
- type ErrParseParam
- type GetShop
- type GetShopsShopHandlerFunc
- type GetShopsShopParams
- type GetShopsShopParamsPath
- type GetShopsShopParamsQuery
- type GetShopsShopRequest
- type GetShopsShopResponse
- type GetShopsShopResponse200JSON
- type GetShopsShopResponseDefault
- type HTTPClient
- type HTTPClientFunc
- type Metadata
- type MetadataSchema
- type PageCustom
- type PageCustomSchema
- type Settings
- type SettingsSchema
- type Shop
- type ShopName
- type ShopNameSchema
Constants ¶
View Source
const SpecFile string = `` /* 2313-byte string literal not displayed */
Variables ¶
Functions ¶
func SpecFileHandler ¶
Types ¶
type API ¶
type API struct { GetShopsShopHandler GetShopsShopHandlerFunc // not found NotFoundHandler http.Handler // spec file SpecFileHandler http.Handler Middlewares []func(h http.Handler) http.Handler }
func (API) TestClient ¶ added in v0.1.28
type Client ¶
type Client struct { BaseURL string HTTPClient HTTPClient }
func NewClient ¶
func NewClient(baseURL string, httpClient HTTPClient) *Client
func (*Client) GetShopsShop ¶
func (c *Client) GetShopsShop(ctx context.Context, request GetShopsShopParams) (GetShopsShopResponse, error)
GetShopsShop GET /shops/{shop}
type Environment ¶ added in v0.1.29
type Environment = pkg.Environment
type EnvironmentSchema ¶ added in v0.1.29
func (EnvironmentSchema) MarshalJSON ¶ added in v0.1.29
func (c EnvironmentSchema) MarshalJSON() ([]byte, error)
func (*EnvironmentSchema) UnmarshalJSON ¶ added in v0.1.29
func (c *EnvironmentSchema) UnmarshalJSON(bs []byte) error
type Environments ¶ added in v0.1.29
type Environments = pkg.Nullable[[]Environment]
type ErrParseParam ¶
func (ErrParseParam) Error ¶
func (e ErrParseParam) Error() string
func (ErrParseParam) Unwrap ¶
func (e ErrParseParam) Unwrap() error
type GetShop ¶ added in v0.1.29
type GetShop struct { Environments pkg.Maybe[Environments] `json:"environments"` Metadata Metadata `json:"metadata"` Settings pkg.Maybe[Settings] `json:"settings"` }
func (GetShop) MarshalJSON ¶ added in v0.1.29
func (*GetShop) UnmarshalJSON ¶ added in v0.1.29
type GetShopsShopHandlerFunc ¶
type GetShopsShopHandlerFunc func(ctx context.Context, r GetShopsShopRequest) GetShopsShopResponse
func (GetShopsShopHandlerFunc) ServeHTTP ¶
func (f GetShopsShopHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GetShopsShopParams ¶
type GetShopsShopParams struct { Query GetShopsShopParamsQuery Path GetShopsShopParamsPath Body GetShop }
func (GetShopsShopParams) HTTP ¶
func (r GetShopsShopParams) HTTP() *http.Request
func (GetShopsShopParams) Parse ¶
func (r GetShopsShopParams) Parse() (GetShopsShopParams, error)
type GetShopsShopParamsPath ¶ added in v0.1.18
type GetShopsShopParamsQuery ¶ added in v0.1.18
type GetShopsShopParamsQuery struct { PageSchemaRefQuery pkg.Maybe[PageCustom] PageCustomTypeQuery pkg.Maybe[pkg.PageCustomTypeQuery] }
type GetShopsShopRequest ¶
type GetShopsShopRequest interface { HTTP() *http.Request Parse() (GetShopsShopParams, error) }
func GetShopsShopHTTPRequest ¶
func GetShopsShopHTTPRequest(r *http.Request) GetShopsShopRequest
type GetShopsShopResponse ¶
type GetShopsShopResponse interface {
// contains filtered or unexported methods
}
func NewGetShopsShopResponse200JSON ¶
func NewGetShopsShopResponse200JSON(body Shop) GetShopsShopResponse
func NewGetShopsShopResponseDefault ¶
func NewGetShopsShopResponseDefault(code int) GetShopsShopResponse
type GetShopsShopResponse200JSON ¶
type GetShopsShopResponse200JSON struct {
Body Shop
}
GetShopsShopResponse200JSON - Shop response
func (GetShopsShopResponse200JSON) Write ¶
func (r GetShopsShopResponse200JSON) Write(w http.ResponseWriter)
type GetShopsShopResponseDefault ¶
type GetShopsShopResponseDefault struct {
Code int
}
GetShopsShopResponseDefault - Error response
func (GetShopsShopResponseDefault) Write ¶
func (r GetShopsShopResponseDefault) Write(w http.ResponseWriter)
type HTTPClientFunc ¶
type MetadataSchema ¶ added in v0.1.29
func (MetadataSchema) MarshalJSON ¶ added in v0.1.29
func (c MetadataSchema) MarshalJSON() ([]byte, error)
func (*MetadataSchema) UnmarshalJSON ¶ added in v0.1.29
func (c *MetadataSchema) UnmarshalJSON(bs []byte) error
type PageCustom ¶
type PageCustomSchema ¶ added in v0.1.29
type PageCustomSchema string
func NewPageCustomSchema ¶ added in v0.1.29
func NewPageCustomSchema(v string) PageCustomSchema
func (PageCustomSchema) String ¶ added in v0.1.29
func (c PageCustomSchema) String() string
type SettingsSchema ¶ added in v0.1.29
func (SettingsSchema) MarshalJSON ¶ added in v0.1.29
func (c SettingsSchema) MarshalJSON() ([]byte, error)
func (*SettingsSchema) UnmarshalJSON ¶ added in v0.1.29
func (c *SettingsSchema) UnmarshalJSON(bs []byte) error
type ShopNameSchema ¶ added in v0.1.29
type ShopNameSchema int64
func NewShopNameSchema ¶ added in v0.1.29
func NewShopNameSchema(v int64) ShopNameSchema
func (ShopNameSchema) Int64 ¶ added in v0.1.29
func (c ShopNameSchema) Int64() int64
Click to show internal directories.
Click to hide internal directories.