package
Version:
v0.0.0-...-4685c53
Opens a new window with list of versions in this module.
Published: Oct 23, 2022
License: Apache-2.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package config parses configuration files
Currently it parses a set of JSON files. The format is:
{
"resource": "<name of plugin>",
"label": "<label for resource>",
....
}
The fields names should be strings, and the field values are
interpreted as follows:
true, false: boolean
123: integer
123.456: float
"10s": duration
"hello": string
["a", "b", "c"]: list
{"a": 1, "b": 2}: map
func ParseJSONResource(filesys fs.FS, resource Resource, proto TaskPlugin) (TaskPlugin, error)
ParseJSONResource will return a TaskPlugin given a resource and a prototype
type Resource struct {
Name string `json:"resource"`
Label string `json:"label"`
Path string `json:"-"`
}
LoadJSONForPattern returns resources for a pattern of JSON files
Source Files
¶
Click to show internal directories.
Click to hide internal directories.