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