github.com/keybase/client/go@v0.0.0-20241007131713-f10651d043c8/protocol/keybase1/notify_paperkey.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_paperkey.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 PaperKeyCachedArg struct { 13 Uid UID `codec:"uid" json:"uid"` 14 EncKID KID `codec:"encKID" json:"encKID"` 15 SigKID KID `codec:"sigKID" json:"sigKID"` 16 } 17 18 type NotifyPaperKeyInterface interface { 19 PaperKeyCached(context.Context, PaperKeyCachedArg) error 20 } 21 22 func NotifyPaperKeyProtocol(i NotifyPaperKeyInterface) rpc.Protocol { 23 return rpc.Protocol{ 24 Name: "keybase.1.NotifyPaperKey", 25 Methods: map[string]rpc.ServeHandlerDescription{ 26 "paperKeyCached": { 27 MakeArg: func() interface{} { 28 var ret [1]PaperKeyCachedArg 29 return &ret 30 }, 31 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 32 typedArgs, ok := args.(*[1]PaperKeyCachedArg) 33 if !ok { 34 err = rpc.NewTypeError((*[1]PaperKeyCachedArg)(nil), args) 35 return 36 } 37 err = i.PaperKeyCached(ctx, typedArgs[0]) 38 return 39 }, 40 }, 41 }, 42 } 43 } 44 45 type NotifyPaperKeyClient struct { 46 Cli rpc.GenericClient 47 } 48 49 func (c NotifyPaperKeyClient) PaperKeyCached(ctx context.Context, __arg PaperKeyCachedArg) (err error) { 50 err = c.Cli.Notify(ctx, "keybase.1.NotifyPaperKey.paperKeyCached", []interface{}{__arg}, 0*time.Millisecond) 51 return 52 }