Package-Level Type Names (total 10, in which 8 are exported)
/* sort exporteds by: | */
AtomicConfig is atomic tg.Config.Valueatomic.ValueValue.vany CompareAndSwap executes the compare-and-swap operation for the Value.
All calls to CompareAndSwap for a given Value must use values of the same
concrete type. CompareAndSwap of an inconsistent type panics, as does
CompareAndSwap(old, nil). Load loads atomically config and returns it. Store saves given config atomically. Swap stores new into Value and returns the previous value. It returns nil if
the Value is empty.
All calls to Swap for a given Value must use values of the same concrete
type. Swap of an inconsistent type panics, as does Swap(nil).
func NewAtomicConfig(cfg tg.Config) *AtomicConfig
Conn is a Telegram client connection. InitConnection parameters. // immutable State fields. Wrappers for external world, like logs or PRNG.
Should be immutable. // immutable // immutable // immutable // immutable // immutable Handler passed by client. // immutablelatesttime.Time // immutable Connection parameters. // immutablemuxsync.Mutexongoingint MTProto connection. // immutable // immutable setup is callback which called after initConnection, but before ready signaling.
This is necessary to transfer auth from previous connection to another DC. // nilable Invoke implements Invoker. OnMessage implements mtproto.Handler. OnSession implements mtproto.Handler. Ping calls ping for underlying protocol connection. Ready returns channel to determine connection readiness.
Useful for pooling. Run initialize connection.(*Conn) init(ctx context.Context) error(*Conn) trackInvoke() func()(*Conn) waitSession(ctx context.Context) error(*Conn) wrapRequest(req bin.Object) bin.Object
*Conn : github.com/gotd/td/internal/mtproto.Handler
*Conn : github.com/gotd/td/internal/pool.Conn
*Conn : github.com/gotd/td/tg.Invoker
*Conn : github.com/gotd/td/telegram.clientConn
func CreateConn(create mtproto.Dialer, mode ConnMode, appID int, opts mtproto.Options, connOpts ConnOptions) *Conn
DeviceConfig is config which send when Telegram connection session created. Application version. Device model. Code for the language used on the client, ISO 639-1 standard. Language pack to use. Additional initConnection parameters. For now, only the tz_offset field is supported,
for specifying timezone offset in seconds. Info about an MTProto proxy. Code for the language used on the device's OS, ISO 639-1 standard. Operating system version. SetDefaults sets default values.
The pages are generated with Goldsv0.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.