Source File
tl_account_passkey_registration_options_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{})// AccountPasskeyRegistrationOptions represents TL type `account.passkeyRegistrationOptions#e16b5ce1`.// Passkey registration options, 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/constructor/account.passkeyRegistrationOptions for reference.type AccountPasskeyRegistrationOptions struct {// JSON-encoded object whose publicKey field contains a// PublicKeyCredentialCreationOptions¹ object.//// Links:// 1) https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredentialCreationOptionsOptions DataJSON}// AccountPasskeyRegistrationOptionsTypeID is TL type id of AccountPasskeyRegistrationOptions.const AccountPasskeyRegistrationOptionsTypeID = 0xe16b5ce1// Ensuring interfaces in compile-time for AccountPasskeyRegistrationOptions.var (_ bin.Encoder = &AccountPasskeyRegistrationOptions{}_ bin.Decoder = &AccountPasskeyRegistrationOptions{}_ bin.BareEncoder = &AccountPasskeyRegistrationOptions{}_ bin.BareDecoder = &AccountPasskeyRegistrationOptions{})func ( *AccountPasskeyRegistrationOptions) () bool {if == nil {return true}if !(.Options.Zero()) {return false}return true}// String implements fmt.Stringer.func ( *AccountPasskeyRegistrationOptions) () string {if == nil {return "AccountPasskeyRegistrationOptions(nil)"}type AccountPasskeyRegistrationOptionsreturn fmt.Sprintf("AccountPasskeyRegistrationOptions%+v", (*))}// FillFrom fills AccountPasskeyRegistrationOptions from given interface.func ( *AccountPasskeyRegistrationOptions) ( interface {() ( DataJSON)}) {.Options = .()}// TypeID returns type id in TL schema.//// See https://core.telegram.org/mtproto/TL-tl#remarks.func (*AccountPasskeyRegistrationOptions) () uint32 {return AccountPasskeyRegistrationOptionsTypeID}// TypeName returns name of type in TL schema.func (*AccountPasskeyRegistrationOptions) () string {return "account.passkeyRegistrationOptions"}// TypeInfo returns info about TL type.func ( *AccountPasskeyRegistrationOptions) () tdp.Type {:= tdp.Type{Name: "account.passkeyRegistrationOptions",ID: AccountPasskeyRegistrationOptionsTypeID,}if == nil {.Null = truereturn}.Fields = []tdp.Field{{Name: "Options",SchemaName: "options",},}return}// Encode implements bin.Encoder.func ( *AccountPasskeyRegistrationOptions) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode account.passkeyRegistrationOptions#e16b5ce1 as nil")}.PutID(AccountPasskeyRegistrationOptionsTypeID)return .EncodeBare()}// EncodeBare implements bin.BareEncoder.func ( *AccountPasskeyRegistrationOptions) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode account.passkeyRegistrationOptions#e16b5ce1 as nil")}if := .Options.Encode(); != nil {return fmt.Errorf("unable to encode account.passkeyRegistrationOptions#e16b5ce1: field options: %w", )}return nil}// Decode implements bin.Decoder.func ( *AccountPasskeyRegistrationOptions) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode account.passkeyRegistrationOptions#e16b5ce1 to nil")}if := .ConsumeID(AccountPasskeyRegistrationOptionsTypeID); != nil {return fmt.Errorf("unable to decode account.passkeyRegistrationOptions#e16b5ce1: %w", )}return .DecodeBare()}// DecodeBare implements bin.BareDecoder.func ( *AccountPasskeyRegistrationOptions) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode account.passkeyRegistrationOptions#e16b5ce1 to nil")}{if := .Options.Decode(); != nil {return fmt.Errorf("unable to decode account.passkeyRegistrationOptions#e16b5ce1: field options: %w", )}}return nil}// GetOptions returns value of Options field.func ( *AccountPasskeyRegistrationOptions) () ( DataJSON) {if == nil {return}return .Options}
![]() |
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. |