Source File
tl_help_get_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{})// HelpGetConfigRequest represents TL type `help.getConfig#c4f9186b`.// Returns current configuration, including data center configuration.//// See https://core.telegram.org/method/help.getConfig for reference.type HelpGetConfigRequest struct {}// HelpGetConfigRequestTypeID is TL type id of HelpGetConfigRequest.const HelpGetConfigRequestTypeID = 0xc4f9186b// Ensuring interfaces in compile-time for HelpGetConfigRequest.var (_ bin.Encoder = &HelpGetConfigRequest{}_ bin.Decoder = &HelpGetConfigRequest{}_ bin.BareEncoder = &HelpGetConfigRequest{}_ bin.BareDecoder = &HelpGetConfigRequest{})func ( *HelpGetConfigRequest) () bool {if == nil {return true}return true}// String implements fmt.Stringer.func ( *HelpGetConfigRequest) () string {if == nil {return "HelpGetConfigRequest(nil)"}type HelpGetConfigRequestreturn fmt.Sprintf("HelpGetConfigRequest%+v", (*))}// TypeID returns type id in TL schema.//// See https://core.telegram.org/mtproto/TL-tl#remarks.func (*HelpGetConfigRequest) () uint32 {return HelpGetConfigRequestTypeID}// TypeName returns name of type in TL schema.func (*HelpGetConfigRequest) () string {return "help.getConfig"}// TypeInfo returns info about TL type.func ( *HelpGetConfigRequest) () tdp.Type {:= tdp.Type{Name: "help.getConfig",ID: HelpGetConfigRequestTypeID,}if == nil {.Null = truereturn}.Fields = []tdp.Field{}return}// Encode implements bin.Encoder.func ( *HelpGetConfigRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode help.getConfig#c4f9186b as nil")}.PutID(HelpGetConfigRequestTypeID)return .EncodeBare()}// EncodeBare implements bin.BareEncoder.func ( *HelpGetConfigRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode help.getConfig#c4f9186b as nil")}return nil}// Decode implements bin.Decoder.func ( *HelpGetConfigRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode help.getConfig#c4f9186b to nil")}if := .ConsumeID(HelpGetConfigRequestTypeID); != nil {return fmt.Errorf("unable to decode help.getConfig#c4f9186b: %w", )}return .DecodeBare()}// DecodeBare implements bin.BareDecoder.func ( *HelpGetConfigRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode help.getConfig#c4f9186b to nil")}return nil}// HelpGetConfig invokes method help.getConfig#c4f9186b returning error if any.// Returns current configuration, including data center configuration.//// Possible errors://// 400 CONNECTION_API_ID_INVALID: The provided API id is invalid.// 400 CONNECTION_APP_VERSION_EMPTY: App version is empty.// 400 CONNECTION_LAYER_INVALID: Layer invalid.// 400 DATA_INVALID: Encrypted data invalid.// 400 MSG_ID_INVALID: Invalid message ID provided.// 400 USERNAME_INVALID: The provided username is not valid.// 403 USER_PRIVACY_RESTRICTED: The user's privacy settings do not allow you to do this.//// See https://core.telegram.org/method/help.getConfig for reference.// Can be used by bots.func ( *Client) ( context.Context) (*Config, error) {var Config:= &HelpGetConfigRequest{}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. |