Move roveapi into the proto dir

This commit is contained in:
Marc Di Luzio 2020-07-10 19:00:31 +01:00
parent 46f81abbd7
commit 737534f739
10 changed files with 14 additions and 18 deletions

View file

@ -12,14 +12,10 @@ install:
gen:
@echo Installing go dependencies
go install \
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway \
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger \
github.com/golang/protobuf/protoc-gen-go
go install github.com/golang/protobuf/protoc-gen-go
go mod download
@echo Generating rove server gRPC and gateway
protoc --proto_path proto --go_out=plugins=grpc,paths=source_relative:pkg/ proto/roveapi/roveapi.proto
protoc --proto_path proto --grpc-gateway_out=paths=source_relative:pkg/ proto/roveapi/roveapi.proto
@echo Generating rove server gRPC
protoc --proto_path proto --go_out=plugins=grpc,paths=source_relative:proto/ proto/roveapi/roveapi.proto
test:
@echo Unit tests

View file

@ -6,8 +6,8 @@ import (
"log"
"github.com/mdiluz/rove/pkg/rove"
"github.com/mdiluz/rove/pkg/roveapi"
"github.com/mdiluz/rove/pkg/version"
"github.com/mdiluz/rove/proto/roveapi"
)
// ServerStatus returns the status of the current server to a gRPC request

View file

@ -8,7 +8,7 @@ import (
"github.com/mdiluz/rove/pkg/persistence"
"github.com/mdiluz/rove/pkg/rove"
"github.com/mdiluz/rove/pkg/roveapi"
"github.com/mdiluz/rove/proto/roveapi"
"github.com/robfig/cron"
"google.golang.org/grpc"
)

View file

@ -12,8 +12,8 @@ import (
"github.com/mdiluz/rove/pkg/atlas"
"github.com/mdiluz/rove/pkg/maths"
"github.com/mdiluz/rove/pkg/roveapi"
"github.com/mdiluz/rove/pkg/version"
"github.com/mdiluz/rove/proto/roveapi"
"golang.org/x/net/context"
"google.golang.org/grpc"
)

View file

@ -1,6 +1,6 @@
package rove
import "github.com/mdiluz/rove/pkg/roveapi"
import "github.com/mdiluz/rove/proto/roveapi"
// Command represends a single command to execute
type Command struct {

View file

@ -4,7 +4,7 @@ import (
"testing"
"github.com/mdiluz/rove/pkg/maths"
"github.com/mdiluz/rove/pkg/roveapi"
"github.com/mdiluz/rove/proto/roveapi"
"github.com/stretchr/testify/assert"
)

View file

@ -11,7 +11,7 @@ import (
"github.com/google/uuid"
"github.com/mdiluz/rove/pkg/atlas"
"github.com/mdiluz/rove/pkg/maths"
"github.com/mdiluz/rove/pkg/roveapi"
"github.com/mdiluz/rove/proto/roveapi"
)
// World describes a self contained universe and everything in it

View file

@ -5,7 +5,7 @@ import (
"github.com/mdiluz/rove/pkg/atlas"
"github.com/mdiluz/rove/pkg/maths"
"github.com/mdiluz/rove/pkg/roveapi"
"github.com/mdiluz/rove/proto/roveapi"
"github.com/stretchr/testify/assert"
)

View file

@ -1113,10 +1113,10 @@ var file_roveapi_roveapi_proto_rawDesc = []byte{
0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x53,
0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x72,
0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75,
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x64, 0x69, 0x6c, 0x75, 0x7a, 0x2f, 0x72, 0x6f, 0x76,
0x65, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View file

@ -5,7 +5,7 @@ syntax = "proto3";
// Rove is an asychronous nomadic game about exploring a planet as part of a
// loose community
package roveapi;
option go_package = "github.com/mdiluz/rove/pkg/roveapi";
option go_package = "github.com/mdiluz/rove/proto/roveapi";
// The Rove server hosts a single game session and world with multiple players
service Rove {