From 28f6c2ed7c5a743c38a32a0423916804172fe797 Mon Sep 17 00:00:00 2001 From: Chung-Ting Huang Date: Sun, 11 Aug 2019 12:18:54 -0500 Subject: [PATCH] TUN-2163: Add GrapQLType method to Scope interface --- tunnelrpc/pogs/tunnelrpc.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tunnelrpc/pogs/tunnelrpc.go b/tunnelrpc/pogs/tunnelrpc.go index d873e632..94bc87c2 100644 --- a/tunnelrpc/pogs/tunnelrpc.go +++ b/tunnelrpc/pogs/tunnelrpc.go @@ -132,6 +132,7 @@ func UnmarshalServerInfo(s tunnelrpc.ServerInfo) (*ServerInfo, error) { type Scope interface { Value() string PostgresType() string + GraphQLType() string isScope() } @@ -144,7 +145,8 @@ func NewSystemName(systemName string) *SystemName { } func (s *SystemName) Value() string { return s.systemName } -func (s *SystemName) PostgresType() string { return "system_name" } +func (_ *SystemName) PostgresType() string { return "system_name" } +func (_ *SystemName) GraphQLType() string { return "SYSTEM_NAME" } func (_ *SystemName) isScope() {} @@ -157,7 +159,8 @@ func NewGroup(group string) *Group { } func (g *Group) Value() string { return g.group } -func (g *Group) PostgresType() string { return "group" } +func (_ *Group) PostgresType() string { return "group" } +func (_ *Group) GraphQLType() string { return "GROUP" } func (_ *Group) isScope() {}