/
githubmirror
/
client
Обзор
Документация
Войти
/
githubmirror
/
client
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
go/protocol/stellar1/notify.go
208 строк
7 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/stellar1/notify.avdl package stellar1 import ( "context" "time" "github.com/keybase/go-framed-msgpack-rpc/rpc" ) type PaymentNotificationArg struct { AccountID AccountID `codec:"accountID" json:"accountID"` PaymentID PaymentID `codec:"paymentID" json:"paymentID"` } type PaymentStatusNotificationArg struct { AccountID AccountID `codec:"accountID" json:"accountID"` PaymentID PaymentID `codec:"paymentID" json:"paymentID"` } type RequestStatusNotificationArg struct { ReqID KeybaseRequestID `codec:"reqID" json:"reqID"` } type AccountDetailsUpdateArg struct { AccountID AccountID `codec:"accountID" json:"accountID"` Account WalletAccountLocal `codec:"account" json:"account"` } type AccountsUpdateArg struct { Accounts []WalletAccountLocal `codec:"accounts" json:"accounts"` } type PendingPaymentsUpdateArg struct { AccountID AccountID `codec:"accountID" json:"accountID"` Pending []PaymentOrErrorLocal `codec:"pending" json:"pending"` } type RecentPaymentsUpdateArg struct { AccountID AccountID `codec:"accountID" json:"accountID"` FirstPage PaymentsPageLocal `codec:"firstPage" json:"firstPage"` } type NotifyInterface interface { PaymentNotification(context.Context, PaymentNotificationArg) error PaymentStatusNotification(context.Context, PaymentStatusNotificationArg) error RequestStatusNotification(context.Context, KeybaseRequestID) error AccountDetailsUpdate(context.Context, AccountDetailsUpdateArg) error AccountsUpdate(context.Context, []WalletAccountLocal) error PendingPaymentsUpdate(context.Context, PendingPaymentsUpdateArg) error RecentPaymentsUpdate(context.Context, RecentPaymentsUpdateArg) error } func NotifyProtocol(i NotifyInterface) rpc.Protocol { return rpc.Protocol{ Name: "stellar.1.notify", Methods: map[string]rpc.ServeHandlerDescription{ "paymentNotification": { MakeArg: func() any { var ret [1]PaymentNotificationArg return &ret }, Handler: func(ctx context.Context, args any) (ret any, err error) { typedArgs, ok := args.(*[1]PaymentNotificationArg) if !ok { err = rpc.NewTypeError((*[1]PaymentNotificationArg)(nil), args) return } err = i.PaymentNotification(ctx, typedArgs[0]) return }, }, "paymentStatusNotification": { MakeArg: func() any { var ret [1]PaymentStatusNotificationArg return &ret }, Handler: func(ctx context.Context, args any) (ret any, err error) { typedArgs, ok := args.(*[1]PaymentStatusNotificationArg) if !ok { err = rpc.NewTypeError((*[1]PaymentStatusNotificationArg)(nil), args) return } err = i.PaymentStatusNotification(ctx, typedArgs[0]) return }, }, "requestStatusNotification": { MakeArg: func() any { var ret [1]RequestStatusNotificationArg return &ret }, Handler: func(ctx context.Context, args any) (ret any, err error) { typedArgs, ok := args.(*[1]RequestStatusNotificationArg) if !ok { err = rpc.NewTypeError((*[1]RequestStatusNotificationArg)(nil), args) return } err = i.RequestStatusNotification(ctx, typedArgs[0].ReqID) return }, }, "accountDetailsUpdate": { MakeArg: func() any { var ret [1]AccountDetailsUpdateArg return &ret }, Handler: func(ctx context.Context, args any) (ret any, err error) { typedArgs, ok := args.(*[1]AccountDetailsUpdateArg) if !ok { err = rpc.NewTypeError((*[1]AccountDetailsUpdateArg)(nil), args) return } err = i.AccountDetailsUpdate(ctx, typedArgs[0]) return }, }, "accountsUpdate": { MakeArg: func() any { var ret [1]AccountsUpdateArg return &ret }, Handler: func(ctx context.Context, args any) (ret any, err error) { typedArgs, ok := args.(*[1]AccountsUpdateArg) if !ok { err = rpc.NewTypeError((*[1]AccountsUpdateArg)(nil), args) return } err = i.AccountsUpdate(ctx, typedArgs[0].Accounts) return }, }, "pendingPaymentsUpdate": { MakeArg: func() any { var ret [1]PendingPaymentsUpdateArg return &ret }, Handler: func(ctx context.Context, args any) (ret any, err error) { typedArgs, ok := args.(*[1]PendingPaymentsUpdateArg) if !ok { err = rpc.NewTypeError((*[1]PendingPaymentsUpdateArg)(nil), args) return } err = i.PendingPaymentsUpdate(ctx, typedArgs[0]) return }, }, "recentPaymentsUpdate": { MakeArg: func() any { var ret [1]RecentPaymentsUpdateArg return &ret }, Handler: func(ctx context.Context, args any) (ret any, err error) { typedArgs, ok := args.(*[1]RecentPaymentsUpdateArg) if !ok { err = rpc.NewTypeError((*[1]RecentPaymentsUpdateArg)(nil), args) return } err = i.RecentPaymentsUpdate(ctx, typedArgs[0]) return }, }, }, } } type NotifyClient struct { Cli rpc.GenericClient } func (c NotifyClient) PaymentNotification(ctx context.Context, __arg PaymentNotificationArg) (err error) { err = c.Cli.Notify(ctx, "stellar.1.notify.paymentNotification", []any{__arg}, 0*time.Millisecond) return } func (c NotifyClient) PaymentStatusNotification(ctx context.Context, __arg PaymentStatusNotificationArg) (err error) { err = c.Cli.Notify(ctx, "stellar.1.notify.paymentStatusNotification", []any{__arg}, 0*time.Millisecond) return } func (c NotifyClient) RequestStatusNotification(ctx context.Context, reqID KeybaseRequestID) (err error) { __arg := RequestStatusNotificationArg{ReqID: reqID} err = c.Cli.Notify(ctx, "stellar.1.notify.requestStatusNotification", []any{__arg}, 0*time.Millisecond) return } func (c NotifyClient) AccountDetailsUpdate(ctx context.Context, __arg AccountDetailsUpdateArg) (err error) { err = c.Cli.Notify(ctx, "stellar.1.notify.accountDetailsUpdate", []any{__arg}, 0*time.Millisecond) return } func (c NotifyClient) AccountsUpdate(ctx context.Context, accounts []WalletAccountLocal) (err error) { __arg := AccountsUpdateArg{Accounts: accounts} err = c.Cli.Notify(ctx, "stellar.1.notify.accountsUpdate", []any{__arg}, 0*time.Millisecond) return } func (c NotifyClient) PendingPaymentsUpdate(ctx context.Context, __arg PendingPaymentsUpdateArg) (err error) { err = c.Cli.Notify(ctx, "stellar.1.notify.pendingPaymentsUpdate", []any{__arg}, 0*time.Millisecond) return } func (c NotifyClient) RecentPaymentsUpdate(ctx context.Context, __arg RecentPaymentsUpdateArg) (err error) { err = c.Cli.Notify(ctx, "stellar.1.notify.recentPaymentsUpdate", []any{__arg}, 0*time.Millisecond) return }