editor

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MIT Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Callback

type Callback struct {
	Key    string `json:"key"`
	Status int    `json:"status"`
	URL    string `json:"url"`
}

type Client

type Client struct {
	InternalOrigin string
	Origin         string
	DriveOrigin    string

	HTTP *http.Client
	// contains filtered or unexported fields
}

func FromEnv

func FromEnv(appURL, environment string) (*Client, error)

func (*Client) Callback

func (c *Client) Callback(token string) (Callback, error)

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

func (c *Client) ConvertText(ctx context.Context, key, fileType, source string) (string, error)

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

func (c *Client) Download(token, url string) error

Download accepts a Document Server file request whose outbox token was signed for exactly url.

func (*Client) Drop

func (c *Client) Drop(ctx context.Context, key, user string) error

func (*Client) Fetch

func (c *Client) Fetch(ctx context.Context, raw string) (io.ReadCloser, error)

func (*Client) Sign

func (c *Client) Sign(payload any) (string, error)

func (*Client) Verify

func (c *Client) Verify(token string) (map[string]json.RawMessage, error)

Jump to

Keyboard shortcuts

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