Documentation ¶
Index ¶
- func Code(c *tgframe.Container, code string)
- func CodeWithConf(c *tgframe.Container, code string, conf *CodeConf)
- func Divider(c *tgframe.Container)
- func DividerWithID(c *tgframe.Container, id string)
- func Image(c *tgframe.Container, img any)
- func ImageWithConf(c *tgframe.Container, img any, conf *ImageConf)
- func Latex(c *tgframe.Container, text string)
- func LatexWithID(c *tgframe.Container, text string, id string)
- func Link(c *tgframe.Container, text, url string)
- func LinkWithID(c *tgframe.Container, text, url, id string)
- func Markdown(c *tgframe.Container, markdown string)
- func MarkdownWithID(c *tgframe.Container, markdown string, id string)
- func Subtitle(c *tgframe.Container, text string)
- func SubtitleWithID(c *tgframe.Container, text string, id string)
- func Text(c *tgframe.Container, text string)
- func TextWithID(c *tgframe.Container, text string, id string)
- func Title(c *tgframe.Container, text string)
- func TitleWithID(c *tgframe.Container, text string, id string)
- type CodeConf
- type ImageConf
- type ImageFormat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CodeWithConf ¶
CodeWithConf create a code block with syntax highlight.
func DividerWithID ¶
DividerWithID create a horizontal line with ID.
func ImageWithConf ¶
ImageWithConf show an image with a custom configuration.
func LatexWithID ¶
TextWithID create a text component with a user specific id.
func LinkWithID ¶
LinkWithID create a link component with a user specific id.
func MarkdownWithID ¶
Markdown create a markdown-rendering part with a user-specific id.
func SubtitleWithID ¶
SubtitleWithID create a subtitle component with a user specific id.
func TextWithID ¶
TextWithID create a text component with a user specific id.
Types ¶
type CodeConf ¶
type CodeConf struct { // Language is language of code block, leave empty to use `go` Language string // ID is id of the component ID string }
CodeConf provide extra config for Code Component.
type ImageConf ¶
type ImageConf struct { // Width is the width of the image (e.g. "100px", "50%") Width string // Format is the format of the image, default is "png" Format ImageFormat // ID is the unique identifier for this image component ID string }
ImageConf is the configuration for the Image component
type ImageFormat ¶
type ImageFormat int
ImageFormat is the format of the image
const ( ImageFormatPNG ImageFormat = iota ImageFormatJPEG )
Click to show internal directories.
Click to hide internal directories.