From d3d9460f6440005ca971a20f2f601f9d13aebd48 Mon Sep 17 00:00:00 2001 From: Adam Chalmers Date: Fri, 2 Aug 2019 10:21:09 -0500 Subject: [PATCH] TUN-2125: Add PostgresType() to Scope --- 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 3fac43fa..d873e632 100644 --- a/tunnelrpc/pogs/tunnelrpc.go +++ b/tunnelrpc/pogs/tunnelrpc.go @@ -131,6 +131,7 @@ func UnmarshalServerInfo(s tunnelrpc.ServerInfo) (*ServerInfo, error) { //go-sumtype:decl Scope type Scope interface { Value() string + PostgresType() string isScope() } @@ -142,7 +143,8 @@ func NewSystemName(systemName string) *SystemName { return &SystemName{systemName: systemName} } -func (s *SystemName) Value() string { return s.systemName } +func (s *SystemName) Value() string { return s.systemName } +func (s *SystemName) PostgresType() string { return "system_name" } func (_ *SystemName) isScope() {} @@ -154,7 +156,8 @@ func NewGroup(group string) *Group { return &Group{group: group} } -func (g *Group) Value() string { return g.group } +func (g *Group) Value() string { return g.group } +func (g *Group) PostgresType() string { return "group" } func (_ *Group) isScope() {}