Source File
tl_app_web_view_result_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{})// AppWebViewResultURL represents TL type `appWebViewResultUrl#3c1b4f0d`.// Contains the link that must be used to open a named Mini App¹.//// Links:// 1. https://core.telegram.org/api/bots/webapps#named-mini-apps//// See https://core.telegram.org/constructor/appWebViewResultUrl for reference.type AppWebViewResultURL struct {// The URL to openURL string}// AppWebViewResultURLTypeID is TL type id of AppWebViewResultURL.const AppWebViewResultURLTypeID = 0x3c1b4f0d// Ensuring interfaces in compile-time for AppWebViewResultURL.var (_ bin.Encoder = &AppWebViewResultURL{}_ bin.Decoder = &AppWebViewResultURL{}_ bin.BareEncoder = &AppWebViewResultURL{}_ bin.BareDecoder = &AppWebViewResultURL{})func ( *AppWebViewResultURL) () bool {if == nil {return true}if !(.URL == "") {return false}return true}// String implements fmt.Stringer.func ( *AppWebViewResultURL) () string {if == nil {return "AppWebViewResultURL(nil)"}type AppWebViewResultURLreturn fmt.Sprintf("AppWebViewResultURL%+v", (*))}// FillFrom fills AppWebViewResultURL from given interface.func ( *AppWebViewResultURL) ( interface {() ( string)}) {.URL = .()}// TypeID returns type id in TL schema.//// See https://core.telegram.org/mtproto/TL-tl#remarks.func (*AppWebViewResultURL) () uint32 {return AppWebViewResultURLTypeID}// TypeName returns name of type in TL schema.func (*AppWebViewResultURL) () string {return "appWebViewResultUrl"}// TypeInfo returns info about TL type.func ( *AppWebViewResultURL) () tdp.Type {:= tdp.Type{Name: "appWebViewResultUrl",ID: AppWebViewResultURLTypeID,}if == nil {.Null = truereturn}.Fields = []tdp.Field{{Name: "URL",SchemaName: "url",},}return}// Encode implements bin.Encoder.func ( *AppWebViewResultURL) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode appWebViewResultUrl#3c1b4f0d as nil")}.PutID(AppWebViewResultURLTypeID)return .EncodeBare()}// EncodeBare implements bin.BareEncoder.func ( *AppWebViewResultURL) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode appWebViewResultUrl#3c1b4f0d as nil")}.PutString(.URL)return nil}// Decode implements bin.Decoder.func ( *AppWebViewResultURL) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode appWebViewResultUrl#3c1b4f0d to nil")}if := .ConsumeID(AppWebViewResultURLTypeID); != nil {return fmt.Errorf("unable to decode appWebViewResultUrl#3c1b4f0d: %w", )}return .DecodeBare()}// DecodeBare implements bin.BareDecoder.func ( *AppWebViewResultURL) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode appWebViewResultUrl#3c1b4f0d to nil")}{, := .String()if != nil {return fmt.Errorf("unable to decode appWebViewResultUrl#3c1b4f0d: field url: %w", )}.URL =}return nil}// GetURL returns value of URL field.func ( *AppWebViewResultURL) () ( 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. |