github.com/keybase/client/go@v0.0.0-20241007131713-f10651d043c8/protocol/keybase1/delegate_ui_ctl.go (about)

     1  // Auto-generated to Go types and interfaces using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
     2  //   Input file: avdl/keybase1/delegate_ui_ctl.avdl
     3  
     4  package keybase1
     5  
     6  import (
     7  	"github.com/keybase/go-framed-msgpack-rpc/rpc"
     8  	context "golang.org/x/net/context"
     9  	"time"
    10  )
    11  
    12  type RegisterIdentifyUIArg struct {
    13  }
    14  
    15  type RegisterSecretUIArg struct {
    16  }
    17  
    18  type RegisterUpdateUIArg struct {
    19  }
    20  
    21  type RegisterRekeyUIArg struct {
    22  }
    23  
    24  type RegisterHomeUIArg struct {
    25  }
    26  
    27  type RegisterIdentify3UIArg struct {
    28  }
    29  
    30  type RegisterChatUIArg struct {
    31  }
    32  
    33  type RegisterLogUIArg struct {
    34  }
    35  
    36  type RegisterGregorFirehoseArg struct {
    37  }
    38  
    39  type RegisterGregorFirehoseFilteredArg struct {
    40  	Systems []string `codec:"systems" json:"systems"`
    41  }
    42  
    43  type DelegateUiCtlInterface interface {
    44  	RegisterIdentifyUI(context.Context) error
    45  	RegisterSecretUI(context.Context) error
    46  	RegisterUpdateUI(context.Context) error
    47  	RegisterRekeyUI(context.Context) error
    48  	RegisterHomeUI(context.Context) error
    49  	RegisterIdentify3UI(context.Context) error
    50  	RegisterChatUI(context.Context) error
    51  	RegisterLogUI(context.Context) error
    52  	RegisterGregorFirehose(context.Context) error
    53  	// registerGregorFirehoseFilter allows a client to register for a filtered
    54  	// firehose, limited to only the OOBMs of the systems provided.
    55  	// Like the firehose handler, but less pressure.
    56  	RegisterGregorFirehoseFiltered(context.Context, []string) error
    57  }
    58  
    59  func DelegateUiCtlProtocol(i DelegateUiCtlInterface) rpc.Protocol {
    60  	return rpc.Protocol{
    61  		Name: "keybase.1.delegateUiCtl",
    62  		Methods: map[string]rpc.ServeHandlerDescription{
    63  			"registerIdentifyUI": {
    64  				MakeArg: func() interface{} {
    65  					var ret [1]RegisterIdentifyUIArg
    66  					return &ret
    67  				},
    68  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
    69  					err = i.RegisterIdentifyUI(ctx)
    70  					return
    71  				},
    72  			},
    73  			"registerSecretUI": {
    74  				MakeArg: func() interface{} {
    75  					var ret [1]RegisterSecretUIArg
    76  					return &ret
    77  				},
    78  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
    79  					err = i.RegisterSecretUI(ctx)
    80  					return
    81  				},
    82  			},
    83  			"registerUpdateUI": {
    84  				MakeArg: func() interface{} {
    85  					var ret [1]RegisterUpdateUIArg
    86  					return &ret
    87  				},
    88  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
    89  					err = i.RegisterUpdateUI(ctx)
    90  					return
    91  				},
    92  			},
    93  			"registerRekeyUI": {
    94  				MakeArg: func() interface{} {
    95  					var ret [1]RegisterRekeyUIArg
    96  					return &ret
    97  				},
    98  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
    99  					err = i.RegisterRekeyUI(ctx)
   100  					return
   101  				},
   102  			},
   103  			"registerHomeUI": {
   104  				MakeArg: func() interface{} {
   105  					var ret [1]RegisterHomeUIArg
   106  					return &ret
   107  				},
   108  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
   109  					err = i.RegisterHomeUI(ctx)
   110  					return
   111  				},
   112  			},
   113  			"registerIdentify3UI": {
   114  				MakeArg: func() interface{} {
   115  					var ret [1]RegisterIdentify3UIArg
   116  					return &ret
   117  				},
   118  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
   119  					err = i.RegisterIdentify3UI(ctx)
   120  					return
   121  				},
   122  			},
   123  			"registerChatUI": {
   124  				MakeArg: func() interface{} {
   125  					var ret [1]RegisterChatUIArg
   126  					return &ret
   127  				},
   128  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
   129  					err = i.RegisterChatUI(ctx)
   130  					return
   131  				},
   132  			},
   133  			"registerLogUI": {
   134  				MakeArg: func() interface{} {
   135  					var ret [1]RegisterLogUIArg
   136  					return &ret
   137  				},
   138  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
   139  					err = i.RegisterLogUI(ctx)
   140  					return
   141  				},
   142  			},
   143  			"registerGregorFirehose": {
   144  				MakeArg: func() interface{} {
   145  					var ret [1]RegisterGregorFirehoseArg
   146  					return &ret
   147  				},
   148  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
   149  					err = i.RegisterGregorFirehose(ctx)
   150  					return
   151  				},
   152  			},
   153  			"registerGregorFirehoseFiltered": {
   154  				MakeArg: func() interface{} {
   155  					var ret [1]RegisterGregorFirehoseFilteredArg
   156  					return &ret
   157  				},
   158  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
   159  					typedArgs, ok := args.(*[1]RegisterGregorFirehoseFilteredArg)
   160  					if !ok {
   161  						err = rpc.NewTypeError((*[1]RegisterGregorFirehoseFilteredArg)(nil), args)
   162  						return
   163  					}
   164  					err = i.RegisterGregorFirehoseFiltered(ctx, typedArgs[0].Systems)
   165  					return
   166  				},
   167  			},
   168  		},
   169  	}
   170  }
   171  
   172  type DelegateUiCtlClient struct {
   173  	Cli rpc.GenericClient
   174  }
   175  
   176  func (c DelegateUiCtlClient) RegisterIdentifyUI(ctx context.Context) (err error) {
   177  	err = c.Cli.Call(ctx, "keybase.1.delegateUiCtl.registerIdentifyUI", []interface{}{RegisterIdentifyUIArg{}}, nil, 0*time.Millisecond)
   178  	return
   179  }
   180  
   181  func (c DelegateUiCtlClient) RegisterSecretUI(ctx context.Context) (err error) {
   182  	err = c.Cli.Call(ctx, "keybase.1.delegateUiCtl.registerSecretUI", []interface{}{RegisterSecretUIArg{}}, nil, 0*time.Millisecond)
   183  	return
   184  }
   185  
   186  func (c DelegateUiCtlClient) RegisterUpdateUI(ctx context.Context) (err error) {
   187  	err = c.Cli.Call(ctx, "keybase.1.delegateUiCtl.registerUpdateUI", []interface{}{RegisterUpdateUIArg{}}, nil, 0*time.Millisecond)
   188  	return
   189  }
   190  
   191  func (c DelegateUiCtlClient) RegisterRekeyUI(ctx context.Context) (err error) {
   192  	err = c.Cli.Call(ctx, "keybase.1.delegateUiCtl.registerRekeyUI", []interface{}{RegisterRekeyUIArg{}}, nil, 0*time.Millisecond)
   193  	return
   194  }
   195  
   196  func (c DelegateUiCtlClient) RegisterHomeUI(ctx context.Context) (err error) {
   197  	err = c.Cli.Call(ctx, "keybase.1.delegateUiCtl.registerHomeUI", []interface{}{RegisterHomeUIArg{}}, nil, 0*time.Millisecond)
   198  	return
   199  }
   200  
   201  func (c DelegateUiCtlClient) RegisterIdentify3UI(ctx context.Context) (err error) {
   202  	err = c.Cli.Call(ctx, "keybase.1.delegateUiCtl.registerIdentify3UI", []interface{}{RegisterIdentify3UIArg{}}, nil, 0*time.Millisecond)
   203  	return
   204  }
   205  
   206  func (c DelegateUiCtlClient) RegisterChatUI(ctx context.Context) (err error) {
   207  	err = c.Cli.Call(ctx, "keybase.1.delegateUiCtl.registerChatUI", []interface{}{RegisterChatUIArg{}}, nil, 0*time.Millisecond)
   208  	return
   209  }
   210  
   211  func (c DelegateUiCtlClient) RegisterLogUI(ctx context.Context) (err error) {
   212  	err = c.Cli.Call(ctx, "keybase.1.delegateUiCtl.registerLogUI", []interface{}{RegisterLogUIArg{}}, nil, 0*time.Millisecond)
   213  	return
   214  }
   215  
   216  func (c DelegateUiCtlClient) RegisterGregorFirehose(ctx context.Context) (err error) {
   217  	err = c.Cli.Call(ctx, "keybase.1.delegateUiCtl.registerGregorFirehose", []interface{}{RegisterGregorFirehoseArg{}}, nil, 0*time.Millisecond)
   218  	return
   219  }
   220  
   221  // registerGregorFirehoseFilter allows a client to register for a filtered
   222  // firehose, limited to only the OOBMs of the systems provided.
   223  // Like the firehose handler, but less pressure.
   224  func (c DelegateUiCtlClient) RegisterGregorFirehoseFiltered(ctx context.Context, systems []string) (err error) {
   225  	__arg := RegisterGregorFirehoseFilteredArg{Systems: systems}
   226  	err = c.Cli.Call(ctx, "keybase.1.delegateUiCtl.registerGregorFirehoseFiltered", []interface{}{__arg}, nil, 0*time.Millisecond)
   227  	return
   228  }