commands

package
v3.2.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2019 License: BSD-3-Clause, BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidArguments = errors.New("invalid arguments")
View Source
var ErrInvalidCommand = errors.New("invalid command")

Functions

This section is empty.

Types

type Collapse

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

func NewCollapse

func NewCollapse(g *globals.Context) *Collapse

func (Collapse) Description

func (b Collapse) Description() string

func (*Collapse) Execute

func (h *Collapse) Execute(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	tlfName, text string) (err error)

func (Collapse) Export

func (b Collapse) Export() chat1.ConversationCommand

func (Collapse) HasHelpText

func (b Collapse) HasHelpText() bool

func (Collapse) Match

func (b Collapse) Match(ctx context.Context, text string) bool

func (Collapse) Name

func (b Collapse) Name() string

func (Collapse) Preview

func (b Collapse) Preview(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	tlfName, text string)

func (Collapse) Usage

func (b Collapse) Usage() string

type Expand

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

func NewExpand

func NewExpand(g *globals.Context) *Expand

func (Expand) Description

func (b Expand) Description() string

func (*Expand) Execute

func (h *Expand) Execute(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	tlfName, text string) (err error)

func (Expand) Export

func (b Expand) Export() chat1.ConversationCommand

func (Expand) HasHelpText

func (b Expand) HasHelpText() bool

func (Expand) Match

func (b Expand) Match(ctx context.Context, text string) bool

func (Expand) Name

func (b Expand) Name() string

func (Expand) Preview

func (b Expand) Preview(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	tlfName, text string)

func (Expand) Usage

func (b Expand) Usage() string

type Flip

type Flip struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewFlip

func NewFlip(g *globals.Context) *Flip

func (Flip) Description

func (b Flip) Description() string

func (*Flip) Execute

func (s *Flip) Execute(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	tlfName, text string) (err error)

func (Flip) Export

func (b Flip) Export() chat1.ConversationCommand

func (Flip) HasHelpText

func (b Flip) HasHelpText() bool

func (Flip) Match

func (b Flip) Match(ctx context.Context, text string) bool

func (Flip) Name

func (b Flip) Name() string

func (*Flip) Preview

func (s *Flip) Preview(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	tlfName, text string)

func (Flip) Usage

func (b Flip) Usage() string

type Giphy

type Giphy struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewGiphy

func NewGiphy(g *globals.Context) *Giphy

func (Giphy) Description

func (b Giphy) Description() string

func (*Giphy) Execute

func (s *Giphy) Execute(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	tlfName, text string) (err error)

func (Giphy) Export

func (b Giphy) Export() chat1.ConversationCommand

func (Giphy) HasHelpText

func (b Giphy) HasHelpText() bool

func (Giphy) Match

func (b Giphy) Match(ctx context.Context, text string) bool

func (Giphy) Name

func (b Giphy) Name() string

func (*Giphy) Preview

func (s *Giphy) Preview(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	tlfName, text string)

func (Giphy) Usage

func (b Giphy) Usage() string

type Headline

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

func NewHeadline

func NewHeadline(g *globals.Context) *Headline

func (Headline) Description

func (b Headline) Description() string

func (*Headline) Execute

func (s *Headline) Execute(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	tlfName, text string) (err error)

func (Headline) Export

func (b Headline) Export() chat1.ConversationCommand

func (Headline) HasHelpText

func (b Headline) HasHelpText() bool

func (Headline) Match

func (b Headline) Match(ctx context.Context, text string) bool

func (Headline) Name

func (b Headline) Name() string

func (Headline) Preview

func (b Headline) Preview(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	tlfName, text string)

func (Headline) Usage

func (b Headline) Usage() string

type Hide

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

func NewHide

func NewHide(g *globals.Context) *Hide

func (Hide) Description

func (b Hide) Description() string

func (*Hide) Execute

func (h *Hide) Execute(ctx context.Context, uid gregor1.UID, inConvID chat1.ConversationID,
	tlfName, text string) (err error)

func (Hide) Export

func (b Hide) Export() chat1.ConversationCommand

func (Hide) HasHelpText

func (b Hide) HasHelpText() bool

func (Hide) Match

func (b Hide) Match(ctx context.Context, text string) bool

func (Hide) Name

func (b Hide) Name() string

func (Hide) Preview

func (b Hide) Preview(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	tlfName, text string)

func (Hide) Usage

func (b Hide) Usage() string

type Join

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

func NewJoin

func NewJoin(g *globals.Context) *Join

func (Join) Description

func (b Join) Description() string

func (*Join) Execute

func (h *Join) Execute(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	tlfName, text string) (err error)

func (Join) Export

func (b Join) Export() chat1.ConversationCommand

func (Join) HasHelpText

func (b Join) HasHelpText() bool

func (Join) Match

func (b Join) Match(ctx context.Context, text string) bool

func (Join) Name

func (b Join) Name() string

