Source File
tl_emoji_url_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{})// EmojiURL represents TL type `emojiURL#a575739d`.// An HTTP URL which can be used to automatically log in into translation platform and// suggest new emoji replacements. The URL will be valid for 30 seconds after generation//// See https://core.telegram.org/constructor/emojiURL for reference.type EmojiURL struct {// An HTTP URL which can be used to automatically log in into translation platform and// suggest new emoji replacements. The URL will be valid for 30 seconds after generationURL string}// EmojiURLTypeID is TL type id of EmojiURL.const EmojiURLTypeID = 0xa575739d// Ensuring interfaces in compile-time for EmojiURL.var (_ bin.Encoder = &EmojiURL{}_ bin.Decoder = &EmojiURL{}_ bin.BareEncoder = &EmojiURL{}_ bin.BareDecoder = &EmojiURL{})func ( *EmojiURL) () bool {if == nil {return true}if !(.URL == "") {return false}return true}// String implements fmt.Stringer.func ( *EmojiURL) () string {if == nil {return "EmojiURL(nil)"}type EmojiURLreturn fmt.Sprintf("EmojiURL%+v", (*))}// FillFrom fills EmojiURL from given interface.func ( *EmojiURL) ( interface {() ( string)}) {.URL = .()}// TypeID returns type id in TL schema.//// See https://core.telegram.org/mtproto/TL-tl#remarks.func (*EmojiURL) () uint32 {return EmojiURLTypeID}// TypeName returns name of type in TL schema.func (*EmojiURL) () string {return "emojiURL"}// TypeInfo returns info about TL type.func ( *EmojiURL) () tdp.Type {:= tdp.Type{Name: "emojiURL",ID: EmojiURLTypeID,}if == nil {.Null = truereturn}.Fields = []tdp.Field{{Name: "URL",SchemaName: "url",},}return}// Encode implements bin.Encoder.func ( *EmojiURL) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode emojiURL#a575739d as nil")}.PutID(EmojiURLTypeID)return .EncodeBare()}// EncodeBare implements bin.BareEncoder.func ( *EmojiURL) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode emojiURL#a575739d as nil")}.PutString(.URL)return nil}// Decode implements bin.Decoder.func ( *EmojiURL) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode emojiURL#a575739d to nil")}if := .ConsumeID(EmojiURLTypeID); != nil {return fmt.Errorf("unable to decode emojiURL#a575739d: %w", )}return .DecodeBare()}// DecodeBare implements bin.BareDecoder.func ( *EmojiURL) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode emojiURL#a575739d to nil")}{, := .String()if != nil {return fmt.Errorf("unable to decode emojiURL#a575739d: field url: %w", )}.URL =}return nil}// GetURL returns value of URL field.func ( *EmojiURL) () ( string) {if == nil {return}return .URL}
![]() |
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. |