-
-
Notifications
You must be signed in to change notification settings - Fork 136
/
tl_registry_gen.go
61 lines (52 loc) · 1.3 KB
/
tl_registry_gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// Code generated by gotdgen, DO NOT EDIT.
package schema
import (
"context"
"errors"
"fmt"
"sort"
"strings"
"go.uber.org/multierr"
"github.com/gotd/td/bin"
"github.com/gotd/td/tdjson"
"github.com/gotd/td/tdp"
"github.com/gotd/td/tgerr"
)
// 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{}
)
// TypesMap returns mapping from type ids to TL type names.
func TypesMap() map[uint32]string {
return map[uint32]string{
DCOptionTypeID: "dcOption#18b7a10d",
ConfigTypeID: "config#330b4067",
}
}
// NamesMap returns mapping from type names to TL type ids.
func NamesMap() map[string]uint32 {
return map[string]uint32{
"dcOption": DCOptionTypeID,
"config": ConfigTypeID,
}
}
// TypesConstructorMap maps type ids to constructors.
func TypesConstructorMap() map[uint32]func() bin.Object {
return map[uint32]func() bin.Object{
DCOptionTypeID: func() bin.Object { return &DCOption{} },
ConfigTypeID: func() bin.Object { return &Config{} },
}
}
// ClassConstructorsMap maps class schema name to constructors type ids.
func ClassConstructorsMap() map[string][]uint32 {
return map[string][]uint32{}
}