Documentation
¶
Index ¶
- Variables
- func ConfigDefaultOrderClient(ops ...Option) (err error)
- func ConfigDefaultSalesEntryClient(ops ...Option) (err error)
- func DescribeSalesEntry(context context.Context, req *sales.DescribeSalesEntryRequest, ...) (resp *sales.DescribeSalesEntryResponse, rawResponse *protocol.Response, ...)
- func JsonMarshal(val interface{}) string
- func PlaceOnDemandNewPurchaseOrder(context context.Context, req *order.PlaceOnDemandNewPurchaseOrderRequest, ...) (resp *order.PlaceOnDemandNewPurchaseOrderResponse, ...)
- func PlaceRefundOrder(context context.Context, req *order.PlaceRefundOrderRequest, ...) (resp *order.PlaceRefundOrderResponse, rawResponse *protocol.Response, ...)
- func QueryOrderDetail(context context.Context, req *order.QueryOrderDetailRequest, ...) (resp *order.QueryOrderDetailResponse, rawResponse *protocol.Response, ...)
- func QueryResourceInfoByMasterOrderId(context context.Context, req *order.QueryResourceInfoByMasterOrderIdRequest, ...) (resp *order.QueryResourceInfoByMasterOrderIdResponse, ...)
- type ClientSet
- type HttpClient
- type Option
- func WithClient(client client.Doer) Option
- func WithClientConfig(cfg *apiCfg.OpenapiConfig) Option
- func WithClientMiddleware(mws ...cli.Middleware) Option
- func WithClientOption(opt ...config.ClientOption) Option
- func WithHeader(header http.Header) Option
- func WithHostUrl(HostUrl string) Option
- func WithResponseResultDecider(decider ResponseResultDecider) Option
- type Options
- type OrderClient
- type ResponseResultDecider
- type SalesEntryClient
Constants ¶
This section is empty.
Variables ¶
View Source
var OptimizeQueryParams = utils.OptimizeQueryParams
Functions ¶
func ConfigDefaultSalesEntryClient ¶ added in v1.0.0
func DescribeSalesEntry ¶ added in v1.0.0
func DescribeSalesEntry(context context.Context, req *sales.DescribeSalesEntryRequest, reqOpt ...config.RequestOption) (resp *sales.DescribeSalesEntryResponse, rawResponse *protocol.Response, err error)
func JsonMarshal ¶ added in v1.0.0
func JsonMarshal(val interface{}) string
func PlaceOnDemandNewPurchaseOrder ¶
func PlaceOnDemandNewPurchaseOrder(context context.Context, req *order.PlaceOnDemandNewPurchaseOrderRequest, reqOpt ...config.RequestOption) (resp *order.PlaceOnDemandNewPurchaseOrderResponse, rawResponse *protocol.Response, err error)
func PlaceRefundOrder ¶
func PlaceRefundOrder(context context.Context, req *order.PlaceRefundOrderRequest, reqOpt ...config.RequestOption) (resp *order.PlaceRefundOrderResponse, rawResponse *protocol.Response, err error)
func QueryOrderDetail ¶ added in v0.1.6
func QueryOrderDetail(context context.Context, req *order.QueryOrderDetailRequest, reqOpt ...config.RequestOption) (resp *order.QueryOrderDetailResponse, rawResponse *protocol.Response, err error)
func QueryResourceInfoByMasterOrderId ¶
func QueryResourceInfoByMasterOrderId(context context.Context, req *order.QueryResourceInfoByMasterOrderIdRequest, reqOpt ...config.RequestOption) (resp *order.QueryResourceInfoByMasterOrderIdResponse, rawResponse *protocol.Response, err error)
Types ¶
type ClientSet ¶
type ClientSet interface {
Order() OrderClient
SalesEntry() SalesEntryClient
}
type HttpClient ¶
type HttpClient struct {
// contains filtered or unexported fields
}
HttpClient underlying client
func NewHttpClient ¶
func NewHttpClient(opts *Options) (*HttpClient, error)
func (*HttpClient) Execute ¶
func (c *HttpClient) Execute(req *request) (*response, error)
func (*HttpClient) Use ¶
func (c *HttpClient) Use(mws ...cli.Middleware) error
type Option ¶
type Option struct {
// contains filtered or unexported fields
}
Option Configuration of client
func WithClient ¶
WithClient is used to register a custom crafter client
func WithClientConfig ¶
func WithClientConfig(cfg *apiCfg.OpenapiConfig) Option
WithClientConfig is used to pass openapi configuration for the client
func WithClientMiddleware ¶
func WithClientMiddleware(mws ...cli.Middleware) Option
WithClientMiddleware is used to register the middleware for the crafter client
func WithClientOption ¶
func WithClientOption(opt ...config.ClientOption) Option
WithClientOption is used to pass configuration for the crafter client
func WithHeader ¶
WithHeader is used to add the default header, which is carried by every request
func WithHostUrl ¶
func WithResponseResultDecider ¶
func WithResponseResultDecider(decider ResponseResultDecider) Option
WithResponseResultDecider configure custom deserialization of http response to response struct
type OrderClient ¶
type OrderClient interface {
PlaceOnDemandNewPurchaseOrder(context context.Context, req *order.PlaceOnDemandNewPurchaseOrderRequest, reqOpt ...config.RequestOption) (resp *order.PlaceOnDemandNewPurchaseOrderResponse, rawResponse *protocol.Response, err error)
PlaceRefundOrder(context context.Context, req *order.PlaceRefundOrderRequest, reqOpt ...config.RequestOption) (resp *order.PlaceRefundOrderResponse, rawResponse *protocol.Response, err error)
QueryResourceInfoByMasterOrderId(context context.Context, req *order.QueryResourceInfoByMasterOrderIdRequest, reqOpt ...config.RequestOption) (resp *order.QueryResourceInfoByMasterOrderIdResponse, rawResponse *protocol.Response, err error)
QueryOrderDetail(context context.Context, req *order.QueryOrderDetailRequest, reqOpt ...config.RequestOption) (resp *order.QueryOrderDetailResponse, rawResponse *protocol.Response, err error)
}
func NewOrderClient ¶
func NewOrderClient(hostUrl string, ops ...Option) (OrderClient, error)
type ResponseResultDecider ¶
type ResponseResultDecider func(*response) error
ResponseResultDecider Definition of global data and types.
type SalesEntryClient ¶ added in v1.0.0
type SalesEntryClient interface {
DescribeSalesEntry(context context.Context, req *sales.DescribeSalesEntryRequest, reqOpt ...config.RequestOption) (resp *sales.DescribeSalesEntryResponse, rawResponse *protocol.Response, err error)
}
func NewSalesEntryClient ¶ added in v1.0.0
func NewSalesEntryClient(hostUrl string, ops ...Option) (SalesEntryClient, error)
Click to show internal directories.
Click to hide internal directories.