Source File
tl_help_get_promo_data_gen.go
Belonging Package
github.com/gotd/td/tg
// Code generated by gotdgen, DO NOT EDIT.
package tg
import (
)
// 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{}
)
// HelpGetPromoDataRequest represents TL type `help.getPromoData#c0977421`.
// Get MTProxy/Public Service Announcement information
//
// See https://core.telegram.org/method/help.getPromoData for reference.
type HelpGetPromoDataRequest struct {
}
// HelpGetPromoDataRequestTypeID is TL type id of HelpGetPromoDataRequest.
const HelpGetPromoDataRequestTypeID = 0xc0977421
// Ensuring interfaces in compile-time for HelpGetPromoDataRequest.
var (
_ bin.Encoder = &HelpGetPromoDataRequest{}
_ bin.Decoder = &HelpGetPromoDataRequest{}
_ bin.BareEncoder = &HelpGetPromoDataRequest{}
_ bin.BareDecoder = &HelpGetPromoDataRequest{}
)
func ( *HelpGetPromoDataRequest) () bool {
if == nil {
return true
}
return true
}
// String implements fmt.Stringer.
func ( *HelpGetPromoDataRequest) () string {
if == nil {
return "HelpGetPromoDataRequest(nil)"
}
type HelpGetPromoDataRequest
return fmt.Sprintf("HelpGetPromoDataRequest%+v", (*))
}
// TypeID returns type id in TL schema.
//
// See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*HelpGetPromoDataRequest) () uint32 {
return HelpGetPromoDataRequestTypeID
}
// TypeName returns name of type in TL schema.
func (*HelpGetPromoDataRequest) () string {
return "help.getPromoData"
}
// TypeInfo returns info about TL type.
func ( *HelpGetPromoDataRequest) () tdp.Type {
:= tdp.Type{
Name: "help.getPromoData",
ID: HelpGetPromoDataRequestTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{}
return
}
// Encode implements bin.Encoder.
func ( *HelpGetPromoDataRequest) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode help.getPromoData#c0977421 as nil")
}
.PutID(HelpGetPromoDataRequestTypeID)
return .EncodeBare()
}
// EncodeBare implements bin.BareEncoder.
func ( *HelpGetPromoDataRequest) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode help.getPromoData#c0977421 as nil")
}
return nil
}
// Decode implements bin.Decoder.
func ( *HelpGetPromoDataRequest) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode help.getPromoData#c0977421 to nil")
}
if := .ConsumeID(HelpGetPromoDataRequestTypeID); != nil {
return fmt.Errorf("unable to decode help.getPromoData#c0977421: %w", )
}
return .DecodeBare()
}
// DecodeBare implements bin.BareDecoder.
func ( *HelpGetPromoDataRequest) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode help.getPromoData#c0977421 to nil")
}
return nil
}
// HelpGetPromoData invokes method help.getPromoData#c0977421 returning error if any.
// Get MTProxy/Public Service Announcement information
//
// See https://core.telegram.org/method/help.getPromoData for reference.
func ( *Client) ( context.Context) (HelpPromoDataClass, error) {
var HelpPromoDataBox
:= &HelpGetPromoDataRequest{}
if := .rpc.Invoke(, , &); != nil {
return nil,
}
return .PromoData, 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. |