Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 1.42 KB

README.md

File metadata and controls

41 lines (29 loc) · 1.42 KB

KVAL-Parse

Build Status GoDoc Go Report Card

Parser written in Golang for a simple key value access language.

Key Value Access Language

I have created a modest specification for a key value access langauge. It allows for input and access of values to a key value store such as Golang's BoltDB.

The language specification: https://github.com/kval-access-language/KVAL

Usage

Import the library and run the Parse function() e.g:

var query "GET Bucket One >> Bucket Two >>>> Requested Key"
kq, err := kvalparse.Parse(query)
if err != nil {
   return kr, err
}

If we find an error we have an invalid query. Results are returned in a query structure:

type KQUERY struct { 
   Function Token
   Buckets []string  
   Key string
   Value string
   Newname string
   Regex bool
}

License

GPL Version 3: https://github.com/kval-access-language/KVAL-BoltDB/blob/master/LICENSE