global

package
v1.2.0-beta Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package global bf1全局变量

Package global 游戏代号

Package global 插件注册

Index

Constants

View Source
const (
	BFBan = "https://api.gametools.network/bfban/" // BFBan gt联ban api
	BFEAC = "https://api.bfeac.com/"               // BFEAC api
)
View Source
const (
	NativeAPI    string = "https://sparta-gw.battlelog.com/jsonrpc/pc/api"       // NativeAPI EA JSONRPC API
	SessionAPI   string = "https://battlefield-api.sakurakooi.dev/account/login" // SessionAPI 通过SakuraKooi 获取session 信息
	OperationAPI string = "https://sparta-gw.battlelog.com/jsonrpc/ps4/api"      // OperationAPI 交换和行动包查询
)
View Source
const (
	AddVIP        string = "RSP.addServerVip"                   // AddVIP 			单服务器添加VIP
	RemoveVIP     string = "RSP.removeServerVip"                // RemoveVIP 		单服务器移除VIP
	AddBan        string = "RSP.addServerBan"                   // AddBan 			单服务器添加玩家进入ban列
	RemoveBan     string = "RSP.removeServerBan"                // RemoveBan 		单服务器ban列移除玩家
	Kick          string = "RSP.kickPlayer"                     // Kick 			单服务器踢出玩家
	ChooseMap     string = "RSP.chooseLevel"                    // ChooseMap 		单服务器切换地图
	ServerDetails string = "GameServer.getFullServerDetails"    // ServerDetails 	单服务器完整信息查询
	Stats         string = "Stats.detailedStatsByPersonaId"     // Stats 			单玩家战绩获取
	Weapons       string = "Progression.getWeaponsByPersonaId"  // Weapons 			单玩家武器获取
	Vehicles      string = "Progression.getVehiclesByPersonaId" // Vehicles 		单玩家载具获取
	Playing       string = "GameServer.getServersByPersonaIds"  // Playing 			多玩家正在游玩获取
	RecentServer  string = "ServerHistory.mostRecentServers"    // RecentServer 	单玩家游玩服务器历史获取
	ServerInfo    string = "GameServer.getServerDetails"        // ServerInfo 		单服务器游戏信息获取
	ServerRSP     string = "RSP.getServerDetails"               // ServerRSP 		单服务器RSP信息获取

	Exchange string = "ScrapExchange.getOffers"                    // Exchange 交换信息获取
	Campaign string = "CampaignOperations.getPlayerCampaignStatus" // Campaign 行动包查询
)
View Source
const (
	BF1 string = "tunguska"
	BFV string = "casablanca"
	BF4 string = "bf4"
)

游戏代号

Variables

View Source
var (
	AccountSetting    *setting.AccountSettingS    // AccountSetting 账号设置
	SessionAPISetting *setting.SessionAPISettingS // SessionAPISetting Session 获取
	BFEACSetting      *setting.BFEACSettingS      // BFEACSetting BFEAC 设置
	TraceSetting      *setting.TraceSettingS      // TraceSetting 追踪设置

	Logger *logger.Logger // Logger 日志
)
View Source
var DB *gorm.DB

DB 全局数据库

View Source
var Dictionary map[string]string

Dictionary 全局简转繁词典

View Source
var Engine = control.Register("战地", &ctrl.Options[*zero.Ctx]{
	DisableOnDefault: false,
	Brief:            "战地相关查询功能",
	Help: "battlefield\n" +
		"<-----以下是玩家查询----->\n" +
		"- .武器 [武器类型] [id]\t不填武器武器类型默认查询全部\n" +
		"- .载具 [id]\n" +
		"- .cb [id] 查询玩家EAC和BFBan案件信息\n" +
		"<-----以下是服务器管理----->\n" +
		"- .k id 将 id 踢出服务器\n" +
		"- .b alias id 在别名为 alias 的服务器封禁 id\n" +
		"- .ub alias id 在别名为 alias 的服务器解封 id\n" +
		"- .bana alias id 在所有已绑定的服务器封禁 id\n" +
		"- .ubana alias id 在所有已绑定的服务器解封 id\n" +
		"- .cm alias [地图id] 在别名为 alias 的服务器切换地图到地图id\n" +
		"- .qm alias 查询别名为 alias 的地图池信息\n" +
		"<-----以下是更多功能----->\n" +
		"- .交换\t查询本周战地一武器皮肤\n" +
		"- .行动\t查询战地一行动箱子\n" +
		"- .战绩 [id]\t查询生涯的战绩\n" +
		"- .最近 [id]\t查询最近的战绩\n" +
		"- .绑定 id\t进行账号绑定",
	PrivateDataFolder: "battlefield",
})

Engine 引擎注册

View Source
var Tracer = otel.GetTracerProvider().Tracer(
	"github.com/KomeiDiSanXian/BFHelper",
	trace.WithInstrumentationVersion(banner.Version),
	trace.WithSchemaURL(semconv.SchemaURL),
)

Tracer 全局追踪

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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