Source File
tl_account_get_web_authorizations_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{})// AccountGetWebAuthorizationsRequest represents TL type `account.getWebAuthorizations#182e6d6f`.// Get web login widget¹ authorizations//// Links:// 1. https://core.telegram.org/widgets/login//// See https://core.telegram.org/method/account.getWebAuthorizations for reference.type AccountGetWebAuthorizationsRequest struct {}// AccountGetWebAuthorizationsRequestTypeID is TL type id of AccountGetWebAuthorizationsRequest.const AccountGetWebAuthorizationsRequestTypeID = 0x182e6d6f// Ensuring interfaces in compile-time for AccountGetWebAuthorizationsRequest.var (_ bin.Encoder = &AccountGetWebAuthorizationsRequest{}_ bin.Decoder = &AccountGetWebAuthorizationsRequest{}_ bin.BareEncoder = &AccountGetWebAuthorizationsRequest{}_ bin.BareDecoder = &AccountGetWebAuthorizationsRequest{})func ( *AccountGetWebAuthorizationsRequest) () bool {if == nil {return true}return true}// String implements fmt.Stringer.func ( *AccountGetWebAuthorizationsRequest) () string {if == nil {return "AccountGetWebAuthorizationsRequest(nil)"}type AccountGetWebAuthorizationsRequestreturn fmt.Sprintf("AccountGetWebAuthorizationsRequest%+v", (*))}// TypeID returns type id in TL schema.//// See https://core.telegram.org/mtproto/TL-tl#remarks.func (*AccountGetWebAuthorizationsRequest) () uint32 {return AccountGetWebAuthorizationsRequestTypeID}// TypeName returns name of type in TL schema.func (*AccountGetWebAuthorizationsRequest) () string {return "account.getWebAuthorizations"}// TypeInfo returns info about TL type.func ( *AccountGetWebAuthorizationsRequest) () tdp.Type {:= tdp.Type{Name: "account.getWebAuthorizations",ID: AccountGetWebAuthorizationsRequestTypeID,}if == nil {.Null = truereturn}.Fields = []tdp.Field{}return}// Encode implements bin.Encoder.func ( *AccountGetWebAuthorizationsRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode account.getWebAuthorizations#182e6d6f as nil")}.PutID(AccountGetWebAuthorizationsRequestTypeID)return .EncodeBare()}// EncodeBare implements bin.BareEncoder.func ( *AccountGetWebAuthorizationsRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode account.getWebAuthorizations#182e6d6f as nil")}return nil}// Decode implements bin.Decoder.func ( *AccountGetWebAuthorizationsRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode account.getWebAuthorizations#182e6d6f to nil")}if := .ConsumeID(AccountGetWebAuthorizationsRequestTypeID); != nil {return fmt.Errorf("unable to decode account.getWebAuthorizations#182e6d6f: %w", )}return .DecodeBare()}// DecodeBare implements bin.BareDecoder.func ( *AccountGetWebAuthorizationsRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode account.getWebAuthorizations#182e6d6f to nil")}return nil}// AccountGetWebAuthorizations invokes method account.getWebAuthorizations#182e6d6f returning error if any.// Get web login widget¹ authorizations//// Links:// 1. https://core.telegram.org/widgets/login//// See https://core.telegram.org/method/account.getWebAuthorizations for reference.func ( *Client) ( context.Context) (*AccountWebAuthorizations, error) {var AccountWebAuthorizations:= &AccountGetWebAuthorizationsRequest{}if := .rpc.Invoke(, , &); != nil {return nil,}return &, nil}
![]() |
The pages are generated with Golds v0.6.7. (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 @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |