commands

package
v3.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2019 License: BSD-3-Clause, BSD-3-Clause Imports: 11 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 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) 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, text string) error

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) 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, text string) error

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) 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, text string) error

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) 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, text string) error

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) 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, text string) error

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) 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, text string) error

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) 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, text string) error

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) 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, text string) error

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

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) 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, text string) error

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