models

package
v0.0.0-...-4aababf Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chat

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

func NewChat

func NewChat(desc *tgbotapi.Chat) *Chat

func (*Chat) AddNamespace

func (c *Chat) AddNamespace(ns *Namespace)

func (*Chat) AllNamespaces

func (c *Chat) AllNamespaces() []*Namespace

func (*Chat) FindNamespaceByName

func (c *Chat) FindNamespaceByName(name string) *Namespace

func (*Chat) GetID

func (c *Chat) GetID() int64

func (*Chat) IsGroup

func (c *Chat) IsGroup() bool

func (*Chat) IsPrivate

func (c *Chat) IsPrivate() bool

type Dialog

type Dialog struct {
	Ns     *Namespace
	Status DialogStatus
}

type DialogStatus

type DialogStatus int
const (
	Std DialogStatus = iota
	WaitSrc
)

type Namespace

type Namespace struct {
	Name    string
	ChatID  int64
	OwnerID int
	// contains filtered or unexported fields
}

func NewNamespace

func NewNamespace(name string, chatID int64, ownerID int) *Namespace

func (*Namespace) Act

func (n *Namespace) Act(args []string) (res string, err error)

func (*Namespace) Eval

func (n *Namespace) Eval(src string) (err error)

func (*Namespace) Flush

func (n *Namespace) Flush()

func (*Namespace) GetName

func (n *Namespace) GetName() string

type Opts

type Opts struct {
	IsCommand bool
	Args      []string
}

Jump to

Keyboard shortcuts

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