项目作者: rikonor

项目描述 :
Go client for Tarantool Avro validation
高级语言: Go
项目地址: git://github.com/rikonor/go-tarantool-client.git
创建时间: 2017-01-26T04:18:02Z
项目社区:https://github.com/rikonor/go-tarantool-client

开源协议:MIT License

下载


Go Tarantool Client

This is a simple client to query the online Tarantool avro validation endpoint.

Usage

  1. package main
  2. import (
  3. "log"
  4. tarantool "github.com/rikonor/go-tarantool-client"
  5. )
  6. func main() {
  7. schema := `{
  8. "type": "record",
  9. "name": "User",
  10. "fields": [
  11. {"name": "username", "type": "array"},
  12. {"name": "phone", "type": "long"},
  13. {"name": "age", "type": "int"}
  14. ]
  15. }`
  16. if err := tarantool.Validate(schema); err != nil {
  17. log.Fatalf("Schema did not pass validation: %s", err)
  18. }
  19. }