command

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2015 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorNoSuchCommand = errors.New("No such command.")
)

Functions

func RegisterResponseCommand

func RegisterResponseCommand(id byte, cmdFactory CommandCreator) error

Types

type Command

type Command interface {
	Marshal(io.Writer) (int, error)
	Unmarshal([]byte) error
}

func CreateResponseCommand

func CreateResponseCommand(id byte) (Command, error)

type CommandCreator

type CommandCreator func() Command

type SwitchAccount

type SwitchAccount struct {
	ID         *uuid.UUID
	ValidUntil time.Time
}

Size: 16 + 8 = 24

func (*SwitchAccount) Marshal

func (this *SwitchAccount) Marshal(writer io.Writer) (int, error)

func (*SwitchAccount) Unmarshal

func (this *SwitchAccount) Unmarshal(data []byte) error

Jump to

Keyboard shortcuts

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