make v1 a type alias of v2, add go.mod (#61)

* make v1 a type alias of v2

This commit supercedes #58 and follows #59, and is the second of two in a
series of commits to add Go module support to gax.

This commit makes v1 code type aliases of v2 code. This commit will be tagged
v1.0.1.

Reasoning for making type aliases:

Users are directly exposed to exported types in this package such as
CallOption. google-cloud-go will rely on v2 of gax, but a user's codebase is
still going to have the non-v2/ gax import paths.

We could:

- Make google-cloud-go rely on v2 and simultaneously create a v2 of
google-cloud-go. All existing users of google-cloud-go continue using v1 of
gax and v1 of google-cloud-go. All folks migrating to v2 of google-cloud-go
must go update their gax import paths to use /v2. (this is obviously
infeasible)
- Make all gax v1 types aliases of gax v2 types, and all v1 functions shadows
of v2 functions. That way, google-cloud-go can rely on v2 but a user can pass
either a v1 or v2 gax type.

* add missing newline

* Add go.mod
10 files changed
tree: d35d16f2fc6fbc966a937eee07e6c6c97864b10c
  1. .gitignore
  2. .travis.yml
  3. CODE_OF_CONDUCT.md
  4. CONTRIBUTING.md
  5. LICENSE
  6. README.md
  7. call_option.go
  8. gax.go
  9. go.mod
  10. go.sum
  11. header.go
  12. invoke.go
  13. v2/
README.md

Google API Extensions for Go

Build Status Code Coverage GoDoc

Google API Extensions for Go (gax-go) is a set of modules which aids the development of APIs for clients and servers based on gRPC and Google API conventions.

To install the API extensions, use:

go get -u github.com/googleapis/gax-go

Note: Application code will rarely need to use this library directly, but the code generated automatically from API definition files can use it to simplify code generation and to provide more convenient and idiomatic API surface.

Go Versions

This library requires Go 1.6 or above.

License

BSD - please see LICENSE for more information.