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