5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 06:20:48 +08:00
wails/v3/internal/plugins/template
2023-03-25 09:39:59 +11:00
..
go.mod.tmpl Exported() -> CallableByJS() 2023-03-22 20:42:20 +11:00
go.sum Add plugin init. Update plugin signature. 2023-03-19 09:13:05 +11:00
models.d.ts.tmpl Add plugin init. Update plugin signature. 2023-03-19 09:13:05 +11:00
NEXT STEPS.md Add plugin init. Update plugin signature. 2023-03-19 09:13:05 +11:00
plugin.go.tmpl Add sqlite plugin 2023-03-25 09:39:59 +11:00
plugin.tmpl.js Add plugin init. Update plugin signature. 2023-03-19 09:13:05 +11:00
plugin.tmpl.toml Add plugin init. Update plugin signature. 2023-03-19 09:13:05 +11:00
README.tmpl.md Add plugin init. Update plugin signature. 2023-03-19 09:13:05 +11:00

{{.Name}} Plugin

This example plugin provides a way to generate hashes of strings.

Installation

Add the plugin to the Plugins option in the Applications options:

    Plugins: map[string]application.Plugin{
        "{{.Name}}": {{.Name}}.NewPlugin(),
    },

Usage

You can then call the methods from the frontend:

    wails.Plugin("{{.Name}}","All","hello world").then((result) => console.log(result))

This method returns a struct with the following fields:

    interface Hashes {
        MD5: string;
        SHA1: string;
        SHA256: string;
    }

A TypeScript definition file is provided for this interface.

Support

If you find a bug in this plugin, please raise a ticket here. Please do not contact the Wails team for support.