From 08736dd0f8c6106c0837e5415cbe7bedf50957cf Mon Sep 17 00:00:00 2001 From: Tit Petric Date: Wed, 29 Aug 2018 17:22:01 +0200 Subject: [PATCH] add(auth): TokenEncoder interface parth of auth pkg --- auth/auth.go | 5 ----- auth/interfaces.go | 12 ++++++++++++ 2 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 auth/interfaces.go diff --git a/auth/auth.go b/auth/auth.go index 2742592f2..506fc42ce 100644 --- a/auth/auth.go +++ b/auth/auth.go @@ -1,11 +1,6 @@ package auth type ( - Identifiable interface { - Identity() uint64 - Valid() bool - } - Identity struct { identity uint64 } diff --git a/auth/interfaces.go b/auth/interfaces.go new file mode 100644 index 000000000..ad10152cc --- /dev/null +++ b/auth/interfaces.go @@ -0,0 +1,12 @@ +package auth + +type ( + Identifiable interface { + Identity() uint64 + Valid() bool + } + + TokenEncoder interface { + Encode(identity Identifiable) string + } +)