Registry / config / juju-schema

juju-schema

JSON →
library1.2.0gogounverified

Package schema provides a way to define and validate configuration schemas for Juju charms.

go get github.com/juju/schema
INSTALL
IMPORT
SIG · JUJU-SCHEMA
J
juju-schema
configgov1.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

schema
github.com/juju/schema

Define and validate a configuration schema

package main import ( "fmt" "github.com/juju/schema" ) func main() { fields := schema.Fields{ "name": schema.String(), } defaults := schema.Defaults{ "name": "default", } checker := schema.FieldMap(fields, defaults) result, err := checker.Coerce(map[string]interface{}{"name": "test"}, nil, nil) if err != nil { fmt.Println(err) return } fmt.Println(result) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.2.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
23 hits · last 30 days
node
22
Resources
juju-schema — go get juju-schema · libregistry