github.com/keybase/client/go@v0.0.0-20240309051027-028f7c731f8b/protocol/keybase1/notify_featuredbots.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_featuredbots.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 FeaturedBotsUpdateArg struct {
    13  	Bots   []FeaturedBot `codec:"bots" json:"bots"`
    14  	Limit  int           `codec:"limit" json:"limit"`
    15  	Offset int           `codec:"offset" json:"offset"`
    16  }
    17  
    18  type NotifyFeaturedBotsInterface interface {
    19  	FeaturedBotsUpdate(context.Context, FeaturedBotsUpdateArg) error
    20  }
    21  
    22  func NotifyFeaturedBotsProtocol(i NotifyFeaturedBotsInterface) rpc.Protocol {
    23  	return rpc.Protocol{
    24  		Name: "keybase.1.NotifyFeaturedBots",
    25  		Methods: map[string]rpc.ServeHandlerDescription{
    26  			"featuredBotsUpdate": {
    27  				MakeArg: func() interface{} {
    28  					var ret [1]FeaturedBotsUpdateArg
    29  					return &ret
    30  				},
    31  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
    32  					typedArgs, ok := args.(*[1]FeaturedBotsUpdateArg)
    33  					if !ok {
    34  						err = rpc.NewTypeError((*[1]FeaturedBotsUpdateArg)(nil), args)
    35  						return
    36  					}
    37  					err = i.FeaturedBotsUpdate(ctx, typedArgs[0])
    38  					return
    39  				},
    40  			},
    41  		},
    42  	}
    43  }
    44  
    45  type NotifyFeaturedBotsClient struct {
    46  	Cli rpc.GenericClient
    47  }
    48  
    49  func (c NotifyFeaturedBotsClient) FeaturedBotsUpdate(ctx context.Context, __arg FeaturedBotsUpdateArg) (err error) {
    50  	err = c.Cli.Notify(ctx, "keybase.1.NotifyFeaturedBots.featuredBotsUpdate", []interface{}{__arg}, 0*time.Millisecond)
    51  	return
    52  }