Source File
tl_exported_story_link_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{})// ExportedStoryLink represents TL type `exportedStoryLink#3fc9053b`.// Represents a story deep link¹.//// Links:// 1. https://core.telegram.org/api/stories#story-links//// See https://core.telegram.org/constructor/exportedStoryLink for reference.type ExportedStoryLink struct {// The story deep link¹.//// Links:// 1) https://core.telegram.org/api/stories#story-linksLink string}// ExportedStoryLinkTypeID is TL type id of ExportedStoryLink.const ExportedStoryLinkTypeID = 0x3fc9053b// Ensuring interfaces in compile-time for ExportedStoryLink.var (_ bin.Encoder = &ExportedStoryLink{}_ bin.Decoder = &ExportedStoryLink{}_ bin.BareEncoder = &ExportedStoryLink{}_ bin.BareDecoder = &ExportedStoryLink{})func ( *ExportedStoryLink) () bool {if == nil {return true}if !(.Link == "") {return false}return true}// String implements fmt.Stringer.func ( *ExportedStoryLink) () string {if == nil {return "ExportedStoryLink(nil)"}type ExportedStoryLinkreturn fmt.Sprintf("ExportedStoryLink%+v", (*))}// FillFrom fills ExportedStoryLink from given interface.func ( *ExportedStoryLink) ( interface {() ( string)}) {.Link = .()}// TypeID returns type id in TL schema.//// See https://core.telegram.org/mtproto/TL-tl#remarks.func (*ExportedStoryLink) () uint32 {return ExportedStoryLinkTypeID}// TypeName returns name of type in TL schema.func (*ExportedStoryLink) () string {return "exportedStoryLink"}// TypeInfo returns info about TL type.func ( *ExportedStoryLink) () tdp.Type {:= tdp.Type{Name: "exportedStoryLink",ID: ExportedStoryLinkTypeID,}if == nil {.Null = truereturn}.Fields = []tdp.Field{{Name: "Link",SchemaName: "link",},}return}// Encode implements bin.Encoder.func ( *ExportedStoryLink) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode exportedStoryLink#3fc9053b as nil")}.PutID(ExportedStoryLinkTypeID)return .EncodeBare()}// EncodeBare implements bin.BareEncoder.func ( *ExportedStoryLink) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode exportedStoryLink#3fc9053b as nil")}.PutString(.Link)return nil}// Decode implements bin.Decoder.func ( *ExportedStoryLink) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode exportedStoryLink#3fc9053b to nil")}if := .ConsumeID(ExportedStoryLinkTypeID); != nil {return fmt.Errorf("unable to decode exportedStoryLink#3fc9053b: %w", )}return .DecodeBare()}// DecodeBare implements bin.BareDecoder.func ( *ExportedStoryLink) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode exportedStoryLink#3fc9053b to nil")}{, := .String()if != nil {return fmt.Errorf("unable to decode exportedStoryLink#3fc9053b: field link: %w", )}.Link =}return nil}// GetLink returns value of Link field.func ( *ExportedStoryLink) () ( string) {if == nil {return}return .Link}
![]() |
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. |