github.com/keybase/client/go@v0.0.0-20240309051027-028f7c731f8b/protocol/keybase1/notify_fs_request.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/notify_fs_request.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 FSEditListRequestArg struct { 13 Req FSEditListRequest `codec:"req" json:"req"` 14 } 15 16 type FSSyncStatusRequestArg struct { 17 Req FSSyncStatusRequest `codec:"req" json:"req"` 18 } 19 20 type NotifyFSRequestInterface interface { 21 FSEditListRequest(context.Context, FSEditListRequest) error 22 FSSyncStatusRequest(context.Context, FSSyncStatusRequest) error 23 } 24 25 func NotifyFSRequestProtocol(i NotifyFSRequestInterface) rpc.Protocol { 26 return rpc.Protocol{ 27 Name: "keybase.1.NotifyFSRequest", 28 Methods: map[string]rpc.ServeHandlerDescription{ 29 "FSEditListRequest": { 30 MakeArg: func() interface{} { 31 var ret [1]FSEditListRequestArg 32 return &ret 33 }, 34 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 35 typedArgs, ok := args.(*[1]FSEditListRequestArg) 36 if !ok { 37 err = rpc.NewTypeError((*[1]FSEditListRequestArg)(nil), args) 38 return 39 } 40 err = i.FSEditListRequest(ctx, typedArgs[0].Req) 41 return 42 }, 43 }, 44 "FSSyncStatusRequest": { 45 MakeArg: func() interface{} { 46 var ret [1]FSSyncStatusRequestArg 47 return &ret 48 }, 49 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 50 typedArgs, ok := args.(*[1]FSSyncStatusRequestArg) 51 if !ok { 52 err = rpc.NewTypeError((*[1]FSSyncStatusRequestArg)(nil), args) 53 return 54 } 55 err = i.FSSyncStatusRequest(ctx, typedArgs[0].Req) 56 return 57 }, 58 }, 59 }, 60 } 61 } 62 63 type NotifyFSRequestClient struct { 64 Cli rpc.GenericClient 65 } 66 67 func (c NotifyFSRequestClient) FSEditListRequest(ctx context.Context, req FSEditListRequest) (err error) { 68 __arg := FSEditListRequestArg{Req: req} 69 err = c.Cli.Notify(ctx, "keybase.1.NotifyFSRequest.FSEditListRequest", []interface{}{__arg}, 0*time.Millisecond) 70 return 71 } 72 73 func (c NotifyFSRequestClient) FSSyncStatusRequest(ctx context.Context, req FSSyncStatusRequest) (err error) { 74 __arg := FSSyncStatusRequestArg{Req: req} 75 err = c.Cli.Notify(ctx, "keybase.1.NotifyFSRequest.FSSyncStatusRequest", []interface{}{__arg}, 0*time.Millisecond) 76 return 77 }