Move roveapi into the proto dir
This commit is contained in:
parent
46f81abbd7
commit
737534f739
10 changed files with 14 additions and 18 deletions
10
Makefile
10
Makefile
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
@ -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 (
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue