keyboard

package
v1.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	White     = "default"
	Default   = "default"
	Secondary = "default"

	Blue    = "primary"
	Primary = "primary"

	Green    = "positive"
	Positive = "positive"

	Red      = "negative"
	Negative = "negative"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Type  string `json:"type,omitempty"`
	Link  string `json:"link,omitempty"`
	Label string `json:"label,omitempty"`

	OwnerID       int    `json:"owner_id,omitempty"`
	ApplicationID int    `json:"app_id,omitempty"`
	Hash          string `json:"hash,omitempty"`

	Payload any `json:"payload,omitempty"`
}

type AppID

type AppID int

type Application

type Application struct {
	Label         string
	OwnerID       int
	ApplicationID int
	AppID         int
	Payload       string
	Hash          string
}

type ApplicationID

type ApplicationID int

type Button

type Button struct {
	Action Action `json:"action,omitempty"`
	Color  string `json:"color,omitempty"`
}

type Buttons

type Buttons []Button

func AppButton

func AppButton(properties ...any) *Buttons

func ApplicationButton

func ApplicationButton(properties ...any) *Buttons

func CallbackButton

func CallbackButton(properties ...any) *Buttons

func LinkButton

func LinkButton(properties ...any) *Buttons

func LocationButton

func LocationButton(properties ...any) *Buttons

func NewApp

func NewApp(properties ...any) *Buttons

func NewApplication

func NewApplication(properties ...any) *Buttons

func NewCallback

func NewCallback(properties ...any) *Buttons
func NewLink(properties ...any) *Buttons

func NewLocation

func NewLocation(properties ...any) *Buttons

func NewText

func NewText(properties ...any) *Buttons

func TextButton

func TextButton(properties ...any) *Buttons

func (*Buttons) App

func (buttons *Buttons) App(properties ...any) *Buttons

func (*Buttons) AppButton

func (buttons *Buttons) AppButton(properties ...any) *Buttons

func (*Buttons) Application

func (buttons *Buttons) Application(properties ...any) *Buttons

func (*Buttons) ApplicationButton

func (buttons *Buttons) ApplicationButton(properties ...any) *Buttons

func (*Buttons) Callback

func (buttons *Buttons) Callback(properties ...any) *Buttons

func (*Buttons) CallbackButton

func (buttons *Buttons) CallbackButton(properties ...any) *Buttons

func (*Buttons) JSON

func (buttons *Buttons) JSON() string
func (buttons *Buttons) Link(properties ...any) *Buttons

func (*Buttons) LinkButton

func (buttons *Buttons) LinkButton(properties ...any) *Buttons

func (*Buttons) Location

func (buttons *Buttons) Location(properties ...any) *Buttons

func (*Buttons) LocationButton

func (buttons *Buttons) LocationButton(properties ...any) *Buttons

func (*Buttons) Text

func (buttons *Buttons) Text(properties ...any) *Buttons

func (*Buttons) TextButton

func (buttons *Buttons) TextButton(properties ...any) *Buttons

type Callback

type Callback Text

type Color

type Color string

type Hash

type Hash string

type Keyboard

type Keyboard struct {
	Inline  bool
	OneTime bool
	Buttons any
}

type Label

type Label string
type Link struct {
	Label   string
	Link    string
	Payload string
}

type Location

type Location struct {
	Payload string
}

type OwnerID

type OwnerID int

type Payload

type Payload map[string]string

type ReplyKeyboard

type ReplyKeyboard struct {
	Disposable bool      `json:"one_time"`
	Embedded   bool      `json:"inline"`
	Buttons    []Buttons `json:"buttons"`
}

func New

func New(properties ...any) *ReplyKeyboard

func (*ReplyKeyboard) Add

func (keyboard *ReplyKeyboard) Add(button Button) *ReplyKeyboard

func (*ReplyKeyboard) App

func (keyboard *ReplyKeyboard) App(properties ...any) *ReplyKeyboard

func (*ReplyKeyboard) Application

func (keyboard *ReplyKeyboard) Application(properties ...any) *ReplyKeyboard

func (*ReplyKeyboard) Callback

func (keyboard *ReplyKeyboard) Callback(properties ...any) *ReplyKeyboard

func (*ReplyKeyboard) Inline

func (keyboard *ReplyKeyboard) Inline(property ...bool) *ReplyKeyboard

func (*ReplyKeyboard) JSON

func (keyboard *ReplyKeyboard) JSON() string

JSON 🍷🧣🍁 turns an object into a JSON format string.

func (keyboard *ReplyKeyboard) Link(properties ...any) *ReplyKeyboard

func (*ReplyKeyboard) Location

func (keyboard *ReplyKeyboard) Location(properties ...any) *ReplyKeyboard

func (*ReplyKeyboard) OneTime

func (keyboard *ReplyKeyboard) OneTime(property ...bool) *ReplyKeyboard

func (*ReplyKeyboard) Pay

func (keyboard *ReplyKeyboard) Pay(properties ...any) *ReplyKeyboard

func (*ReplyKeyboard) Row

func (keyboard *ReplyKeyboard) Row() *ReplyKeyboard

func (*ReplyKeyboard) SetInline

func (keyboard *ReplyKeyboard) SetInline(property ...bool) *ReplyKeyboard

func (*ReplyKeyboard) SetOneTime

func (keyboard *ReplyKeyboard) SetOneTime(property ...bool) *ReplyKeyboard

func (*ReplyKeyboard) Text

func (keyboard *ReplyKeyboard) Text(properties ...any) *ReplyKeyboard

func (*ReplyKeyboard) VKPay

func (keyboard *ReplyKeyboard) VKPay(properties ...any) *ReplyKeyboard

type Text

type Text struct {
	Text    string
	Label   string
	Payload any
	Color   any
}

type VKPay

type VKPay struct {
	Payload string
	Hash    VKPayHash
}

type VKPayHash

type VKPayHash struct {
	GroupID     int
	UserID      int
	Action      string
	Amount      int
	Description string
	Data        map[string]any
}

Jump to

Keyboard shortcuts

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