github.com/keybase/client/go@v0.0.0-20241007131713-f10651d043c8/service/ui_router_test.go (about)

     1  package service
     2  
     3  import (
     4  	"time"
     5  
     6  	"golang.org/x/net/context"
     7  
     8  	"github.com/keybase/client/go/libkb"
     9  	keybase1 "github.com/keybase/client/go/protocol/keybase1"
    10  )
    11  
    12  type fakeUIRouter struct {
    13  	secretUI    libkb.SecretUI
    14  	identifyUI  libkb.IdentifyUI
    15  	secretUIErr error
    16  	gregorUI    keybase1.GregorUIInterface
    17  }
    18  
    19  var _ libkb.UIRouter = fakeUIRouter{}
    20  
    21  func (f fakeUIRouter) SetUI(libkb.ConnectionID, libkb.UIKind) {}
    22  
    23  func (f fakeUIRouter) GetIdentifyUI() (libkb.IdentifyUI, error) {
    24  	return f.identifyUI, nil
    25  }
    26  
    27  func (f fakeUIRouter) GetIdentifyUICtx(context.Context) (int, libkb.IdentifyUI, error) {
    28  	return 0, f.identifyUI, nil
    29  }
    30  
    31  func (f fakeUIRouter) GetSecretUI(int) (libkb.SecretUI, error) {
    32  	return f.secretUI, f.secretUIErr
    33  }
    34  
    35  func (f fakeUIRouter) GetRekeyUI() (keybase1.RekeyUIInterface, int, error) {
    36  	return nil, 0, nil
    37  }
    38  
    39  func (f fakeUIRouter) GetRekeyUINoSessionID() (keybase1.RekeyUIInterface, error) {
    40  	return nil, nil
    41  }
    42  
    43  func (f fakeUIRouter) GetGregorUI() (keybase1.GregorUIInterface, error) {
    44  	return f.gregorUI, nil
    45  }
    46  
    47  func (f fakeUIRouter) GetHomeUI() (keybase1.HomeUIInterface, error) {
    48  	return nil, nil
    49  }
    50  
    51  func (f fakeUIRouter) GetIdentify3UIAdapter(_ libkb.MetaContext) (libkb.IdentifyUI, error) {
    52  	return nil, nil
    53  }
    54  
    55  func (f fakeUIRouter) GetIdentify3UI(libkb.MetaContext) (keybase1.Identify3UiInterface, error) {
    56  	return nil, nil
    57  }
    58  
    59  func (f fakeUIRouter) GetChatUI() (libkb.ChatUI, error) {
    60  	return nil, nil
    61  }
    62  
    63  func (f fakeUIRouter) GetLogUI() (libkb.LogUI, error) {
    64  	return nil, nil
    65  }
    66  
    67  func (f fakeUIRouter) DumpUIs() map[libkb.UIKind]libkb.ConnectionID {
    68  	return nil
    69  }
    70  
    71  func (f fakeUIRouter) WaitForUIType(uiKind libkb.UIKind, timeout time.Duration) bool {
    72  	return false
    73  }
    74  
    75  func (f fakeUIRouter) Shutdown() {}