Skip to content
Snippets Groups Projects
Select Git revision
  • 0675ae6934015288bcd5a5d3bfecf2f821c84dc3
  • release default protected
  • 11-22-implement-kv-interface-defined-in-collectiveversionedkvgo
  • hotfix/TestHostPool_UpdateNdf_AddFilter
  • XX-4719/announcementChannels
  • xx-4717/logLevel
  • jonah/noob-channel
  • master protected
  • XX-4707/tagDiskJson
  • xx-4698/notification-retry
  • hotfix/notifylockup
  • syncNodes
  • hotfix/localCB
  • XX-4677/NewChanManagerMobile
  • XX-4689/DmSync
  • duplicatePrefix
  • XX-4601/HavenInvites
  • finalizedUICallbacks
  • XX-4673/AdminKeySync
  • debugNotifID
  • anne/test
  • v4.7.5
  • v4.7.4
  • v4.7.3
  • v4.7.2
  • v4.7.1
  • v4.6.3
  • v4.6.1
  • v4.5.0
  • v4.4.4
  • v4.3.11
  • v4.3.8
  • v4.3.7
  • v4.3.6
  • v4.3.5
  • v4.2.0
  • v4.3.0
  • v4.3.4
  • v4.3.3
  • v4.3.2
  • v4.3.1
41 results

interface.go

Blame
  • session_test.go 4.33 KiB
    ////////////////////////////////////////////////////////////////////////////////
    // Copyright © 2022 xx foundation                                             //
    //                                                                            //
    // Use of this source code is governed by a license that can be found in the  //
    // LICENSE file.                                                              //
    ////////////////////////////////////////////////////////////////////////////////
    
    package groupChat
    
    import (
    	"gitlab.com/elixxir/client/storage"
    	"gitlab.com/elixxir/client/storage/user"
    	"gitlab.com/elixxir/client/storage/versioned"
    	"gitlab.com/elixxir/crypto/cyclic"
    	"gitlab.com/elixxir/ekv"
    	"gitlab.com/elixxir/primitives/version"
    	"gitlab.com/xx_network/crypto/signature/rsa"
    	"gitlab.com/xx_network/primitives/id"
    	"gitlab.com/xx_network/primitives/ndf"
    	"time"
    )
    
    // mockSession is a storage.Session implementation for testing.
    type mockSession struct {
    	kv *versioned.KV
    }
    
    func newMockSesion(kv *versioned.KV) storage.Session {
    	return mockSession{kv: kv}
    }
    
    func (m mockSession) GetE2EGroup() *cyclic.Group {
    	return getGroup()
    }
    
    func (m mockSession) GetKV() *versioned.KV {
    	if m.kv != nil {
    		return m.kv
    	}
    
    	return versioned.NewKV(ekv.MakeMemstore())
    }
    
    /////////////////////////////////////////////////////////////////////////////////////
    // Unused & unimplemented methods of the test object ////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////
    
    func (m mockSession) GetClientVersion() version.Version {
    	//TODO implement me
    	panic("implement me")
    }
    
    func (m mockSession) Get(key string) (*versioned.Object, error) {
    	//TODO implement me
    	panic("implement me")
    }
    
    func (m mockSession) Set(key string, object *versioned.Object) error {
    	//TODO implement me
    	panic("implement me")
    }
    
    func (m mockSession) Delete(key string) error {
    	//TODO implement me
    	panic("implement me")
    }
    
    func (m mockSession) GetCmixGroup() *cyclic.Group {
    	//TODO implement me
    	panic("implement me")
    }
    
    func (m mockSession) ForwardRegistrationStatus(regStatus storage.RegistrationStatus) error {
    	//TODO implement me
    	panic("implement me")
    }
    
    func (m mockSession) GetRegistrationStatus() storage.RegistrationStatus {
    	//TODO implement me
    	panic("implement me")
    }
    
    func (m mockSession) SetRegCode(regCode string) {
    	//TODO implement me
    	panic("implement me")
    }
    
    func (m mockSession) GetRegCode() (string, error) {
    	//TODO implement me
    	panic("implement me")
    }
    
    func (m mockSession) SetNDF(def *ndf.NetworkDefinition) {
    	//TODO implement me
    	panic("implement me")
    }
    
    func (m mockSession) GetNDF() *ndf.NetworkDefinition {
    	//TODO implement me
    	panic("implement me")
    }
    
    func (m mockSession) GetTransmissionID() *id.ID {
    	//TODO implement me
    	panic("implement me")
    }
    
    func (m mockSession) GetTransmissionSalt() []byte {
    	//TODO implement me
    	panic("implement me")
    }
    
    func (m mockSession) GetReceptionID() *id.ID {
    	//TODO implement me
    	panic("implement me")
    }
    
    func (m mockSession) GetReceptionSalt() []byte {
    	//TODO implement me
    	panic("implement me")
    }
    
    func (m mockSession) GetReceptionRSA() *rsa.PrivateKey {
    	//TODO implement me
    	panic("implement me")
    }
    
    func (m mockSession) GetTransmissionRSA() *rsa.PrivateKey {
    	//TODO implement me
    	panic("implement me")
    }
    
    func (m mockSession) IsPrecanned() bool {
    	//TODO implement me
    	panic("implement me")
    }
    
    func (m mockSession) SetUsername(username string) error {
    	//TODO implement me
    	panic("implement me")
    }
    
    func (m mockSession) GetUsername() (string, error) {
    	//TODO implement me
    	panic("implement me")
    }
    
    func (m mockSession) PortableUserInfo() user.Info {
    	//TODO implement me
    	panic("implement me")
    }
    
    func (m mockSession) GetTransmissionRegistrationValidationSignature() []byte {
    	//TODO implement me
    	panic("implement me")
    }
    
    func (m mockSession) GetReceptionRegistrationValidationSignature() []byte {
    	//TODO implement me
    	panic("implement me")
    }
    
    func (m mockSession) GetRegistrationTimestamp() time.Time {
    	//TODO implement me
    	panic("implement me")
    }
    
    func (m mockSession) SetTransmissionRegistrationValidationSignature(b []byte) {
    	//TODO implement me
    	panic("implement me")
    }
    
    func (m mockSession) SetReceptionRegistrationValidationSignature(b []byte) {
    	//TODO implement me
    	panic("implement me")
    }
    
    func (m mockSession) SetRegistrationTimestamp(tsNano int64) {
    	//TODO implement me
    	panic("implement me")
    }