func (c *Connector) SetSessionData(ctx context.Context, data *SessionData) (*Response, error) {
	s := c.app.GetSessionFromCtx(ctx)
	err := s.SetData(data.Data)
	if err != nil {
		return nil, pitaya.Error(err, "CN-000", map[string]string{"failed": "set data"})
	}
	return reply(200, "success")
}
SetSessionData sets the session data
package services
import (
	"context"
	"fmt"
	"github.com/topfreegames/pitaya/v2"
	"github.com/topfreegames/pitaya/v2/component"
	"github.com/topfreegames/pitaya/v2/examples/demo/protos"
)
type ConnectorRemote struct {
	component.Base
}
type Connector struct {
	component.Base
	app pitaya.Pitaya
}
type SessionData struct {
	Data map[string]interface{}
}
type Response struct {
	Code int32
	Msg  string
}
func NewConnector(app pitaya.Pitaya) *Connector {
	return &Connector{app: app}
}
func reply(code int32, msg string) (*Response, error) {
	res := &Response{
		Code: code,
		Msg:  msg,
	}
	return res, nil
}
func (c *Connector) GetSessionData(ctx context.Context) (*SessionData, error) {
	s := c.app.GetSessionFromCtx(ctx)
	res := &SessionData{
		Data: s.GetData(),
	}
	return res, nil
}