Source File
tl_account_get_all_secure_values_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{}
)
// AccountGetAllSecureValuesRequest represents TL type `account.getAllSecureValues#b288bc7d`.
// Get all saved Telegram Passport¹ documents, for more info see the passport docs »²
//
// Links:
// 1. https://core.telegram.org/passport
// 2. https://core.telegram.org/passport/encryption#encryption
//
// See https://core.telegram.org/method/account.getAllSecureValues for reference.
type AccountGetAllSecureValuesRequest struct {
}
// AccountGetAllSecureValuesRequestTypeID is TL type id of AccountGetAllSecureValuesRequest.
const AccountGetAllSecureValuesRequestTypeID = 0xb288bc7d
// Ensuring interfaces in compile-time for AccountGetAllSecureValuesRequest.
var (
_ bin.Encoder = &AccountGetAllSecureValuesRequest{}
_ bin.Decoder = &AccountGetAllSecureValuesRequest{}
_ bin.BareEncoder = &AccountGetAllSecureValuesRequest{}
_ bin.BareDecoder = &AccountGetAllSecureValuesRequest{}
)
func ( *AccountGetAllSecureValuesRequest) () bool {
if == nil {
return true
}
return true
}
// String implements fmt.Stringer.
func ( *AccountGetAllSecureValuesRequest) () string {
if == nil {
return "AccountGetAllSecureValuesRequest(nil)"
}
type AccountGetAllSecureValuesRequest
return fmt.Sprintf("AccountGetAllSecureValuesRequest%+v", (*))
}
// TypeID returns type id in TL schema.
//
// See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*AccountGetAllSecureValuesRequest) () uint32 {
return AccountGetAllSecureValuesRequestTypeID
}
// TypeName returns name of type in TL schema.
func (*AccountGetAllSecureValuesRequest) () string {
return "account.getAllSecureValues"
}
// TypeInfo returns info about TL type.
func ( *AccountGetAllSecureValuesRequest) () tdp.Type {
:= tdp.Type{
Name: "account.getAllSecureValues",
ID: AccountGetAllSecureValuesRequestTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{}
return
}
// Encode implements bin.Encoder.
func ( *AccountGetAllSecureValuesRequest) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode account.getAllSecureValues#b288bc7d as nil")
}
.PutID(AccountGetAllSecureValuesRequestTypeID)
return .EncodeBare()
}
// EncodeBare implements bin.BareEncoder.
func ( *AccountGetAllSecureValuesRequest) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode account.getAllSecureValues#b288bc7d as nil")
}
return nil
}
// Decode implements bin.Decoder.
func ( *AccountGetAllSecureValuesRequest) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode account.getAllSecureValues#b288bc7d to nil")
}
if := .ConsumeID(AccountGetAllSecureValuesRequestTypeID); != nil {
return fmt.Errorf("unable to decode account.getAllSecureValues#b288bc7d: %w", )
}
return .DecodeBare()
}
// DecodeBare implements bin.BareDecoder.
func ( *AccountGetAllSecureValuesRequest) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode account.getAllSecureValues#b288bc7d to nil")
}
return nil
}
// AccountGetAllSecureValues invokes method account.getAllSecureValues#b288bc7d returning error if any.
// Get all saved Telegram Passport¹ documents, for more info see the passport docs »²
//
// Links:
// 1. https://core.telegram.org/passport
// 2. https://core.telegram.org/passport/encryption#encryption
//
// See https://core.telegram.org/method/account.getAllSecureValues for reference.
func ( *Client) ( context.Context) ([]SecureValue, error) {
var SecureValueVector
:= &AccountGetAllSecureValuesRequest{}
if := .rpc.Invoke(, , &); != nil {
return nil,
}
return []SecureValue(.Elems), 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. |