/
githubmirror
/
client
Обзор
Документация
Войти
/
githubmirror
/
client
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
go/protocol/keybase1/notify_service.go
116 строк
3 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_service.avdl package keybase1 import ( "context" "time" "github.com/keybase/go-framed-msgpack-rpc/rpc" ) type HttpSrvInfo struct { Address string `codec:"address" json:"address"` Token string `codec:"token" json:"token"` } func (o HttpSrvInfo) DeepCopy() HttpSrvInfo { return HttpSrvInfo{ Address: o.Address, Token: o.Token, } } type HTTPSrvInfoUpdateArg struct { Info HttpSrvInfo `codec:"info" json:"info"` } type HandleKeybaseLinkArg struct { Link string `codec:"link" json:"link"` Deferred bool `codec:"deferred" json:"deferred"` } type ShutdownArg struct { Code int `codec:"code" json:"code"` } type NotifyServiceInterface interface { HTTPSrvInfoUpdate(context.Context, HttpSrvInfo) error HandleKeybaseLink(context.Context, HandleKeybaseLinkArg) error Shutdown(context.Context, int) error } func NotifyServiceProtocol(i NotifyServiceInterface) rpc.Protocol { return rpc.Protocol{ Name: "keybase.1.NotifyService", Methods: map[string]rpc.ServeHandlerDescription{ "HTTPSrvInfoUpdate": { MakeArg: func() any { var ret [1]HTTPSrvInfoUpdateArg return &ret }, Handler: func(ctx context.Context, args any) (ret any, err error) { typedArgs, ok := args.(*[1]HTTPSrvInfoUpdateArg) if !ok { err = rpc.NewTypeError((*[1]HTTPSrvInfoUpdateArg)(nil), args) return } err = i.HTTPSrvInfoUpdate(ctx, typedArgs[0].Info) return }, }, "handleKeybaseLink": { MakeArg: func() any { var ret [1]HandleKeybaseLinkArg return &ret }, Handler: func(ctx context.Context, args any) (ret any, err error) { typedArgs, ok := args.(*[1]HandleKeybaseLinkArg) if !ok { err = rpc.NewTypeError((*[1]HandleKeybaseLinkArg)(nil), args) return } err = i.HandleKeybaseLink(ctx, typedArgs[0]) return }, }, "shutdown": { MakeArg: func() any { var ret [1]ShutdownArg return &ret }, Handler: func(ctx context.Context, args any) (ret any, err error) { typedArgs, ok := args.(*[1]ShutdownArg) if !ok { err = rpc.NewTypeError((*[1]ShutdownArg)(nil), args) return } err = i.Shutdown(ctx, typedArgs[0].Code) return }, }, }, } } type NotifyServiceClient struct { Cli rpc.GenericClient } func (c NotifyServiceClient) HTTPSrvInfoUpdate(ctx context.Context, info HttpSrvInfo) (err error) { __arg := HTTPSrvInfoUpdateArg{Info: info} err = c.Cli.Notify(ctx, "keybase.1.NotifyService.HTTPSrvInfoUpdate", []any{__arg}, 0*time.Millisecond) return } func (c NotifyServiceClient) HandleKeybaseLink(ctx context.Context, __arg HandleKeybaseLinkArg) (err error) { err = c.Cli.Notify(ctx, "keybase.1.NotifyService.handleKeybaseLink", []any{__arg}, 0*time.Millisecond) return } func (c NotifyServiceClient) Shutdown(ctx context.Context, code int) (err error) { __arg := ShutdownArg{Code: code} err = c.Cli.Call(ctx, "keybase.1.NotifyService.shutdown", []any{__arg}, nil, 0*time.Millisecond) return }