keyboard

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ColorPrimary   = "primary"
	ColorSecondary = "secondary"
	ColorPositive  = "positive"
	ColorNegative  = "negative"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

func Inline

func Inline() *Builder

func Reply

func Reply() *Builder

func (*Builder) Build

func (b *Builder) Build() Keyboard

func (*Builder) Callback

func (b *Builder) Callback(text string, p payload.Payload) *Builder

func (*Builder) Color

func (b *Builder) Color(color string) *Builder

func (*Builder) OneTime

func (b *Builder) OneTime(v bool) *Builder

func (*Builder) Persistent

func (b *Builder) Persistent(v bool) *Builder

func (*Builder) Placeholder

func (b *Builder) Placeholder(v string) *Builder

func (*Builder) Resize

func (b *Builder) Resize(v bool) *Builder

func (*Builder) Row

func (b *Builder) Row() *Builder

func (*Builder) Selective

func (b *Builder) Selective(v bool) *Builder

func (*Builder) Text

func (b *Builder) Text(text string) *Builder

func (*Builder) URL

func (b *Builder) URL(text, url string) *Builder

type Button

type Button struct {
	Text    string
	Kind    ButtonKind
	Payload *payload.Payload
	URL     string
	Color   string
	Native  any
}

type ButtonKind

type ButtonKind string
const (
	ButtonCallback ButtonKind = "callback"
	ButtonURL      ButtonKind = "url"
	ButtonText     ButtonKind = "text"
	ButtonNative   ButtonKind = "native"
)

type Keyboard

type Keyboard struct {
	Kind    Kind
	Rows    [][]Button
	Options Options
}

type Kind

type Kind string
const (
	KindInline Kind = "inline"
	KindReply  Kind = "reply"
)

type Options

type Options struct {
	OneTime               bool
	Resize                bool
	Persistent            bool
	Selective             bool
	InputFieldPlaceholder string
}

Jump to

Keyboard shortcuts

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