tdp

package
v0.104.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: MIT Imports: 6 Imported by: 23

Documentation

Overview

Package tdp is td pretty-printing and formatting facilities for types from MTProto.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(object Object, opts ...Option) string

Format pretty-prints v into string.

func WithTypeID

func WithTypeID(o *options)

WithTypeID adds type id tp type name.

Types

type Field

type Field struct {
	Name       string
	SchemaName string
	Null       bool
}

Field of TL type, non-recursive.

type Object

type Object interface {
	TypeInfo() Type
}

Object of TL schema that can return type info.

type Option

type Option func(o *options)

Option of formatting.

type Type

type Type struct {
	// Name in TL schema.
	Name string
	// ID is type id.
	ID uint32
	// Fields of type.
	Fields []Field
	// Null denotes whether value is null.
	Null bool
}

Type info for TL type, non-recursive.

Directories

Path Synopsis
Package internal wraps internal packages for tdp package.
Package internal wraps internal packages for tdp package.

Jump to

Keyboard shortcuts

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