func (g *MetagameServer) simpleBefore(ctx context.Context, in interface{}) (interface{}, error) {
	logger := pitaya.GetDefaultLoggerFromCtx(ctx)
	logger.Info("Simple Before exec")
	if in != nil {
		createPlayerArgs := in.(*CreatePlayerCheatArgs)
		logger.Infof("Name: %s", createPlayerArgs.Name)
		logger.Infof("Email: %s", createPlayerArgs.Email)
		logger.Infof("SoftCurrency: %d", createPlayerArgs.SoftCurrency)
		logger.Infof("HardCurrency: %d", createPlayerArgs.HardCurrency)
	}
	return in, nil
}
Simple example of a before pipeline that actually asserts the type of the
in parameter.
IMPORTANT: that this kind of pipeline will be hard to exist in real code
as a pipeline function executes for every handler and each of them
most probably have different parameter types.
package main
import (
	"context"
	"flag"
	"fmt"
	"github.com/spf13/viper"
	"github.com/topfreegames/pitaya"
	"github.com/topfreegames/pitaya/acceptor"
	"github.com/topfreegames/pitaya/component"
	"github.com/topfreegames/pitaya/serialize/json"
)
type MetagameServer struct {
	component.Base
}
func NewMetagameMock() *MetagameServer {
	return &MetagameServer{}
}
type CreatePlayerCheatArgs struct {
	Name         string `json:"name"`
	Email        string `json:"email" validate:"email"`
	SoftCurrency int    `json:"softCurrency" validate:"gte=0,lte=1000"`
	HardCurrency int    `json:"hardCurrency" validate:"gte=0,lte=200"`
}
type CreatePlayerCheatResponse struct {
	Msg string `json:"msg"`
}
func (g *MetagameServer) CreatePlayerCheat(ctx context.Context, args *CreatePlayerCheatArgs) (*CreatePlayerCheatResponse, error) {
	logger := pitaya.GetDefaultLoggerFromCtx(ctx)  
	logger.Info("CreatePlayerChest called")
	return &CreatePlayerCheatResponse{
		Msg: "ok",
	}, nil
}
type HandlerNoArgResponse struct {
	Msg string `json:"msg"`
}
func (g *MetagameServer) HandlerNoArg(ctx context.Context) (*HandlerNoArgResponse, error) {
	return &HandlerNoArgResponse{
		Msg: "ok",
	}, nil
}