From 2d42a5d16b81be58911024d8f6f84a24ceac03e4 Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Wed, 12 Jan 2022 13:15:16 +0100 Subject: [PATCH] graph: Add missing methods to Service Interface --- graph/pkg/service/v0/instrument.go | 12 +++++++++++- graph/pkg/service/v0/logging.go | 10 ++++++++++ graph/pkg/service/v0/service.go | 2 ++ graph/pkg/service/v0/tracing.go | 10 ++++++++++ 4 files changed, 33 insertions(+), 1 deletion(-) diff --git a/graph/pkg/service/v0/instrument.go b/graph/pkg/service/v0/instrument.go index 878945f786f..aeb9106f56e 100644 --- a/graph/pkg/service/v0/instrument.go +++ b/graph/pkg/service/v0/instrument.go @@ -34,7 +34,17 @@ func (i instrument) GetUsers(w http.ResponseWriter, r *http.Request) { i.next.GetUsers(w, r) } -// GetUsers implements the Service interface. +// GetUser implements the Service interface. func (i instrument) GetUser(w http.ResponseWriter, r *http.Request) { i.next.GetUser(w, r) } + +// PostUser implements the Service interface. +func (i instrument) PostUser(w http.ResponseWriter, r *http.Request) { + i.next.PostUser(w, r) +} + +// DeleteUser implements the Service interface. +func (i instrument) DeleteUser(w http.ResponseWriter, r *http.Request) { + i.next.DeleteUser(w, r) +} diff --git a/graph/pkg/service/v0/logging.go b/graph/pkg/service/v0/logging.go index 124a54cf3b5..2c1a10e17a2 100644 --- a/graph/pkg/service/v0/logging.go +++ b/graph/pkg/service/v0/logging.go @@ -38,3 +38,13 @@ func (l logging) GetUsers(w http.ResponseWriter, r *http.Request) { func (l logging) GetUser(w http.ResponseWriter, r *http.Request) { l.next.GetUser(w, r) } + +// PostUser implements the Service interface. +func (l logging) PostUser(w http.ResponseWriter, r *http.Request) { + l.next.PostUser(w, r) +} + +// DeleteUser implements the Service interface. +func (l logging) DeleteUser(w http.ResponseWriter, r *http.Request) { + l.next.DeleteUser(w, r) +} diff --git a/graph/pkg/service/v0/service.go b/graph/pkg/service/v0/service.go index 004d3689243..59a2c2f30c6 100644 --- a/graph/pkg/service/v0/service.go +++ b/graph/pkg/service/v0/service.go @@ -18,6 +18,8 @@ type Service interface { GetMe(http.ResponseWriter, *http.Request) GetUsers(http.ResponseWriter, *http.Request) GetUser(http.ResponseWriter, *http.Request) + PostUser(http.ResponseWriter, *http.Request) + DeleteUser(http.ResponseWriter, *http.Request) } // NewService returns a service implementation for Service. diff --git a/graph/pkg/service/v0/tracing.go b/graph/pkg/service/v0/tracing.go index 64cbc9708f3..27bbeb817bc 100644 --- a/graph/pkg/service/v0/tracing.go +++ b/graph/pkg/service/v0/tracing.go @@ -34,3 +34,13 @@ func (t tracing) GetUsers(w http.ResponseWriter, r *http.Request) { func (t tracing) GetUser(w http.ResponseWriter, r *http.Request) { t.next.GetUser(w, r) } + +// PostUser implements the Service interface. +func (t tracing) PostUser(w http.ResponseWriter, r *http.Request) { + t.next.PostUser(w, r) +} + +// DeleteUser implements the Service interface. +func (t tracing) DeleteUser(w http.ResponseWriter, r *http.Request) { + t.next.DeleteUser(w, r) +}