handler

package
v0.0.0-...-fcfa919 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: ISC Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandHandler

type CommandHandler struct {
	*cmdroute.Router
	S *state.State
}

func CreateHandler

func CreateHandler(s *state.State) *CommandHandler

func (*CommandHandler) AddFunc

func (h *CommandHandler) AddFunc(name string, fn cmdroute.CommandHandlerFunc)

func (*CommandHandler) AddHandler

func (h *CommandHandler) AddHandler(fn interface{})

func (*CommandHandler) AddSyncHandler

func (h *CommandHandler) AddSyncHandler(fn interface{})

func (*CommandHandler) GetState

func (h *CommandHandler) GetState() *state.State

type IHandler

type IHandler interface {
	AddFunc(name string, fn cmdroute.CommandHandlerFunc)
	GetState() *state.State
}

func GetHandler

func GetHandler() IHandler

Jump to

Keyboard shortcuts

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