Documentation
¶
Rendered for js/wasm
Overview ¶
Package wasm exposes a cling-sync repository to JavaScript.
Index ¶
- Constants
- func Async(fn func(resolve func(js.Value), reject func(js.Value))) js.Value
- func Await(promise js.Value) (js.Value, error)
- func BuildRepositoryAPI() js.Value
- type FetchError
- type PromiseError
- type RepositoryAPI
- func (r RepositoryAPI) Close(this js.Value, args []js.Value) any
- func (r RepositoryAPI) Head(this js.Value, args []js.Value) any
- func (r RepositoryAPI) Ls(this js.Value, args []js.Value) any
- func (r RepositoryAPI) Open(this js.Value, args []js.Value) any
- func (r RepositoryAPI) ReadFile(this js.Value, args []js.Value) any
- type WasmHTTPClient
Constants ¶
View Source
const MaxDownloadSize = 500 * 1024 * 1024
Variables ¶
This section is empty.
Functions ¶
func BuildRepositoryAPI ¶
Types ¶
type FetchError ¶
type FetchError struct {
Message string
}
func (FetchError) Error ¶
func (e FetchError) Error() string
type PromiseError ¶
type PromiseError struct {
Message string
}
func (PromiseError) Error ¶
func (e PromiseError) Error() string
type RepositoryAPI ¶
type RepositoryAPI struct{}
func (RepositoryAPI) Close ¶
Close wipes the repository's key material and drops the handle. The handle must not be used afterwards.
Parameters:
handle: RepositoryHandle
Returns:
Promise<void>
func (RepositoryAPI) Ls ¶
Parameters:
handle: RepositoryHandle excludes: string (comma separated)
Returns:
Promise<string>: The result as <tr> elements.
func (RepositoryAPI) Open ¶
Parameters:
url: string passphrase: string
Returns:
Promise<int> (RepositoryHandle)
Click to show internal directories.
Click to hide internal directories.