Documentation
¶
Overview ¶
Package dto provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen/v2 version v2.1.0 DO NOT EDIT.
Index ¶
- func GetSwagger() (swagger *openapi3.T, err error)
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- type Asset
- type AssetCurrencyPair
- type AssetSourceFilter
- type AssetTypeFilter
- type ChiServerOptions
- type CurrencyRatio
- type InvalidParamFormatError
- type MiddlewareFunc
- type PostAssetsStorageApiV1GetAssetsJSONBody
- type PostAssetsStorageApiV1GetAssetsJSONRequestBody
- type PostAssetsStorageApiV1GetAssetsParams
- type PutAssetsStorageApiV1AddAssetsJSONBody
- type PutAssetsStorageApiV1AddAssetsJSONRequestBody
- type PutAssetsStorageApiV1AddAssetsParams
- type RequestAssetCurrencyPair
- type RequiredHeaderError
- type RequiredParamError
- type ServerInterface
- type ServerInterfaceWrapper
- type TimeFilter
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type Unimplemented
- type UnmarshalingParamError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.
func Handler ¶
func Handler(si ServerInterface) http.Handler
Handler creates http.Handler with routing matching OpenAPI spec.
func HandlerFromMux ¶
func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
Types ¶
type Asset ¶
type Asset struct {
ExternalIdentifier int64 `json:"external_identifier"`
UniversalIdentifier int64 `json:"universal_identifier"`
}
Asset defines model for Asset.
type AssetCurrencyPair ¶
type AssetCurrencyPair struct {
BaseAsset Asset `json:"base_asset"`
CurrencyRatio CurrencyRatio `json:"currency_ratio"`
Identifier openapi_types.UUID `json:"identifier"`
QuotedAsset Asset `json:"quoted_asset"`
}
AssetCurrencyPair defines model for AssetCurrencyPair.
type AssetSourceFilter ¶
type AssetSourceFilter struct {
SourceIdentifiers []int64 `json:"source_identifiers"`
}
AssetSourceFilter defines model for AssetSourceFilter.
type AssetTypeFilter ¶
type AssetTypeFilter struct {
UniversalIdentifiers []int64 `json:"universal_identifiers"`
}
AssetTypeFilter defines model for AssetTypeFilter.
type ChiServerOptions ¶
type ChiServerOptions struct {
BaseURL string
BaseRouter chi.Router
Middlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
type CurrencyRatio ¶
CurrencyRatio defines model for CurrencyRatio.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type PostAssetsStorageApiV1GetAssetsJSONBody ¶
type PostAssetsStorageApiV1GetAssetsJSONBody struct {
SourceFilter *AssetSourceFilter `json:"source_filter,omitempty"`
TimeFilter *TimeFilter `json:"time_filter,omitempty"`
TypeFilter *AssetTypeFilter `json:"type_filter,omitempty"`
}
PostAssetsStorageApiV1GetAssetsJSONBody defines parameters for PostAssetsStorageApiV1GetAssets.
type PostAssetsStorageApiV1GetAssetsJSONRequestBody ¶
type PostAssetsStorageApiV1GetAssetsJSONRequestBody PostAssetsStorageApiV1GetAssetsJSONBody
PostAssetsStorageApiV1GetAssetsJSONRequestBody defines body for PostAssetsStorageApiV1GetAssets for application/json ContentType.
type PostAssetsStorageApiV1GetAssetsParams ¶
type PostAssetsStorageApiV1GetAssetsParams struct {
Offset int64 `form:"offset" json:"offset"`
Limit int64 `form:"limit" json:"limit"`
}
PostAssetsStorageApiV1GetAssetsParams defines parameters for PostAssetsStorageApiV1GetAssets.
type PutAssetsStorageApiV1AddAssetsJSONBody ¶
type PutAssetsStorageApiV1AddAssetsJSONBody struct {
AssetPairs []RequestAssetCurrencyPair `json:"asset_pairs"`
}
PutAssetsStorageApiV1AddAssetsJSONBody defines parameters for PutAssetsStorageApiV1AddAssets.
type PutAssetsStorageApiV1AddAssetsJSONRequestBody ¶
type PutAssetsStorageApiV1AddAssetsJSONRequestBody PutAssetsStorageApiV1AddAssetsJSONBody
PutAssetsStorageApiV1AddAssetsJSONRequestBody defines body for PutAssetsStorageApiV1AddAssets for application/json ContentType.
type PutAssetsStorageApiV1AddAssetsParams ¶
type PutAssetsStorageApiV1AddAssetsParams struct {
XHermesTradeAssetSourceIdentifier int `json:"X-HermesTrade-Asset-Source-Identifier"`
}
PutAssetsStorageApiV1AddAssetsParams defines parameters for PutAssetsStorageApiV1AddAssets.
type RequestAssetCurrencyPair ¶
type RequestAssetCurrencyPair struct {
BaseAsset Asset `json:"base_asset"`
CurrencyRatio CurrencyRatio `json:"currency_ratio"`
QuotedAsset Asset `json:"quoted_asset"`
}
RequestAssetCurrencyPair defines model for RequestAssetCurrencyPair.
type RequiredHeaderError ¶
func (*RequiredHeaderError) Error ¶
func (e *RequiredHeaderError) Error() string
func (*RequiredHeaderError) Unwrap ¶
func (e *RequiredHeaderError) Unwrap() error
type RequiredParamError ¶
type RequiredParamError struct {
ParamName string
}
func (*RequiredParamError) Error ¶
func (e *RequiredParamError) Error() string
type ServerInterface ¶
type ServerInterface interface {
// Add assets currency pairs to assets storage
// (PUT /assets-storage/api/v1/add-assets)
PutAssetsStorageApiV1AddAssets(w http.ResponseWriter, r *http.Request, params PutAssetsStorageApiV1AddAssetsParams)
// Get assets currency pairs from storage
// (POST /assets-storage/api/v1/get-assets)
PostAssetsStorageApiV1GetAssets(w http.ResponseWriter, r *http.Request, params PostAssetsStorageApiV1GetAssetsParams)
}
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
HandlerMiddlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) PostAssetsStorageApiV1GetAssets ¶
func (siw *ServerInterfaceWrapper) PostAssetsStorageApiV1GetAssets(w http.ResponseWriter, r *http.Request)
PostAssetsStorageApiV1GetAssets operation middleware
func (*ServerInterfaceWrapper) PutAssetsStorageApiV1AddAssets ¶
func (siw *ServerInterfaceWrapper) PutAssetsStorageApiV1AddAssets(w http.ResponseWriter, r *http.Request)
PutAssetsStorageApiV1AddAssets operation middleware
type TimeFilter ¶
type TimeFilter struct {
EndDate *time.Time `json:"end_date,omitempty"`
StartDate *time.Time `json:"start_date,omitempty"`
}
TimeFilter defines model for TimeFilter.
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type Unimplemented ¶
type Unimplemented struct{}
func (Unimplemented) PostAssetsStorageApiV1GetAssets ¶
func (_ Unimplemented) PostAssetsStorageApiV1GetAssets(w http.ResponseWriter, r *http.Request, params PostAssetsStorageApiV1GetAssetsParams)
Get assets currency pairs from storage (POST /assets-storage/api/v1/get-assets)
func (Unimplemented) PutAssetsStorageApiV1AddAssets ¶
func (_ Unimplemented) PutAssetsStorageApiV1AddAssets(w http.ResponseWriter, r *http.Request, params PutAssetsStorageApiV1AddAssetsParams)
Add assets currency pairs to assets storage (PUT /assets-storage/api/v1/add-assets)
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error