feat: init API go module (#10600)

* feat: init api module

* add script

* update cosmos-proto
This commit is contained in:
Aaron Craelius 2021-11-23 13:20:56 -05:00 committed by GitHub
parent 68ee1c477f
commit d03469165a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 4690 additions and 4 deletions

9
api/buf.gen.yaml Normal file
View File

@ -0,0 +1,9 @@
version: v1
managed:
enabled: true
go_package_prefix:
default: github.com/cosmos/cosmos-sdk/api
plugins:
- name: go-pulsar
out: .
opt: paths=source_relative

13
api/buf.yaml Normal file
View File

@ -0,0 +1,13 @@
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
- COMMENTS
- FILE_LOWER_SNAKE_CASE
except:
- SERVICE_SUFFIX
- PACKAGE_VERSION_SUFFIX
- RPC_REQUEST_STANDARD_NAME

View File

@ -4,8 +4,6 @@ package cosmos.orm.v1alpha1;
import "google/protobuf/descriptor.proto";
option go_package = "github.com/cosmos/cosmos-sdk/orm/types/ormpb";
extend google.protobuf.MessageOptions {
// table specifies that this message will be used as an ORM table. It cannot

File diff suppressed because it is too large Load Diff

View File

@ -4,8 +4,6 @@ package cosmos.orm.v1alpha1;
import "google/protobuf/descriptor.proto";
option go_package = "github.com/cosmos/cosmos-sdk/orm/types/ormpb";
// SchemaDescriptor describes an ORM schema that contains all the information
// needed for a dynamic client to decode the stored data.
message SchemaDescriptor {

File diff suppressed because it is too large Load Diff

8
api/go.mod Normal file
View File

@ -0,0 +1,8 @@
module github.com/cosmos/cosmos-sdk/api
go 1.17
require (
github.com/cosmos/cosmos-proto v1.0.0-alpha1
google.golang.org/protobuf v1.27.1
)

20
api/go.sum Normal file
View File

@ -0,0 +1,20 @@
github.com/cosmos/cosmos-proto v0.0.0-20211123144845-528f5002c9f8 h1:JOVLjm4qgBMnjZIciFqfFMzeIIuJTOXdlpzJdvXQbVA=
github.com/cosmos/cosmos-proto v0.0.0-20211123144845-528f5002c9f8/go.mod h1:msdDWOvfStHLG+Z2y2SJ0dcqimZ2vc8M1MPnZ4jOF7U=
github.com/cosmos/cosmos-proto v1.0.0-alpha1 h1:1taNmovbd2WlO6zfaJTRhQ21DjWROiepfWbiDDLKMWQ=
github.com/cosmos/cosmos-proto v1.0.0-alpha1/go.mod h1:msdDWOvfStHLG+Z2y2SJ0dcqimZ2vc8M1MPnZ4jOF7U=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.27.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
pgregory.net/rapid v0.4.7/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU=

View File

@ -5,5 +5,6 @@
# previous "buf.yaml" configuration.
version: v1
directories:
- api
- proto
- third_party/proto

8
scripts/protocgen-api.sh Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
# this script generates the new API go module using pulsar
set -eo pipefail
cd api
buf generate .