Skip to content
Snippets Groups Projects
Select Git revision
  • d98b45a8bcec94fc648a3a79ef10854182f1665e
  • release default
  • 11-22-implement-kv-interface-defined-in-collectiveversionedkvgo
  • master protected
  • XX-4688/DbEncoding
  • hotfix/update
  • @XX-4682/Files
  • hotfix/XX-4655
  • dev protected
  • project/HavenNotifications
  • XX-4602/SilentMessageType
  • jono/npmTest
  • wasmTest2
  • XX-4461/FileUpload
  • XX-4505/blockuser
  • XX-4441
  • Jakub/Emoji-CI-Test
  • testing/websockets
  • fastReg
  • fast-registration
  • NewHostPool
  • v0.3.22
  • v0.3.21
  • v0.3.20
  • v0.3.18
  • v0.3.17
  • v0.3.16
  • v0.3.15
  • v0.3.14
  • v0.3.13
  • v0.3.12
  • v0.3.11
  • v0.3.10
  • v0.3.9
  • v0.3.8
  • v0.3.7
  • v0.3.6
  • v0.3.5
  • v0.3.4
  • 812b395df518ce096d01d5292596ca26f8fe92d9c4487ddfa515e190a51aa1a1
  • 76ba08e2dfa1798412a265404fa271840b52c035869111fce8e8cdb23a036a5a
41 results

version_test.go

Blame
  • auth.go 2.28 KiB
    ///////////////////////////////////////////////////////////////////////////////
    // Copyright © 2020 xx network SEZC                                          //
    //                                                                           //
    // Use of this source code is governed by a license that can be found in the //
    // LICENSE file                                                              //
    ///////////////////////////////////////////////////////////////////////////////
    
    package interfaces
    
    import (
    	"gitlab.com/elixxir/crypto/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 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 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 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 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 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 ConfirmCallback)
    	// Removes a specific callback to be used on auth confirm.
    	RemoveSpecificConfirmCallback(id *id.ID)
    }