From c3d82e7f253554155a6c5e98a40b10b6a057af99 Mon Sep 17 00:00:00 2001
From: Manuel Kieweg <manuel.kieweg@h-da.de>
Date: Thu, 6 May 2021 14:55:03 +0200
Subject: [PATCH] add grpc client/server skeleton

---
 go.mod               |  1 +
 go.sum               |  2 ++
 northbound/client.go |  1 +
 northbound/server.go | 43 +++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 47 insertions(+)
 create mode 100644 northbound/client.go
 create mode 100644 northbound/server.go

diff --git a/go.mod b/go.mod
index 8e06b5944..2ac11d048 100644
--- a/go.mod
+++ b/go.mod
@@ -3,6 +3,7 @@ module code.fbi.h-da.de/cocsn/gosdn
 go 1.14
 
 require (
+	code.fbi.h-da.de/cocsn/api v0.0.0-20210504143911-bdf77e6fac5b
 	code.fbi.h-da.de/cocsn/yang-models v0.0.7
 	github.com/aristanetworks/goarista v0.0.0-20201120222254-94a892eb0c6a
 	github.com/golang/protobuf v1.5.0
diff --git a/go.sum b/go.sum
index 611ef2822..3973ea97a 100644
--- a/go.sum
+++ b/go.sum
@@ -21,6 +21,8 @@ cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIA
 cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
 cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
 cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
+code.fbi.h-da.de/cocsn/api v0.0.0-20210504143911-bdf77e6fac5b h1:lWNT0sjX54rCJeRIQwbiCersboHfktJeStwmS0EftbQ=
+code.fbi.h-da.de/cocsn/api v0.0.0-20210504143911-bdf77e6fac5b/go.mod h1:E6nKMGt53n5w/EEqIjUZFS0ttJWvPm3pACzadZcYH/k=
 code.fbi.h-da.de/cocsn/yang-models v0.0.7 h1:3TOo8J+EdAJKeq4o3aaNWZRhjSwguIS8wciW1U9PkSk=
 code.fbi.h-da.de/cocsn/yang-models v0.0.7/go.mod h1:M+2HinfhTT8nA8qvn2cpWNlOtuiizTNDWA3yfy72K/g=
 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
diff --git a/northbound/client.go b/northbound/client.go
new file mode 100644
index 000000000..040295490
--- /dev/null
+++ b/northbound/client.go
@@ -0,0 +1 @@
+package northbound
diff --git a/northbound/server.go b/northbound/server.go
new file mode 100644
index 000000000..75d6bdcc0
--- /dev/null
+++ b/northbound/server.go
@@ -0,0 +1,43 @@
+package northbound
+
+import (
+	"code.fbi.h-da.de/cocsn/api/proto/gosdn"
+	"code.fbi.h-da.de/cocsn/api/proto/gosdn/pnd"
+	"context"
+)
+
+type pndServer struct {
+	pnd.UnimplementedPndServer
+}
+
+func (p pndServer) Get(ctx context.Context, request *pnd.GetRequest) (*pnd.GetResponse, error) {
+	panic("implement me")
+}
+
+func (p pndServer) Set(ctx context.Context, request *pnd.SetRequest) (*pnd.SetResponse, error) {
+	panic("implement me")
+}
+
+type gosdnServer struct {
+	gosdn.UnimplementedGosdnServer
+}
+
+func (s gosdnServer) Get(ctx context.Context, request *gosdn.GetRequest) (*gosdn.GetResponse, error) {
+	panic("implement me")
+}
+
+func (s gosdnServer) Set(ctx context.Context, request *gosdn.SetRequest) (*gosdn.SetResponse, error) {
+	panic("implement me")
+}
+
+func NewServer() *Server {
+	return &Server{
+		Pnd:        &pndServer{},
+		Controller: &gosdnServer{},
+	}
+}
+
+type Server struct {
+	Pnd        *pndServer
+	Controller *gosdnServer
+}
-- 
GitLab