func (Join) Preview

func (b Join) Preview(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	tlfName, text string)

func (Join) Usage

func (b Join) Usage() string

type Leave

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

func NewLeave

func NewLeave(g *globals.Context) *Leave

func (Leave) Description

func (b Leave) Description() string

func (*Leave) Execute

func (h *Leave) Execute(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	tlfName, text string) (err error)

func (Leave) Export

func (b Leave) Export() chat1.ConversationCommand

func (Leave) HasHelpText

func (b Leave) HasHelpText() bool

func (Leave) Match

func (b Leave) Match(ctx context.Context, text string) bool

func (Leave) Name

func (b Leave) Name() string

func (Leave) Preview

func (b Leave) Preview(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	tlfName, text string)

func (Leave) Usage

func (b Leave) Usage() string

type Me

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

func NewMe

func NewMe(g *globals.Context) *Me

func (Me) Description

func (b Me) Description() string

func (*Me) Execute

func (s *Me) Execute(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	tlfName, text string) (err error)

func (Me) Export

func (b Me) Export() chat1.ConversationCommand

func (Me) HasHelpText

func (b Me) HasHelpText() bool

func (Me) Match

func (b Me) Match(ctx context.Context, text string) bool

func (Me) Name

func (b Me) Name() string

func (Me) Preview

func (b Me) Preview(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	tlfName, text string)

func (Me) Usage

func (b Me) Usage() string

type Msg

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

func NewMsg

func NewMsg(g *globals.Context) *Msg

func (Msg) Description

func (b Msg) Description() string

func (*Msg) Execute

func (d *Msg) Execute(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	tlfName, text string) (err error)

func (Msg) Export

func (b Msg) Export() chat1.ConversationCommand

func (Msg) HasHelpText

func (b Msg) HasHelpText() bool

func (Msg) Match

func (b Msg) Match(ctx context.Context, text string) bool

func (Msg) Name

func (b Msg) Name() string

func (Msg) Preview

func (b Msg) Preview(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	tlfName, text string)

func (Msg) Usage

func (b Msg) Usage() string

type Mute

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

func NewMute

func NewMute(g *globals.Context) *Mute

func (Mute) Description

func (b Mute) Description() string

func (*Mute) Execute

func (h *Mute) Execute(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	tlfName, text string) (err error)

func (Mute) Export

func (b Mute) Export() chat1.ConversationCommand

func (Mute) HasHelpText

func (b Mute) HasHelpText() bool

func (Mute) Match

func (b Mute) Match(ctx context.Context, text string) bool

func (Mute) Name

func (b Mute) Name() string

func (Mute) Preview

func (b Mute) Preview(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	tlfName, text string)

func (Mute) Usage

func (b Mute) Usage() string

type Shrug

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

func NewShrug

func NewShrug(g *globals.Context) *Shrug

func (Shrug) Description

func (b Shrug) Description() string

func (*Shrug) Execute

func (s *Shrug) Execute(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	tlfName, text string) (err error)

func (Shrug) Export

func (b Shrug) Export() chat1.ConversationCommand

func (Shrug) HasHelpText

func (b Shrug) HasHelpText() bool

func (Shrug) Match

func (b Shrug) Match(ctx context.Context, text string) bool

func (Shrug) Name

func (b Shrug) Name() string

func (Shrug) Preview

func (b Shrug) Preview(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	tlfName, text string)

func (Shrug) Usage

func (b Shrug) Usage() string

type Source

type Source struct {
	globals.Contextified
	utils.DebugLabeler
	// contains filtered or unexported fields
}

func NewSource

func NewSource(g *globals.Context) *Source

func (*Source) AttemptBuiltinCommand

func (s *Source) AttemptBuiltinCommand(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	tlfName string, body chat1.MessageBody) (handled bool, err error)

func (*Source) GetBuiltins

func (s *Source) GetBuiltins(ctx context.Context) (res []chat1.BuiltinCommandGroup)

func (*Source) ListCommands

func (*Source) PreviewBuiltinCommand

func (s *Source) PreviewBuiltinCommand(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	tlfName, text string)

type Unhide

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

func NewUnhide

func NewUnhide(g *globals.Context) *Unhide

func (Unhide) Description

func (b Unhide) Description() string

func (*Unhide) Execute

func (h *Unhide) Execute(ctx context.Context, uid gregor1.UID, _ chat1.ConversationID,
	tlfName, text string) (err error)

func (Unhide) Export

func (b Unhide) Export() chat1.ConversationCommand

func (Unhide) HasHelpText

func (b Unhide) HasHelpText() bool

func (Unhide) Match

func (b Unhide) Match(ctx context.Context, text string) bool

func (Unhide) Name

func (b Unhide) Name() string

func (Unhide) Preview

func (b Unhide) Preview(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	tlfName, text string)

func (Unhide) Usage

func (b Unhide) Usage() string

Jump to

Keyboard shortcuts

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