Source File
tl_contacts_get_statuses_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{}
)
// ContactsGetStatusesRequest represents TL type `contacts.getStatuses#c4a353ee`.
// Returns the list of contact statuses.
//
// See https://core.telegram.org/method/contacts.getStatuses for reference.
type ContactsGetStatusesRequest struct {
}
// ContactsGetStatusesRequestTypeID is TL type id of ContactsGetStatusesRequest.
const ContactsGetStatusesRequestTypeID = 0xc4a353ee
// Ensuring interfaces in compile-time for ContactsGetStatusesRequest.
var (
_ bin.Encoder = &ContactsGetStatusesRequest{}
_ bin.Decoder = &ContactsGetStatusesRequest{}
_ bin.BareEncoder = &ContactsGetStatusesRequest{}
_ bin.BareDecoder = &ContactsGetStatusesRequest{}
)
func ( *ContactsGetStatusesRequest) () bool {
if == nil {
return true
}
return true
}
// String implements fmt.Stringer.
func ( *ContactsGetStatusesRequest) () string {
if == nil {
return "ContactsGetStatusesRequest(nil)"
}
type ContactsGetStatusesRequest
return fmt.Sprintf("ContactsGetStatusesRequest%+v", (*))
}
// TypeID returns type id in TL schema.
//
// See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*ContactsGetStatusesRequest) () uint32 {
return ContactsGetStatusesRequestTypeID
}
// TypeName returns name of type in TL schema.
func (*ContactsGetStatusesRequest) () string {
return "contacts.getStatuses"
}
// TypeInfo returns info about TL type.
func ( *ContactsGetStatusesRequest) () tdp.Type {
:= tdp.Type{
Name: "contacts.getStatuses",
ID: ContactsGetStatusesRequestTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{}
return
}
// Encode implements bin.Encoder.
func ( *ContactsGetStatusesRequest) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode contacts.getStatuses#c4a353ee as nil")
}
.PutID(ContactsGetStatusesRequestTypeID)
return .EncodeBare()
}
// EncodeBare implements bin.BareEncoder.
func ( *ContactsGetStatusesRequest) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode contacts.getStatuses#c4a353ee as nil")
}
return nil
}
// Decode implements bin.Decoder.
func ( *ContactsGetStatusesRequest) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode contacts.getStatuses#c4a353ee to nil")
}
if := .ConsumeID(ContactsGetStatusesRequestTypeID); != nil {
return fmt.Errorf("unable to decode contacts.getStatuses#c4a353ee: %w", )
}
return .DecodeBare()
}
// DecodeBare implements bin.BareDecoder.
func ( *ContactsGetStatusesRequest) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode contacts.getStatuses#c4a353ee to nil")
}
return nil
}
// ContactsGetStatuses invokes method contacts.getStatuses#c4a353ee returning error if any.
// Returns the list of contact statuses.
//
// See https://core.telegram.org/method/contacts.getStatuses for reference.
func ( *Client) ( context.Context) ([]ContactStatus, error) {
var ContactStatusVector
:= &ContactsGetStatusesRequest{}
if := .rpc.Invoke(, , &); != nil {
return nil,
}
return []ContactStatus(.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. |