Skip to content

Commit

Permalink
graph: Add missing methods to Service Interface
Browse files Browse the repository at this point in the history
  • Loading branch information
rhafer committed Jan 12, 2022
1 parent c20ff80 commit 2d42a5d
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
12 changes: 11 additions & 1 deletion graph/pkg/service/v0/instrument.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
10 changes: 10 additions & 0 deletions graph/pkg/service/v0/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
2 changes: 2 additions & 0 deletions graph/pkg/service/v0/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 10 additions & 0 deletions graph/pkg/service/v0/tracing.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit 2d42a5d

Please sign in to comment.