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