Source File
tl_account_get_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{})// AccountGetAuthorizationsRequest represents TL type `account.getAuthorizations#e320c158`.// Get logged-in sessions//// See https://core.telegram.org/method/account.getAuthorizations for reference.type AccountGetAuthorizationsRequest struct {}// AccountGetAuthorizationsRequestTypeID is TL type id of AccountGetAuthorizationsRequest.const AccountGetAuthorizationsRequestTypeID = 0xe320c158// Ensuring interfaces in compile-time for AccountGetAuthorizationsRequest.var (_ bin.Encoder = &AccountGetAuthorizationsRequest{}_ bin.Decoder = &AccountGetAuthorizationsRequest{}_ bin.BareEncoder = &AccountGetAuthorizationsRequest{}_ bin.BareDecoder = &AccountGetAuthorizationsRequest{})func ( *AccountGetAuthorizationsRequest) () bool {if == nil {return true}return true}// String implements fmt.Stringer.func ( *AccountGetAuthorizationsRequest) () string {if == nil {return "AccountGetAuthorizationsRequest(nil)"}type AccountGetAuthorizationsRequestreturn fmt.Sprintf("AccountGetAuthorizationsRequest%+v", (*))}// TypeID returns type id in TL schema.//// See https://core.telegram.org/mtproto/TL-tl#remarks.func (*AccountGetAuthorizationsRequest) () uint32 {return AccountGetAuthorizationsRequestTypeID}// TypeName returns name of type in TL schema.func (*AccountGetAuthorizationsRequest) () string {return "account.getAuthorizations"}// TypeInfo returns info about TL type.func ( *AccountGetAuthorizationsRequest) () tdp.Type {:= tdp.Type{Name: "account.getAuthorizations",ID: AccountGetAuthorizationsRequestTypeID,}if == nil {.Null = truereturn}.Fields = []tdp.Field{}return}// Encode implements bin.Encoder.func ( *AccountGetAuthorizationsRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode account.getAuthorizations#e320c158 as nil")}.PutID(AccountGetAuthorizationsRequestTypeID)return .EncodeBare()}// EncodeBare implements bin.BareEncoder.func ( *AccountGetAuthorizationsRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode account.getAuthorizations#e320c158 as nil")}return nil}// Decode implements bin.Decoder.func ( *AccountGetAuthorizationsRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode account.getAuthorizations#e320c158 to nil")}if := .ConsumeID(AccountGetAuthorizationsRequestTypeID); != nil {return fmt.Errorf("unable to decode account.getAuthorizations#e320c158: %w", )}return .DecodeBare()}// DecodeBare implements bin.BareDecoder.func ( *AccountGetAuthorizationsRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode account.getAuthorizations#e320c158 to nil")}return nil}// AccountGetAuthorizations invokes method account.getAuthorizations#e320c158 returning error if any.// Get logged-in sessions//// See https://core.telegram.org/method/account.getAuthorizations for reference.func ( *Client) ( context.Context) (*AccountAuthorizations, error) {var AccountAuthorizations:= &AccountGetAuthorizationsRequest{}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. |