domprinter_service

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigDefaultClient

func ConfigDefaultClient(ops ...Option) (err error)

func FetchPrintTask

func FetchPrintTask(context context.Context, req *domprinter.FetchPrintTaskReq, reqOpt ...config.RequestOption) (resp *domprinter.FetchPrintTaskResp, rawResponse *protocol.Response, err error)

func Ping added in v0.0.2

func Ping(context context.Context, req *domprinter.PingReq, reqOpt ...config.RequestOption) (resp *domprinter.PingResp, rawResponse *protocol.Response, err error)

func SubmitPrintTask

func SubmitPrintTask(context context.Context, req *domprinter.SubmitPrintTaskReq, reqOpt ...config.RequestOption) (resp *domprinter.SubmitPrintTaskResp, rawResponse *protocol.Response, err error)

func UpdatePrintTask

func UpdatePrintTask(context context.Context, req *domprinter.UpdatePrintTaskReq, reqOpt ...config.RequestOption) (resp *domprinter.UpdatePrintTaskResp, rawResponse *protocol.Response, err error)

Types

type Client

type Client interface {
	FetchPrintTask(context context.Context, req *domprinter.FetchPrintTaskReq, reqOpt ...config.RequestOption) (resp *domprinter.FetchPrintTaskResp, rawResponse *protocol.Response, err error)

	SubmitPrintTask(context context.Context, req *domprinter.SubmitPrintTaskReq, reqOpt ...config.RequestOption) (resp *domprinter.SubmitPrintTaskResp, rawResponse *protocol.Response, err error)

	UpdatePrintTask(context context.Context, req *domprinter.UpdatePrintTaskReq, reqOpt ...config.RequestOption) (resp *domprinter.UpdatePrintTaskResp, rawResponse *protocol.Response, err error)

	Ping(context context.Context, req *domprinter.PingReq, reqOpt ...config.RequestOption) (resp *domprinter.PingResp, rawResponse *protocol.Response, err error)
}

func NewDOMPrinterServiceClient

func NewDOMPrinterServiceClient(hostUrl string, ops ...Option) (Client, error)

type DOMPrinterServiceClient

type DOMPrinterServiceClient struct {
	// contains filtered or unexported fields
}

func (*DOMPrinterServiceClient) FetchPrintTask

func (s *DOMPrinterServiceClient) FetchPrintTask(context context.Context, req *domprinter.FetchPrintTaskReq, reqOpt ...config.RequestOption) (resp *domprinter.FetchPrintTaskResp, rawResponse *protocol.Response, err error)

func (*DOMPrinterServiceClient) Ping added in v0.0.2

func (s *DOMPrinterServiceClient) Ping(context context.Context, req *domprinter.PingReq, reqOpt ...config.RequestOption) (resp *domprinter.PingResp, rawResponse *protocol.Response, err error)

func (*DOMPrinterServiceClient) SubmitPrintTask

func (s *DOMPrinterServiceClient) SubmitPrintTask(context context.Context, req *domprinter.SubmitPrintTaskReq, reqOpt ...config.RequestOption) (resp *domprinter.SubmitPrintTaskResp, rawResponse *protocol.Response, err error)

func (*DOMPrinterServiceClient) UpdatePrintTask

func (s *DOMPrinterServiceClient) UpdatePrintTask(context context.Context, req *domprinter.UpdatePrintTaskReq, reqOpt ...config.RequestOption) (resp *domprinter.UpdatePrintTaskResp, rawResponse *protocol.Response, err error)

type Option

type Option struct {
	// contains filtered or unexported fields
}

Configuration of client

func WithHeader

func WithHeader(header http.Header) Option

WithHeader is used to add the default header, which is carried by every request

func WithHertzClient

func WithHertzClient(client client.Doer) Option

WithHertzClient is used to register a custom hertz client

func WithHertzClientMiddleware

func WithHertzClientMiddleware(mws ...hertz_client.Middleware) Option

WithHertzClientMiddleware is used to register the middleware for the hertz client

func WithHertzClientOption

func WithHertzClientOption(opt ...config.ClientOption) Option

WithHertzClientOption is used to pass configuration for the hertz client

func WithResponseResultDecider

func WithResponseResultDecider(decider ResponseResultDecider) Option

WithResponseResultDecider configure custom deserialization of http response to response struct

type Options

type Options struct {
	// contains filtered or unexported fields
}

type ResponseResultDecider

type ResponseResultDecider func(statusCode int, rawResponse *protocol.Response) (isError bool)

Definition of global data and types.

Jump to

Keyboard shortcuts

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