/
githubmirror
/
client
Обзор
Документация
Войти
/
githubmirror
/
client
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
go/protocol/keybase1/notify_email.go
79 строк
2 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_email.avdl package keybase1 import ( "context" "time" "github.com/keybase/go-framed-msgpack-rpc/rpc" ) type EmailAddressVerifiedArg struct { EmailAddress EmailAddress `codec:"emailAddress" json:"emailAddress"` } type EmailsChangedArg struct { List []Email `codec:"list" json:"list"` Category string `codec:"category" json:"category"` Email EmailAddress `codec:"email" json:"email"` } type NotifyEmailAddressInterface interface { EmailAddressVerified(context.Context, EmailAddress) error EmailsChanged(context.Context, EmailsChangedArg) error } func NotifyEmailAddressProtocol(i NotifyEmailAddressInterface) rpc.Protocol { return rpc.Protocol{ Name: "keybase.1.NotifyEmailAddress", Methods: map[string]rpc.ServeHandlerDescription{ "emailAddressVerified": { MakeArg: func() any { var ret [1]EmailAddressVerifiedArg return &ret }, Handler: func(ctx context.Context, args any) (ret any, err error) { typedArgs, ok := args.(*[1]EmailAddressVerifiedArg) if !ok { err = rpc.NewTypeError((*[1]EmailAddressVerifiedArg)(nil), args) return } err = i.EmailAddressVerified(ctx, typedArgs[0].EmailAddress) return }, }, "emailsChanged": { MakeArg: func() any { var ret [1]EmailsChangedArg return &ret }, Handler: func(ctx context.Context, args any) (ret any, err error) { typedArgs, ok := args.(*[1]EmailsChangedArg) if !ok { err = rpc.NewTypeError((*[1]EmailsChangedArg)(nil), args) return } err = i.EmailsChanged(ctx, typedArgs[0]) return }, }, }, } } type NotifyEmailAddressClient struct { Cli rpc.GenericClient } func (c NotifyEmailAddressClient) EmailAddressVerified(ctx context.Context, emailAddress EmailAddress) (err error) { __arg := EmailAddressVerifiedArg{EmailAddress: emailAddress} err = c.Cli.Notify(ctx, "keybase.1.NotifyEmailAddress.emailAddressVerified", []any{__arg}, 0*time.Millisecond) return } func (c NotifyEmailAddressClient) EmailsChanged(ctx context.Context, __arg EmailsChangedArg) (err error) { err = c.Cli.Notify(ctx, "keybase.1.NotifyEmailAddress.emailsChanged", []any{__arg}, 0*time.Millisecond) return }