From 103d9b8c3a42cd8a219eb4c28e18166984a13b27 Mon Sep 17 00:00:00 2001 From: Benjamin Wenger <ben@elixxir.ioo> Date: Tue, 27 Oct 2020 14:23:09 -0700 Subject: [PATCH] fixed import cycle --- interfaces/auth.go | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/interfaces/auth.go b/interfaces/auth.go index 836ba0cf9..04751e896 100644 --- a/interfaces/auth.go +++ b/interfaces/auth.go @@ -1,35 +1,38 @@ package interfaces import ( - "gitlab.com/elixxir/client/auth" + "gitlab.com/elixxir/client/interfaces/contact" "gitlab.com/xx_network/primitives/id" ) +type RequestCallback func(requestor contact.Contact, message string) +type ConfirmCallback func(partner contact.Contact) + type Auth interface { // Adds a general callback to be used on auth requests. This will be preempted // by any specific callback - AddGeneralRequestCallback(cb auth.RequestCallback) + AddGeneralRequestCallback(cb RequestCallback) // Adds a general callback to be used on auth requests. This will not be // preempted by any specific callback. It is recommended that the specific // callbacks are used, this is primarily for debugging. - AddOverrideRequestCallback(cb auth.RequestCallback) + AddOverrideRequestCallback(cb RequestCallback) // Adds a specific callback to be used on auth requests. This will preempt a // general callback, meaning the request will be heard on this callback and not // the general. Request will still be heard on override callbacks. - AddSpecificRequestCallback(id *id.ID, cb auth.RequestCallback) + AddSpecificRequestCallback(id *id.ID, cb RequestCallback) // Removes a specific callback to be used on auth requests. RemoveSpecificRequestCallback(id *id.ID) // Adds a general callback to be used on auth confirms. This will be preempted // by any specific callback - AddGeneralConfirmCallback(cb auth.ConfirmCallback) + AddGeneralConfirmCallback(cb ConfirmCallback) // Adds a general callback to be used on auth confirms. This will not be // preempted by any specific callback. It is recommended that the specific // callbacks are used, this is primarily for debugging. - AddOverrideConfirmCallback(cb auth.ConfirmCallback) + AddOverrideConfirmCallback(cb ConfirmCallback) // Adds a specific callback to be used on auth confirms. This will preempt a // general callback, meaning the request will be heard on this callback and not // the general. Request will still be heard on override callbacks. - AddSpecificConfirmCallback(id *id.ID, cb auth.ConfirmCallback) + AddSpecificConfirmCallback(id *id.ID, cb ConfirmCallback) // Removes a specific callback to be used on auth confirm. RemoveSpecificConfirmCallback(id *id.ID) } -- GitLab