server

package
v0.1.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const AppName = "TDLib Server"
View Source
const MINIMUM_TDLIB_VERSION = "1.8.6"
View Source
const Version = "0.1.19"

Variables

View Source
var TDLIB_VERSION string

Functions

This section is empty.

Types

type Data

type Data = map[string]interface{}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New(td_verbosity_level int, config_path string, log_file string, debug bool) (*Server, error)

New creates and initializes a new Server instance with the specified verbosity level and configuration file path. It returns a pointer to the Server and an error if the initialization fails.

func (*Server) AuthorizationState

func (srv *Server) AuthorizationState() Data

AuthorizationState returns the currant authorization state of the Server.

func (*Server) Close

func (srv *Server) Close() (bool, error)

Close gracefully shuts down the Server, waiting for all operations to complete.

It returns a boolean indicating whether the shutdown was successful and an error if the shutdown fails.

func (*Server) ConnectionState

func (srv *Server) ConnectionState() Data

ConnectionState returns the current connection state of the Server.

func (*Server) DisableRequestsDebug

func (srv *Server) DisableRequestsDebug()

func (*Server) EnableRequestsDebug

func (srv *Server) EnableRequestsDebug(verbosity_level int)

func (*Server) Invoke

func (srv *Server) Invoke(request Data) (Data, bool)

Invoke sends a request to TDlib and returns the response data along with a boolean indicating whether the request was successful.

func (*Server) IsRunning

func (srv *Server) IsRunning() bool

IsRunning returns a boolean indicating whether the Server is currently running.

func (*Server) Options

func (srv *Server) Options() Data

Options returns the current options of the Server.

func (*Server) Start

func (srv *Server) Start()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL