Source File
tl_msg_copy_gen.go
Belonging Package
github.com/gotd/td/internal/mt
// Code generated by gotdgen, DO NOT EDIT.package mtimport ()// 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{})// MsgCopy represents TL type `msg_copy#e06046b2`.type MsgCopy struct {// OrigMessage field of MsgCopy.OrigMessage Message}// MsgCopyTypeID is TL type id of MsgCopy.const MsgCopyTypeID = 0xe06046b2// Ensuring interfaces in compile-time for MsgCopy.var (_ bin.Encoder = &MsgCopy{}_ bin.Decoder = &MsgCopy{}_ bin.BareEncoder = &MsgCopy{}_ bin.BareDecoder = &MsgCopy{})func ( *MsgCopy) () bool {if == nil {return true}if !(.OrigMessage.Zero()) {return false}return true}// String implements fmt.Stringer.func ( *MsgCopy) () string {if == nil {return "MsgCopy(nil)"}type MsgCopyreturn fmt.Sprintf("MsgCopy%+v", (*))}// TypeID returns type id in TL schema.//// See https://core.telegram.org/mtproto/TL-tl#remarks.func (*MsgCopy) () uint32 {return MsgCopyTypeID}// TypeName returns name of type in TL schema.func (*MsgCopy) () string {return "msg_copy"}// TypeInfo returns info about TL type.func ( *MsgCopy) () tdp.Type {:= tdp.Type{Name: "msg_copy",ID: MsgCopyTypeID,}if == nil {.Null = truereturn}.Fields = []tdp.Field{{Name: "OrigMessage",SchemaName: "orig_message",},}return}// Encode implements bin.Encoder.func ( *MsgCopy) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode msg_copy#e06046b2 as nil")}.PutID(MsgCopyTypeID)return .EncodeBare()}// EncodeBare implements bin.BareEncoder.func ( *MsgCopy) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode msg_copy#e06046b2 as nil")}if := .OrigMessage.Encode(); != nil {return fmt.Errorf("unable to encode msg_copy#e06046b2: field orig_message: %w", )}return nil}// Decode implements bin.Decoder.func ( *MsgCopy) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode msg_copy#e06046b2 to nil")}if := .ConsumeID(MsgCopyTypeID); != nil {return fmt.Errorf("unable to decode msg_copy#e06046b2: %w", )}return .DecodeBare()}// DecodeBare implements bin.BareDecoder.func ( *MsgCopy) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode msg_copy#e06046b2 to nil")}{if := .OrigMessage.Decode(); != nil {return fmt.Errorf("unable to decode msg_copy#e06046b2: field orig_message: %w", )}}return nil}// GetOrigMessage returns value of OrigMessage field.func ( *MsgCopy) () ( Message) {if == nil {return}return .OrigMessage}
![]() |
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. |