Source File
tl_payments_get_currency_rates_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{})// PaymentsGetCurrencyRatesRequest represents TL type `payments.getCurrencyRates#d35983e8`.//// See https://core.telegram.org/method/payments.getCurrencyRates for reference.type PaymentsGetCurrencyRatesRequest struct {}// PaymentsGetCurrencyRatesRequestTypeID is TL type id of PaymentsGetCurrencyRatesRequest.const PaymentsGetCurrencyRatesRequestTypeID = 0xd35983e8// Ensuring interfaces in compile-time for PaymentsGetCurrencyRatesRequest.var (_ bin.Encoder = &PaymentsGetCurrencyRatesRequest{}_ bin.Decoder = &PaymentsGetCurrencyRatesRequest{}_ bin.BareEncoder = &PaymentsGetCurrencyRatesRequest{}_ bin.BareDecoder = &PaymentsGetCurrencyRatesRequest{})func ( *PaymentsGetCurrencyRatesRequest) () bool {if == nil {return true}return true}// String implements fmt.Stringer.func ( *PaymentsGetCurrencyRatesRequest) () string {if == nil {return "PaymentsGetCurrencyRatesRequest(nil)"}type PaymentsGetCurrencyRatesRequestreturn fmt.Sprintf("PaymentsGetCurrencyRatesRequest%+v", (*))}// TypeID returns type id in TL schema.//// See https://core.telegram.org/mtproto/TL-tl#remarks.func (*PaymentsGetCurrencyRatesRequest) () uint32 {return PaymentsGetCurrencyRatesRequestTypeID}// TypeName returns name of type in TL schema.func (*PaymentsGetCurrencyRatesRequest) () string {return "payments.getCurrencyRates"}// TypeInfo returns info about TL type.func ( *PaymentsGetCurrencyRatesRequest) () tdp.Type {:= tdp.Type{Name: "payments.getCurrencyRates",ID: PaymentsGetCurrencyRatesRequestTypeID,}if == nil {.Null = truereturn}.Fields = []tdp.Field{}return}// Encode implements bin.Encoder.func ( *PaymentsGetCurrencyRatesRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode payments.getCurrencyRates#d35983e8 as nil")}.PutID(PaymentsGetCurrencyRatesRequestTypeID)return .EncodeBare()}// EncodeBare implements bin.BareEncoder.func ( *PaymentsGetCurrencyRatesRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode payments.getCurrencyRates#d35983e8 as nil")}return nil}// Decode implements bin.Decoder.func ( *PaymentsGetCurrencyRatesRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode payments.getCurrencyRates#d35983e8 to nil")}if := .ConsumeID(PaymentsGetCurrencyRatesRequestTypeID); != nil {return fmt.Errorf("unable to decode payments.getCurrencyRates#d35983e8: %w", )}return .DecodeBare()}// DecodeBare implements bin.BareDecoder.func ( *PaymentsGetCurrencyRatesRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode payments.getCurrencyRates#d35983e8 to nil")}return nil}// PaymentsGetCurrencyRates invokes method payments.getCurrencyRates#d35983e8 returning error if any.//// See https://core.telegram.org/method/payments.getCurrencyRates for reference.func ( *Client) ( context.Context) (*PaymentsCurrencyRates, error) {var PaymentsCurrencyRates:= &PaymentsGetCurrencyRatesRequest{}if := .rpc.Invoke(, , &); != nil {return nil,}return &, nil}
![]() |
The pages are generated with Golds v0.8.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 @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |