Source File
tl_account_init_passkey_registration_gen.go
Belonging Package
github.com/gotd/td/tg
// Code generated by gotdgen, DO NOT EDIT.package tgimport ()// No-op definition for keeping imports.var (_ = bin.Buffer{}_ = context.Background()_ = fmt.Stringer(nil)_ = strings.Builder{}_ = errors.Is_ = multierr.AppendInto_ = sort.Ints_ = tdp.Format_ = tgerr.Error{}_ = tdjson.Encoder{})// AccountInitPasskeyRegistrationRequest represents TL type `account.initPasskeyRegistration#429547e8`.// Initialize passkey registration for the current account, see here »¹ for more info// on the full flow.//// Links:// 1. https://core.telegram.org/api/passkeys#creating-a-passkey//// See https://core.telegram.org/method/account.initPasskeyRegistration for reference.type AccountInitPasskeyRegistrationRequest struct {}// AccountInitPasskeyRegistrationRequestTypeID is TL type id of AccountInitPasskeyRegistrationRequest.const AccountInitPasskeyRegistrationRequestTypeID = 0x429547e8// Ensuring interfaces in compile-time for AccountInitPasskeyRegistrationRequest.var (_ bin.Encoder = &AccountInitPasskeyRegistrationRequest{}_ bin.Decoder = &AccountInitPasskeyRegistrationRequest{}_ bin.BareEncoder = &AccountInitPasskeyRegistrationRequest{}_ bin.BareDecoder = &AccountInitPasskeyRegistrationRequest{})func ( *AccountInitPasskeyRegistrationRequest) () bool {if == nil {return true}return true}// String implements fmt.Stringer.func ( *AccountInitPasskeyRegistrationRequest) () string {if == nil {return "AccountInitPasskeyRegistrationRequest(nil)"}type AccountInitPasskeyRegistrationRequestreturn fmt.Sprintf("AccountInitPasskeyRegistrationRequest%+v", (*))}// TypeID returns type id in TL schema.//// See https://core.telegram.org/mtproto/TL-tl#remarks.func (*AccountInitPasskeyRegistrationRequest) () uint32 {return AccountInitPasskeyRegistrationRequestTypeID}// TypeName returns name of type in TL schema.func (*AccountInitPasskeyRegistrationRequest) () string {return "account.initPasskeyRegistration"}// TypeInfo returns info about TL type.func ( *AccountInitPasskeyRegistrationRequest) () tdp.Type {:= tdp.Type{Name: "account.initPasskeyRegistration",ID: AccountInitPasskeyRegistrationRequestTypeID,}if == nil {.Null = truereturn}.Fields = []tdp.Field{}return}// Encode implements bin.Encoder.func ( *AccountInitPasskeyRegistrationRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode account.initPasskeyRegistration#429547e8 as nil")}.PutID(AccountInitPasskeyRegistrationRequestTypeID)return .EncodeBare()}// EncodeBare implements bin.BareEncoder.func ( *AccountInitPasskeyRegistrationRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode account.initPasskeyRegistration#429547e8 as nil")}return nil}// Decode implements bin.Decoder.func ( *AccountInitPasskeyRegistrationRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode account.initPasskeyRegistration#429547e8 to nil")}if := .ConsumeID(AccountInitPasskeyRegistrationRequestTypeID); != nil {return fmt.Errorf("unable to decode account.initPasskeyRegistration#429547e8: %w", )}return .DecodeBare()}// DecodeBare implements bin.BareDecoder.func ( *AccountInitPasskeyRegistrationRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode account.initPasskeyRegistration#429547e8 to nil")}return nil}// AccountInitPasskeyRegistration invokes method account.initPasskeyRegistration#429547e8 returning error if any.// Initialize passkey registration for the current account, see here »¹ for more info// on the full flow.//// Links:// 1. https://core.telegram.org/api/passkeys#creating-a-passkey//// Possible errors://// 403 ACCESS_DENIED://// See https://core.telegram.org/method/account.initPasskeyRegistration for reference.func ( *Client) ( context.Context) (*AccountPasskeyRegistrationOptions, error) {var AccountPasskeyRegistrationOptions:= &AccountInitPasskeyRegistrationRequest{}if := .rpc.Invoke(, , &); != nil {return nil,}return &, nil}
![]() |
The pages are generated with Golds v0.8.4. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |