command

package
v0.0.0-...-c843baf Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateHandler

type CreateHandler struct {
	Handler
	// contains filtered or unexported fields
}

func (CreateHandler) Execute

func (hdlr CreateHandler) Execute(msg *tgbotapi.Message)

func (CreateHandler) Name

func (hdlr CreateHandler) Name() string

type ForceHandler

type ForceHandler struct {
	Handler
	// contains filtered or unexported fields
}

func (ForceHandler) Execute

func (hdlr ForceHandler) Execute(msg *tgbotapi.Message)

func (ForceHandler) Name

func (hdlr ForceHandler) Name() string

type Handler

type Handler interface {
	Name() string
	Execute(*tgbotapi.Message)
}

func NewCreateHandler

func NewCreateHandler(
	bot *service.Bot,
	trans *translator.Translator,
	base *JoinHandler,
) Handler

func NewForceHandler

func NewForceHandler(
	bot *service.Bot,
) Handler

func NewJoinHandler

func NewJoinHandler(
	bot *service.Bot,
	trans *translator.Translator,
	userRepository domain.UserRepository,
	gameRepository domain.GameRepository,
	gunslingerRepository domain.GunslingerRepository,
	nagan *service.Nagan,
) Handler

func NewJoinedHandler

func NewJoinedHandler(
	bot *service.Bot,
	trans *translator.Translator,
	game domain.GameRepository,
) Handler

func NewStatHandler

func NewStatHandler(
	bot *service.Bot,
	trans *translator.Translator,
	gunslinger domain.GunslingerRepository,
) Handler

func NewTopHandler

func NewTopHandler(
	bot *service.Bot,
	trans *translator.Translator,
	user domain.UserRepository,
	gunslinger domain.GunslingerRepository,
) Handler

type JoinHandler

type JoinHandler struct {
	Handler
	// contains filtered or unexported fields
}

func (JoinHandler) Execute

func (hdlr JoinHandler) Execute(msg *tgbotapi.Message)

func (JoinHandler) Name

func (hdlr JoinHandler) Name() string

type JoinedHandler

type JoinedHandler struct {
	Handler
	// contains filtered or unexported fields
}

func (JoinedHandler) Execute

func (hdlr JoinedHandler) Execute(msg *tgbotapi.Message)

func (JoinedHandler) Name

func (hdlr JoinedHandler) Name() string

type Registry

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

func NewRegistry

func NewRegistry(
	namePrefix string,
	handlers ...Handler,
) *Registry

func (Registry) Find

func (reg Registry) Find(name string) (Handler, error)

type StatHandler

type StatHandler struct {
	Handler
	// contains filtered or unexported fields
}

func (StatHandler) Execute

func (hdlr StatHandler) Execute(msg *tgbotapi.Message)

func (StatHandler) Name

func (hdlr StatHandler) Name() string

type TopHandler

type TopHandler struct {
	Handler
	// contains filtered or unexported fields
}

func (TopHandler) Execute

func (hdlr TopHandler) Execute(msg *tgbotapi.Message)

func (TopHandler) Name

func (hdlr TopHandler) Name() string

Jump to

Keyboard shortcuts

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