github.com/keybase/client/go@v0.0.0-20241007131713-f10651d043c8/protocol/keybase1/teams_ui.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/teams_ui.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 ConfirmRootTeamDeleteArg struct {
    13  	SessionID int    `codec:"sessionID" json:"sessionID"`
    14  	TeamName  string `codec:"teamName" json:"teamName"`
    15  }
    16  
    17  type ConfirmSubteamDeleteArg struct {
    18  	SessionID int    `codec:"sessionID" json:"sessionID"`
    19  	TeamName  string `codec:"teamName" json:"teamName"`
    20  }
    21  
    22  type ConfirmInviteLinkAcceptArg struct {
    23  	SessionID int               `codec:"sessionID" json:"sessionID"`
    24  	Details   InviteLinkDetails `codec:"details" json:"details"`
    25  }
    26  
    27  type TeamsUiInterface interface {
    28  	ConfirmRootTeamDelete(context.Context, ConfirmRootTeamDeleteArg) (bool, error)
    29  	ConfirmSubteamDelete(context.Context, ConfirmSubteamDeleteArg) (bool, error)
    30  	ConfirmInviteLinkAccept(context.Context, ConfirmInviteLinkAcceptArg) (bool, error)
    31  }
    32  
    33  func TeamsUiProtocol(i TeamsUiInterface) rpc.Protocol {
    34  	return rpc.Protocol{
    35  		Name: "keybase.1.teamsUi",
    36  		Methods: map[string]rpc.ServeHandlerDescription{
    37  			"confirmRootTeamDelete": {
    38  				MakeArg: func() interface{} {
    39  					var ret [1]ConfirmRootTeamDeleteArg
    40  					return &ret
    41  				},
    42  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
    43  					typedArgs, ok := args.(*[1]ConfirmRootTeamDeleteArg)
    44  					if !ok {
    45  						err = rpc.NewTypeError((*[1]ConfirmRootTeamDeleteArg)(nil), args)
    46  						return
    47  					}
    48  					ret, err = i.ConfirmRootTeamDelete(ctx, typedArgs[0])
    49  					return
    50  				},
    51  			},
    52  			"confirmSubteamDelete": {
    53  				MakeArg: func() interface{} {
    54  					var ret [1]ConfirmSubteamDeleteArg
    55  					return &ret
    56  				},
    57  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
    58  					typedArgs, ok := args.(*[1]ConfirmSubteamDeleteArg)
    59  					if !ok {
    60  						err = rpc.NewTypeError((*[1]ConfirmSubteamDeleteArg)(nil), args)
    61  						return
    62  					}
    63  					ret, err = i.ConfirmSubteamDelete(ctx, typedArgs[0])
    64  					return
    65  				},
    66  			},
    67  			"confirmInviteLinkAccept": {
    68  				MakeArg: func() interface{} {
    69  					var ret [1]ConfirmInviteLinkAcceptArg
    70  					return &ret
    71  				},
    72  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
    73  					typedArgs, ok := args.(*[1]ConfirmInviteLinkAcceptArg)
    74  					if !ok {
    75  						err = rpc.NewTypeError((*[1]ConfirmInviteLinkAcceptArg)(nil), args)
    76  						return
    77  					}
    78  					ret, err = i.ConfirmInviteLinkAccept(ctx, typedArgs[0])
    79  					return
    80  				},
    81  			},
    82  		},
    83  	}
    84  }
    85  
    86  type TeamsUiClient struct {
    87  	Cli rpc.GenericClient
    88  }
    89  
    90  func (c TeamsUiClient) ConfirmRootTeamDelete(ctx context.Context, __arg ConfirmRootTeamDeleteArg) (res bool, err error) {
    91  	err = c.Cli.Call(ctx, "keybase.1.teamsUi.confirmRootTeamDelete", []interface{}{__arg}, &res, 0*time.Millisecond)
    92  	return
    93  }
    94  
    95  func (c TeamsUiClient) ConfirmSubteamDelete(ctx context.Context, __arg ConfirmSubteamDeleteArg) (res bool, err error) {
    96  	err = c.Cli.Call(ctx, "keybase.1.teamsUi.confirmSubteamDelete", []interface{}{__arg}, &res, 0*time.Millisecond)
    97  	return
    98  }
    99  
   100  func (c TeamsUiClient) ConfirmInviteLinkAccept(ctx context.Context, __arg ConfirmInviteLinkAcceptArg) (res bool, err error) {
   101  	err = c.Cli.Call(ctx, "keybase.1.teamsUi.confirmInviteLinkAccept", []interface{}{__arg}, &res, 0*time.Millisecond)
   102  	return
   103  }