tests/

directory
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2018 License: BSD-3-Clause

README

Examples

This directory has examples of how to use protoc-gen-persist, what is generated, and the rules when constructing the protobuf definitions. There are 4 sub-directories in this directory. 3 of which are important:

  • mytime this is an example go lib for custom type mapping of protobuf types
  • sql contains examples of generated sql code, and example service implementations
  • spanner container of our generated spanner code, and example service implementations. Spanner sql queries are different than sql queries and have several limitations compared to normal sql queries. This differences are explained in the examples

Each of the sub-directories in the sql, and spanner assume you ran the protoc commands:

  • protoc -I/usr/local/include -I. -I$GOPATH/src --go_out=plugins=grpc:. ./name_of_proto.proto
  • protoc -I/usr/local/include -I. -I$GOPATH/src --persist_out=plugins=protoc-gen-persist:. ./name_of_proto.proto

in each of the directories to generate the code from the proto files. The files are commented explaining what will be generated from the proto files, but you should read the documentation for a more detailed walkthrough

Directories

Path Synopsis
spanner
basic
Package basic is a generated protocol buffer package.
Package basic is a generated protocol buffer package.
bob_example
Package bob_example is a generated protocol buffer package.
Package bob_example is a generated protocol buffer package.
import_tests
Package import_tests is a generated protocol buffer package.
Package import_tests is a generated protocol buffer package.
import_tests/service
This file is generated by protoc-gen-persist Source File: examples/spanner/import_tests/persist_and_go.proto DO NOT EDIT !
This file is generated by protoc-gen-persist Source File: examples/spanner/import_tests/persist_and_go.proto DO NOT EDIT !
sql
basic
Package basic is a generated protocol buffer package.
Package basic is a generated protocol buffer package.
little_of_everything
Package little_of_everything is a generated protocol buffer package.
Package little_of_everything is a generated protocol buffer package.
Package test is a generated protocol buffer package.
Package test is a generated protocol buffer package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL