-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpath_config.go
47 lines (44 loc) · 1.13 KB
/
path_config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package ipfs
import (
"github.com/hashicorp/vault/logical"
"github.com/hashicorp/vault/logical/framework"
)
var configFields = map[string]*framework.FieldSchema{
"address": {
Type: framework.TypeString,
Description: "[Required] address of the IPFS API to use",
},
"format": {
Type: framework.TypeString,
Default: "dag-pb",
Description: "format that the object will be added as",
},
"input-enc": {
Type: framework.TypeString,
Default: "json",
Description: "format that the input object will be",
},
"pin": {
Type: framework.TypeBool,
Default: true,
Description: "pin the object when added",
},
"hash": {
Type: framework.TypeString,
Default: "sha2-256",
Description: "multihash hashing algorithm to use",
},
}
func (b *backend) configPaths() []*framework.Path {
return []*framework.Path{
{
Pattern: "config",
HelpSynopsis: "Configures backend settings applied to all data",
Fields: configFields,
Callbacks: map[logical.Operation]framework.OperationFunc{
// logical.UpdateOperation: ,
// logical.ReadOperation: ,
},
},
}
}