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