Upgrade minimum Go version to 1.18
Upgrade the minimum Go version to 1.18. This is partly to support
generics and partly just to get new stdlib and golang.org/x functions.
Minor touch-ups, relicense for convenience
Minor touch-ups to the code here.
- Add a README. The README is pretty rough right now.
- Add strict unmarshaling of JSON and YAML to catch key typos. This was
especially annoying for YAML since it required additional struct tags
to get it lined up with JSON.
- Add YAML struct tags to everything. These may go away, need to see if
codf will actually work for this.
- Add Makefile, borrowed from go.spiff.io/sql.
- Relicense under the Apache 2.0 license. This is mainly for
convenience and to avoid unnecessary attachment to the FSF.
Add TODO
Add TODO list because it's Sunday night and I will forget all of this
by next weekend.
Add log level flag (-v)
Add a log level flag because it was irking me that I couldn't set it.
Add YAML support, handler implementation
Further information on this to be written.
YAML is added as an alternative to JSON (the two are independently
supported because they're incompatible) because it's a little
unfortunate having to type a lot of string literals and escape them
inside of gojq expressions. YAML's multi-line string literals are
a minor improvement over this, but have the trade-off of being YAML.
Add config validation, restructure endpoints
Add some initial config validation. It's incompete, but this lets me
get the changes over to another machine where I can continue fiddling
with it.
Restructure endpoints to allow definition of multiple transactions with
different isolation levels. This is specifically to make it easier to
control transactions per-endpoint, since previously it wasn't clear how
transactions worked (i.e., is one started per-database when the query
is hit, are they on-demand, what if one doesn't need isolation
/ a transaction?).
Also adds some initial scratch database types and imports the drivers
from go.spiff.io/sql for use with database setup.
Includes a testing config.json. To be removed later.
Exit when config parsing fails
Forgot to exit when config parsing fails.
Fix description in license header
Clean up a few TODOs
- Map path and query parameters using the configured expressions.
- Add loggers to base request context.
Initial commit
Initial commit of chisel. Doesn't do anything yet, just setting up
config, serving, and some basics.