middleware

package
v0.1.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package middleware provides middleware to our boutique.Container.

Index

Constants

This section is empty.

Variables

View Source
var CleanTimer = 1 * time.Minute

CleanTimer is how old a message must be before it is deleted on the next Perform().

Functions

func CleanMessages

func CleanMessages(args *boutique.MWArgs) (changedData interface{}, stop bool, err error)

CleanMessages deletes data.State.Messages older than 1 Minute.

func EnforceMsgLength

func EnforceMsgLength(args *boutique.MWArgs) (changedData interface{}, stop bool, err error)

EnforceMsgLength tests that an actions.ActSendMessage does not contain a message longer than 500 characters.

Types

type Logging

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

Logging provides middleware for logging channels and state data debugging.

func (*Logging) ChannelLog

func (l *Logging) ChannelLog(args *boutique.MWArgs) (changedData interface{}, stop bool, err error)

ChannelLog implements boutique.Middleware.

func (*Logging) DebugLog

func (l *Logging) DebugLog(args *boutique.MWArgs) (changedData interface{}, stop bool, err error)

DebugLog implements boutique.Middleware.

Jump to

Keyboard shortcuts

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