package konghcl
import "github.com/alecthomas/kong-hcl"
Index ¶
- Variables
- func Loader(r io.Reader) (kong.ResolverFunc, error)
- type Block
- type Bool
- type Config
- type Entry
- type Value
Variables ¶
var Parser = participle.MustBuild(&Config{})
Parser for HCL.
Functions ¶
func Loader ¶
func Loader(r io.Reader) (kong.ResolverFunc, error)
Loader is a Kong configuration loader for HCL.
Types ¶
type Block ¶
A Block is a group of HCL entries.
func (*Block) Find ¶
type Bool ¶
type Bool bool
A Bool value.
func (*Bool) Capture ¶
type Config ¶
type Config struct { Entries []*Entry `{ @@ }` }
Config is the root configuration structure.
func (*Config) Find ¶
type Entry ¶
type Entry struct { Key string `@( Ident { "-" Ident } )` Value *Value `( "=" @@` Block *Block `| @@ )` }
An Entry in a HCL block.
func (*Entry) Find ¶
type Value ¶
type Value struct { Boolean *Bool ` @("true"|"false")` Identifier *string `| @( Ident { "-" Ident } { "." Ident { "-" Ident } } )` Str *string `| @(String|Char|RawString)` Number *float64 `| @(Float|Int)` Array []*Value `| "[" { @@ [ "," ] } "]"` }
A Value for a key in HCL.
func (*Value) GoString ¶
func (*Value) String ¶
Source Files ¶
- Version
- v0.1.3
- Published
- Sep 13, 2018
- Platform
- js/wasm
- Imports
- 5 packages
- Last checked
- now –
Tools for package owners.