Documentation
¶
Overview ¶
Package rest calls the JSON REST APIs the vfs adapters use (Google Drive, Docs and Sheets; Microsoft Graph) over net/http and encoding/json. It links no vendor SDK.
Index ¶
- func Encode(v any) []byte
- type Client
- func (c Client) Call(ctx context.Context, method, path string, q url.Values, in, out any) error
- func (c Client) Media(ctx context.Context, path string, q url.Values, header http.Header) (*http.Response, error)
- func (c Client) Stream(ctx context.Context, method, path string, q url.Values, contentType string, ...) error
- type Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
Client calls one API. Base is the API root and ends in "/"; relative paths resolve against it.
func (Client) Call ¶
Call sends in as JSON (nil: no body) and decodes the reply into out (nil: the reply is dropped). path is relative to Base, or an absolute URL under Base (a page link the API returned).
Click to show internal directories.
Click to hide internal directories.