github.com/xzl8028/xenia-server@v0.0.0-20190809101854-18450a97da63/app/plugin_context.go (about)

     1  // Copyright (c) 2017-present Xenia, Inc. All Rights Reserved.
     2  // See License.txt for license information.
     3  
     4  package app
     5  
     6  import "github.com/xzl8028/xenia-server/plugin"
     7  
     8  func (a *App) PluginContext() *plugin.Context {
     9  	context := &plugin.Context{
    10  		RequestId:      a.RequestId,
    11  		SessionId:      a.Session.Id,
    12  		IpAddress:      a.IpAddress,
    13  		AcceptLanguage: a.AcceptLanguage,
    14  		UserAgent:      a.UserAgent,
    15  	}
    16  	return context
    17  }