/
githubmirror
/
client
Обзор
Документация
Войти
/
githubmirror
/
client
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
go/protocol/keybase1/notify_ctl.go
130 строк
5 KB
chrisnojima-zoom
Version 670 - clean2 (#29122)
08 июн 2026, 19:31
Не верифицирован
08 июн 2026, 19:31
1943197
Код
Авторство
О чём код?
// Code generated to Go types and interfaces using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler). DO NOT EDIT. // Input file: avdl/keybase1/notify_ctl.avdl package keybase1 import ( "context" "time" "github.com/keybase/go-framed-msgpack-rpc/rpc" ) type NotificationChannels struct { Session bool `codec:"session" json:"session"` Users bool `codec:"users" json:"users"` Kbfs bool `codec:"kbfs" json:"kbfs"` Kbfsdesktop bool `codec:"kbfsdesktop" json:"kbfsdesktop"` Kbfslegacy bool `codec:"kbfslegacy" json:"kbfslegacy"` Kbfssubscription bool `codec:"kbfssubscription" json:"kbfssubscription"` Notifysimplefs bool `codec:"notifysimplefs" json:"notifysimplefs"` Tracking bool `codec:"tracking" json:"tracking"` Favorites bool `codec:"favorites" json:"favorites"` Paperkeys bool `codec:"paperkeys" json:"paperkeys"` Keyfamily bool `codec:"keyfamily" json:"keyfamily"` Service bool `codec:"service" json:"service"` App bool `codec:"app" json:"app"` Chat bool `codec:"chat" json:"chat"` PGP bool `codec:"pgp" json:"pgp"` Kbfsrequest bool `codec:"kbfsrequest" json:"kbfsrequest"` Badges bool `codec:"badges" json:"badges"` Reachability bool `codec:"reachability" json:"reachability"` Team bool `codec:"team" json:"team"` Ephemeral bool `codec:"ephemeral" json:"ephemeral"` Teambot bool `codec:"teambot" json:"teambot"` Chatkbfsedits bool `codec:"chatkbfsedits" json:"chatkbfsedits"` Chatdev bool `codec:"chatdev" json:"chatdev"` Chatemoji bool `codec:"chatemoji" json:"chatemoji"` Chatemojicross bool `codec:"chatemojicross" json:"chatemojicross"` Deviceclone bool `codec:"deviceclone" json:"deviceclone"` Chatattachments bool `codec:"chatattachments" json:"chatattachments"` Wallet bool `codec:"wallet" json:"wallet"` Audit bool `codec:"audit" json:"audit"` Runtimestats bool `codec:"runtimestats" json:"runtimestats"` FeaturedBots bool `codec:"featuredBots" json:"featuredBots"` Saltpack bool `codec:"saltpack" json:"saltpack"` AllowChatNotifySkips bool `codec:"allowChatNotifySkips" json:"allowChatNotifySkips"` Chatarchive bool `codec:"chatarchive" json:"chatarchive"` Devicehistory bool `codec:"devicehistory" json:"devicehistory"` } func (o NotificationChannels) DeepCopy() NotificationChannels { return NotificationChannels{ Session: o.Session, Users: o.Users, Kbfs: o.Kbfs, Kbfsdesktop: o.Kbfsdesktop, Kbfslegacy: o.Kbfslegacy, Kbfssubscription: o.Kbfssubscription, Notifysimplefs: o.Notifysimplefs, Tracking: o.Tracking, Favorites: o.Favorites, Paperkeys: o.Paperkeys, Keyfamily: o.Keyfamily, Service: o.Service, App: o.App, Chat: o.Chat, PGP: o.PGP, Kbfsrequest: o.Kbfsrequest, Badges: o.Badges, Reachability: o.Reachability, Team: o.Team, Ephemeral: o.Ephemeral, Teambot: o.Teambot, Chatkbfsedits: o.Chatkbfsedits, Chatdev: o.Chatdev, Chatemoji: o.Chatemoji, Chatemojicross: o.Chatemojicross, Deviceclone: o.Deviceclone, Chatattachments: o.Chatattachments, Wallet: o.Wallet, Audit: o.Audit, Runtimestats: o.Runtimestats, FeaturedBots: o.FeaturedBots, Saltpack: o.Saltpack, AllowChatNotifySkips: o.AllowChatNotifySkips, Chatarchive: o.Chatarchive, Devicehistory: o.Devicehistory, } } type SetNotificationsArg struct { Channels NotificationChannels `codec:"channels" json:"channels"` } type NotifyCtlInterface interface { SetNotifications(context.Context, NotificationChannels) error } func NotifyCtlProtocol(i NotifyCtlInterface) rpc.Protocol { return rpc.Protocol{ Name: "keybase.1.notifyCtl", Methods: map[string]rpc.ServeHandlerDescription{ "setNotifications": { MakeArg: func() any { var ret [1]SetNotificationsArg return &ret }, Handler: func(ctx context.Context, args any) (ret any, err error) { typedArgs, ok := args.(*[1]SetNotificationsArg) if !ok { err = rpc.NewTypeError((*[1]SetNotificationsArg)(nil), args) return } err = i.SetNotifications(ctx, typedArgs[0].Channels) return }, }, }, } } type NotifyCtlClient struct { Cli rpc.GenericClient } func (c NotifyCtlClient) SetNotifications(ctx context.Context, channels NotificationChannels) (err error) { __arg := SetNotificationsArg{Channels: channels} err = c.Cli.Call(ctx, "keybase.1.notifyCtl.setNotifications", []any{__arg}, nil, 0*time.Millisecond) return }