File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 1
- # Authoring plugins
1
+ # Using plugins
2
2
3
- To use plugins, you must be using [ Version 2] ( ../reference/config.md ) of
3
+ To use plugins, you must be using [ Version 2] ( ../reference/config.md#version-2 ) of
4
4
the configuration file. The top-level ` plugins ` array defines the available
5
5
plugins.
6
6
7
7
## WASM plugins
8
8
9
- > WASM plugins are fully sandboxed. Plugins do not have access to the network,
9
+ > WASM plugins are fully sandboxed; they do not have access to the network,
10
10
> filesystem, or environment variables.
11
11
12
12
In the ` codegen ` section, the ` out ` field dictates what directory will contain
13
13
the new files. The ` plugin ` key must reference a plugin defined in the
14
- top-level ` plugins ` map. The ` options ` are serialized to a string and passed on
15
- to the plugin itself.
14
+ top-level ` plugins ` map. Any ` options ` are serialized to a string as JSON and
15
+ passed on to the plugin itself.
16
16
17
17
18
18
``` yaml
29
29
codegen :
30
30
- out : gen
31
31
plugin : greeter
32
+ options :
33
+ lang : en-US
32
34
` ` `
33
35
34
36
For a complete working example see the following files:
@@ -44,8 +46,8 @@ For a complete working example see the following files:
44
46
45
47
In the ` codegen` section, the `out` field dictates what directory will contain
46
48
the new files. The `plugin` key must reference a plugin defined in the
47
- top-level `plugins` map. The `options` are serialized to a string and passed on
48
- to the plugin itself.
49
+ top-level `plugins` map. Any `options` are serialized to a string as JSON and
50
+ passed on to the plugin itself.
49
51
50
52
` ` ` yaml
51
53
version: '2'
Original file line number Diff line number Diff line change 4
4
database types to Go types. Choices for more complex types are described below.
5
5
6
6
If you're unsatisfied with the default, you can override any type using the
7
- [ overrides list] ( config.html#type-overriding ) in your ` sqlc ` config file.
7
+ [ overrides list] ( ./ config.html#type-overriding) in your ` sqlc ` config file.
8
8
9
9
## Arrays
10
10
You can’t perform that action at this time.
0 commit comments