Documentation
¶
Index ¶
- Constants
- Variables
- type Data
- type Server
- func (srv *Server) AuthorizationState() Data
- func (srv *Server) Close() (bool, error)
- func (srv *Server) ConnectionState() Data
- func (srv *Server) DisableRequestsDebug()
- func (srv *Server) EnableRequestsDebug(verbosity_level int)
- func (srv *Server) Invoke(request Data) (Data, bool)
- func (srv *Server) IsRunning() bool
- func (srv *Server) Options() Data
- func (srv *Server) Start()
Constants ¶
const AppName = "TDLib Server"
const MINIMUM_TDLIB_VERSION = "1.8.6"
const Version = "0.1.19"
Variables ¶
var TDLIB_VERSION string
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func New ¶
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 ¶
AuthorizationState returns the currant authorization state of the Server.
func (*Server) Close ¶
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 ¶
ConnectionState returns the current connection state of the Server.
func (*Server) DisableRequestsDebug ¶
func (srv *Server) DisableRequestsDebug()
func (*Server) EnableRequestsDebug ¶
func (*Server) Invoke ¶
Invoke sends a request to TDlib and returns the response data along with a boolean indicating whether the request was successful.
func (*Server) IsRunning ¶
IsRunning returns a boolean indicating whether the Server is currently running.