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