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