Documentation
¶
Index ¶
- type Callback
- type Client
- func (c *Client) Callback(token string) (Callback, error)
- func (c *Client) Convert(ctx context.Context, key, fileType, source string, size int) (string, error)
- func (c *Client) ConvertText(ctx context.Context, key, fileType, source string) (string, error)
- func (c *Client) Download(token, url string) error
- func (c *Client) Drop(ctx context.Context, key, user string) error
- func (c *Client) Fetch(ctx context.Context, raw string) (io.ReadCloser, error)
- func (c *Client) Sign(payload any) (string, error)
- func (c *Client) Verify(token string) (map[string]json.RawMessage, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
InternalOrigin string
Origin string
DriveOrigin string
HTTP *http.Client
// contains filtered or unexported fields
}
func (*Client) Convert ¶
func (c *Client) Convert(ctx context.Context, key, fileType, source string, size int) (string, error)
Convert asks the Document Server to render the first page of the document at source, a fileType file the server fetches with its own signed request, as a PNG inside size square. It returns the output URL for Fetch.
func (*Client) ConvertText ¶ added in v0.4.3
ConvertText has the Document Server convert source (of fileType) to plain text and returns the output URL, checked like Convert's. Fetch reads it.
func (*Client) Download ¶
Download accepts a Document Server file request whose outbox token was signed for exactly url.