Source File
	tl_help_get_cdn_config_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{})// HelpGetCDNConfigRequest represents TL type `help.getCdnConfig#52029342`.// Get configuration for CDN¹ file downloads.//// Links:// 1. https://core.telegram.org/cdn//// See https://core.telegram.org/method/help.getCdnConfig for reference.type HelpGetCDNConfigRequest struct {}// HelpGetCDNConfigRequestTypeID is TL type id of HelpGetCDNConfigRequest.const HelpGetCDNConfigRequestTypeID = 0x52029342// Ensuring interfaces in compile-time for HelpGetCDNConfigRequest.var (_ bin.Encoder = &HelpGetCDNConfigRequest{}_ bin.Decoder = &HelpGetCDNConfigRequest{}_ bin.BareEncoder = &HelpGetCDNConfigRequest{}_ bin.BareDecoder = &HelpGetCDNConfigRequest{})func ( *HelpGetCDNConfigRequest) () bool {if == nil {return true}return true}// String implements fmt.Stringer.func ( *HelpGetCDNConfigRequest) () string {if == nil {return "HelpGetCDNConfigRequest(nil)"}type HelpGetCDNConfigRequestreturn fmt.Sprintf("HelpGetCDNConfigRequest%+v", (*))}// TypeID returns type id in TL schema.//// See https://core.telegram.org/mtproto/TL-tl#remarks.func (*HelpGetCDNConfigRequest) () uint32 {return HelpGetCDNConfigRequestTypeID}// TypeName returns name of type in TL schema.func (*HelpGetCDNConfigRequest) () string {return "help.getCdnConfig"}// TypeInfo returns info about TL type.func ( *HelpGetCDNConfigRequest) () tdp.Type {:= tdp.Type{Name: "help.getCdnConfig",ID: HelpGetCDNConfigRequestTypeID,}if == nil {.Null = truereturn}.Fields = []tdp.Field{}return}// Encode implements bin.Encoder.func ( *HelpGetCDNConfigRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode help.getCdnConfig#52029342 as nil")}.PutID(HelpGetCDNConfigRequestTypeID)return .EncodeBare()}// EncodeBare implements bin.BareEncoder.func ( *HelpGetCDNConfigRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode help.getCdnConfig#52029342 as nil")}return nil}// Decode implements bin.Decoder.func ( *HelpGetCDNConfigRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode help.getCdnConfig#52029342 to nil")}if := .ConsumeID(HelpGetCDNConfigRequestTypeID); != nil {return fmt.Errorf("unable to decode help.getCdnConfig#52029342: %w", )}return .DecodeBare()}// DecodeBare implements bin.BareDecoder.func ( *HelpGetCDNConfigRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode help.getCdnConfig#52029342 to nil")}return nil}// HelpGetCDNConfig invokes method help.getCdnConfig#52029342 returning error if any.// Get configuration for CDN¹ file downloads.//// Links:// 1. https://core.telegram.org/cdn//// See https://core.telegram.org/method/help.getCdnConfig for reference.// Can be used by bots.func ( *Client) ( context.Context) (*CDNConfig, error) {var CDNConfig:= &HelpGetCDNConfigRequest{}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. |