Versions in this module Expand all Collapse all v0 v0.1.0 Nov 14, 2026 Changes in this version + var ErrConnection = errors.New("connection error") + var ErrInvalidAuth = errors.New("auth key cannot be empty") + var ErrInvalidGateway = errors.New("FaaS gateway cannot be empty") + var ErrNotGenerated = errors.New("PDF not generated") + func CorrelationIDFromContext(ctx context.Context) string + func WithCorrelationID(ctx context.Context, correlationID string) context.Context + type Client struct + func New(faasGateway string, opts ...Option) (*Client, error) + func NewJwtAuth(authKey, faasGateway string, opts ...Option) (*Client, error) + func (c *Client) Convert(ctx context.Context, w io.Writer, content string, templateData []byte, ...) (ResponseInfo, error) + func (c *Client) GeneratePDFFromFile(ctx context.Context, w io.Writer, content, templateFilePath string, ...) (ResponseInfo, error) + func (c *Client) GeneratePDFFromString(ctx context.Context, w io.Writer, content, templateString string, ...) (ResponseInfo, error) + func (c *Client) SavePDF(ctx context.Context, content, templateFilePath, outputPath string, ...) (ResponseInfo, error) + type ConnectionError struct + Err error + Message string + func (e *ConnectionError) Error() string + func (e *ConnectionError) Unwrap() error + type HTTPError struct + Body string + CorrelationID string + Status string + StatusCode int + func (e *HTTPError) Error() string + func (e *HTTPError) Unwrap() error + type MediaFile struct + Data []byte + Name string + type NotGeneratedError struct + CorrelationID string + Message string + func (e *NotGeneratedError) Error() string + func (e *NotGeneratedError) Unwrap() error + type Option func(*Client) error + func WithHTTPClient(client *http.Client) Option + func WithInsecureSkipVerify() Option + func WithTimeout(timeout time.Duration) Option + type ResponseInfo struct + CorrelationID string + Stderr string + Stdout string