Hi all
I’ve generated a go file from proto file and hosts on https://gitlab.com/silentdata/identity-contract.
Then I tried to create a gRPC server as follows:
package main
import (
"context"
"gitlab.com/silentdata/identity-contract/proto"
)
type server struct {
}
func (s *server) SignUp(ctx context.Context, in *Registration) (*Identity, error) {
}
func main() {
}
But the compiler complains:
./main.go:5:2: imported and not used: "gitlab.com/silentdata/identity-contract/proto"
./main.go:12:50: undefined: Registration
./main.go:12:66: undefined: Identity
I am using go mod
to manage my modules and the folders are structured as follows:
The content of my go.mod
file
module identity-service
go 1.14
require (
github.com/golang/protobuf v1.3.4 // indirect
github.com/google/uuid v1.1.1 // indirect
github.com/labstack/echo/v4 v4.1.14 // indirect
github.com/mattn/go-isatty v0.0.12 // indirect
gitlab.com/silentdata/identity-contract v0.1.2
golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d // indirect
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b // indirect
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae // indirect
google.golang.org/grpc v1.27.1 // indirect
)
What am I doing wrong?
Thanks