confmanager

package module
v0.0.0-...-d170df1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

README

matching-story-confmanager

三消csv配置

Documentation

Overview

Package confmanager GENERATED BY CSV MANAGER AUTO; DO NOT EDIT

Index

Constants

View Source
const (
	///棋子收集活动(红色)
	AppleGarden = 1
	///棋子收集活动(五消,小飞机)
	MagicParty = 2
	///公会活动
	TeamChest = 3
	///排名活动
	MedalRush = 4
	///玛雅活动
	MayaRush = 5
	///TeaParty
	TeaParty = 6
	///故事礼包
	FairyDeal = 7
	///失败礼包
	FlorasOffer = 8
	///连续礼包
	EndlessPack = 9
	///竞速活动
	RaceLevel = 10
	///满级链回收
	BuildingRecycle = 11
	///满级玩法(预留)
	IcecreamTournament = 12
	///精英赛(预留)
	MasterLeague = 13
)
View Source
const (
	//csv 'state' desc
	Csv_Activity_State_Open        = 1
	Csv_Activity_State_Close       = -1
	Csv_Activity_Table_Current_Len = 11 //Update if the file activity_table.csv is modified
)

Variables

This section is empty.

Functions

func Compatible

func Compatible(targetDir, oldTargetDir, newTargetDir string) error

func GetGetLevelRaceUserGroupConfigTrangeAvgByID

func GetGetLevelRaceUserGroupConfigTrangeAvgByID(id int) float64

func GetLevelRaceConfigID

func GetLevelRaceConfigID() int

func GetLevelRaceConfigSFACTOR

func GetLevelRaceConfigSFACTOR() float64

func GetLevelRaceConfigTarget

func GetLevelRaceConfigTarget() int

func GetLevelRaceGroupAllIds

func GetLevelRaceGroupAllIds() []int

func GetLevelRaceGroupConfigFullFillRobotCsvIdsByID

func GetLevelRaceGroupConfigFullFillRobotCsvIdsByID(id int, num int) ([]int, error)

func GetLevelRaceGroupConfigInitRobotIdsByID

func GetLevelRaceGroupConfigInitRobotIdsByID(id int) ([]int, error)

func GetLevelRaceGroupConfigRealUserNumLimitByID

func GetLevelRaceGroupConfigRealUserNumLimitByID(id int) (int, int, error)

func GetLevelRaceGroupConfigRobotCsvIdsByIDAndRange

func GetLevelRaceGroupConfigRobotCsvIdsByIDAndRange(id int, tr int) ([]int, error)

func GetLevelRaceGroupConfigSleepByIDAndRange

func GetLevelRaceGroupConfigSleepByIDAndRange(id int, tr int) (int, int, error)

func GetLevelRaceGroupPart1ConfigByID

func GetLevelRaceGroupPart1ConfigByID(id int) (int, int, int, error)

func GetLevelRaceResultConfigInActiveScoreByID

func GetLevelRaceResultConfigInActiveScoreByID(groupType int) (int, error)

func GetLevelRaceResultConfigLT

func GetLevelRaceResultConfigLT(groupType, rank, ispay int) (int, int, error)

func GetLevelRaceResultConfigRRate

func GetLevelRaceResultConfigRRate(groupType, rank, ispay int) (float64, error)

func GetLevelRaceResultConfigSwitch

func GetLevelRaceResultConfigSwitch(groupType, rank, ispay int) (int, error)

func GetLevelRaceUserGroupConfigFCByGroupCsvID

func GetLevelRaceUserGroupConfigFCByGroupCsvID(groupCsvId int) (int, int, error)

func GetLevelRaceUserGroupConfigIDByTRANGE

func GetLevelRaceUserGroupConfigIDByTRANGE(t float64) int

func GetLevelRaceUserGroupConfigTrangeByGroupCsvIDAndPercent

func GetLevelRaceUserGroupConfigTrangeByGroupCsvIDAndPercent(groupCsvId int, percent float64) (float64, error)

func GetRobotNameByRand

func GetRobotNameByRand(existsNames ...string) (string, error)

robot name rand exclude existsNames

func GetRobotNewMaxWaitByID

func GetRobotNewMaxWaitByID(id int) (int, error)

func GetRobotNewScoreByID

func GetRobotNewScoreByID(id int) (int, error)

func GetRobotNewScoreRangeByID

func GetRobotNewScoreRangeByID(id int) (int, error)

func GetRobotNewSleepStepByID

func GetRobotNewSleepStepByID(id int) (int, error)

func GetRobotNewSleepTimeByIDAndTimes

func GetRobotNewSleepTimeByIDAndTimes(id int, actnum int) (int, error)

func GetRobotNewTimeMultiplierByID

func GetRobotNewTimeMultiplierByID(id int) (float64, error)

func GetRobotNewTvaluePercentByID

func GetRobotNewTvaluePercentByID(id int) (float64, error)

func GetRobotNewWakeStepByID

func GetRobotNewWakeStepByID(id int) (int, error)

func Load

func Load(fpath string) error

fpath is csv file dir path

func LoadRobotNameCsv

func LoadRobotNameCsv() error

Types

type ConfAllManager

type ConfAllManager struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

ConfAllManager confmanager.ConfAllManager define version 配置管理器

func GetConfManagerVer

func GetConfManagerVer() *ConfAllManager

GetConfManagerVer 初始化配置管理器

func (*ConfAllManager) GetConfManager

func (c *ConfAllManager) GetConfManager() (*ConfManager, error)

GetConfManager 获取管理器实例

func (*ConfAllManager) LoadCsv

func (c *ConfAllManager) LoadCsv(csvPath string) error

LoadCsv 加载CSV

func (*ConfAllManager) PreTable

func (c *ConfAllManager) PreTable()

func (*ConfAllManager) RegisterPreProcess

func (c *ConfAllManager) RegisterPreProcess(fn preProcessTable) int

type ConfManager

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

ConfManager define 单一版本配置管理器

func (*ConfManager) GetConfActivityTableByIndex

func (c *ConfManager) GetConfActivityTableByIndex(index int) (confcsv.IActivityTable, error)

GetConfActivityTableByIndex auto

func (*ConfManager) GetConfActivityTableByKey

func (c *ConfManager) GetConfActivityTableByKey(key string) (confcsv.IActivityTable, error)

GetConfActivityTableByKey auto

func (*ConfManager) GetConfActivityTableNum

func (c *ConfManager) GetConfActivityTableNum() (int, error)

GetConfActivityTableNum auto

func (*ConfManager) GetConfLevelRaceConfigByIndex

func (c *ConfManager) GetConfLevelRaceConfigByIndex(index int) (confcsv.ILevelRaceConfig, error)

GetConfLevelRaceConfigByIndex auto

func (*ConfManager) GetConfLevelRaceConfigByKey

func (c *ConfManager) GetConfLevelRaceConfigByKey(key int) (confcsv.ILevelRaceConfig, error)

GetConfLevelRaceConfigByKey auto

func (*ConfManager) GetConfLevelRaceConfigNum

func (c *ConfManager) GetConfLevelRaceConfigNum() (int, error)

GetConfLevelRaceConfigNum auto

func (*ConfManager) GetConfLevelRaceGroupConfigByIndex

func (c *ConfManager) GetConfLevelRaceGroupConfigByIndex(index int) (confcsv.ILevelRaceGroupConfig, error)

GetConfLevelRaceGroupConfigByIndex auto

func (*ConfManager) GetConfLevelRaceGroupConfigByKey

func (c *ConfManager) GetConfLevelRaceGroupConfigByKey(key int) (confcsv.ILevelRaceGroupConfig, error)

GetConfLevelRaceGroupConfigByKey auto

func (*ConfManager) GetConfLevelRaceGroupConfigNum

func (c *ConfManager) GetConfLevelRaceGroupConfigNum() (int, error)

GetConfLevelRaceGroupConfigNum auto

func (*ConfManager) GetConfLevelRaceResultConfigByIndex

func (c *ConfManager) GetConfLevelRaceResultConfigByIndex(index int) (confcsv.ILevelRaceResultConfig, error)

GetConfLevelRaceResultConfigByIndex auto

func (*ConfManager) GetConfLevelRaceResultConfigByKey

func (c *ConfManager) GetConfLevelRaceResultConfigByKey(key int) (confcsv.ILevelRaceResultConfig, error)

GetConfLevelRaceResultConfigByKey auto

func (*ConfManager) GetConfLevelRaceResultConfigNum

func (c *ConfManager) GetConfLevelRaceResultConfigNum() (int, error)

GetConfLevelRaceResultConfigNum auto

func (*ConfManager) GetConfLevelRaceUsergroupConfigByIndex

func (c *ConfManager) GetConfLevelRaceUsergroupConfigByIndex(index int) (confcsv.ILevelRaceUsergroupConfig, error)

GetConfLevelRaceUsergroupConfigByIndex auto

func (*ConfManager) GetConfLevelRaceUsergroupConfigByKey

func (c *ConfManager) GetConfLevelRaceUsergroupConfigByKey(key int) (confcsv.ILevelRaceUsergroupConfig, error)

GetConfLevelRaceUsergroupConfigByKey auto

func (*ConfManager) GetConfLevelRaceUsergroupConfigNum

func (c *ConfManager) GetConfLevelRaceUsergroupConfigNum() (int, error)

GetConfLevelRaceUsergroupConfigNum auto

func (*ConfManager) GetConfRobotByIndex

func (c *ConfManager) GetConfRobotByIndex(index int) (confcsv.IRobot, error)

GetConfRobotByIndex auto

func (*ConfManager) GetConfRobotByKey

func (c *ConfManager) GetConfRobotByKey(key int) (confcsv.IRobot, error)

GetConfRobotByKey auto

func (*ConfManager) GetConfRobotNameByIndex

func (c *ConfManager) GetConfRobotNameByIndex(index int) (confcsv.IRobotName, error)

GetConfRobotNameByIndex auto

func (*ConfManager) GetConfRobotNameByKey

func (c *ConfManager) GetConfRobotNameByKey(key int) (confcsv.IRobotName, error)

GetConfRobotNameByKey auto

func (*ConfManager) GetConfRobotNameNum

func (c *ConfManager) GetConfRobotNameNum() (int, error)

GetConfRobotNameNum auto

func (*ConfManager) GetConfRobotNewByIndex

func (c *ConfManager) GetConfRobotNewByIndex(index int) (confcsv.IRobotNew, error)

GetConfRobotNewByIndex auto

func (*ConfManager) GetConfRobotNewByKey

func (c *ConfManager) GetConfRobotNewByKey(key int) (confcsv.IRobotNew, error)

GetConfRobotNewByKey auto

func (*ConfManager) GetConfRobotNewNum

func (c *ConfManager) GetConfRobotNewNum() (int, error)

GetConfRobotNewNum auto

func (*ConfManager) GetConfRobotNum

func (c *ConfManager) GetConfRobotNum() (int, error)

GetConfRobotNum auto

func (*ConfManager) GetConfRobotTeamByIndex

func (c *ConfManager) GetConfRobotTeamByIndex(index int) (confcsv.IRobotTeam, error)

GetConfRobotTeamByIndex auto

func (*ConfManager) GetConfRobotTeamByKey

func (c *ConfManager) GetConfRobotTeamByKey(key int) (confcsv.IRobotTeam, error)

GetConfRobotTeamByKey auto

func (*ConfManager) GetConfRobotTeamChatByIndex

func (c *ConfManager) GetConfRobotTeamChatByIndex(index int) (confcsv.IRobotTeamChat, error)

GetConfRobotTeamChatByIndex auto

func (*ConfManager) GetConfRobotTeamChatByKey

func (c *ConfManager) GetConfRobotTeamChatByKey(key int) (confcsv.IRobotTeamChat, error)

GetConfRobotTeamChatByKey auto

func (*ConfManager) GetConfRobotTeamChatNum

func (c *ConfManager) GetConfRobotTeamChatNum() (int, error)

GetConfRobotTeamChatNum auto

func (*ConfManager) GetConfRobotTeamConfigByIndex

func (c *ConfManager) GetConfRobotTeamConfigByIndex(index int) (confcsv.IRobotTeamConfig, error)

GetConfRobotTeamConfigByIndex auto

func (*ConfManager) GetConfRobotTeamConfigByKey

func (c *ConfManager) GetConfRobotTeamConfigByKey(key int) (confcsv.IRobotTeamConfig, error)

GetConfRobotTeamConfigByKey auto

func (*ConfManager) GetConfRobotTeamConfigNum

func (c *ConfManager) GetConfRobotTeamConfigNum() (int, error)

GetConfRobotTeamConfigNum auto

func (*ConfManager) GetConfRobotTeamInitialByIndex

func (c *ConfManager) GetConfRobotTeamInitialByIndex(index int) (confcsv.IRobotTeamInitial, error)

GetConfRobotTeamInitialByIndex auto

func (*ConfManager) GetConfRobotTeamInitialByKey

func (c *ConfManager) GetConfRobotTeamInitialByKey(key int) (confcsv.IRobotTeamInitial, error)

GetConfRobotTeamInitialByKey auto

func (*ConfManager) GetConfRobotTeamInitialNum

func (c *ConfManager) GetConfRobotTeamInitialNum() (int, error)

GetConfRobotTeamInitialNum auto

func (*ConfManager) GetConfRobotTeamNum

func (c *ConfManager) GetConfRobotTeamNum() (int, error)

GetConfRobotTeamNum auto

type CsvAtData

type CsvAtData struct {
	ID         string
	DayStamp   int64
	ActivityID int
	Group      int
	Type       int
	State      int
	StartTime  int64
	EndTime    int64
}

func GetActivityTableConfigByType

func GetActivityTableConfigByType(t int) ([]*CsvAtData, error)

error: The first return value maybe is nil if error is not nil

type CsvLrc

type CsvLrc struct {
	*csvauto.LevelRaceConfig
	SFactor float64
}

type CsvLrgc

type CsvLrgc struct {
	*csvauto.LevelRaceGroupConfig
	Dmax float64
	Dmin float64
}

func GetLevelRaceGroupConfigByID

func GetLevelRaceGroupConfigByID(id int) (*CsvLrgc, error)

func GetLevelRaceGroupCsvConfigBySL

func GetLevelRaceGroupCsvConfigBySL(s float64, t int) (*CsvLrgc, error)

type CsvLrrc

type CsvLrrc struct {
	*csvauto.LevelRaceResultConfig
	RrateParse [][]float64
}

type CsvLruc

type CsvLruc struct {
	*csvauto.LevelRaceUsergroupConfig
	TRange []float64
}

type CsvRobotName

type CsvRobotName struct {
	*csvauto.RobotName
}

type CsvRobotNew

type CsvRobotNew struct {
	*csvauto.RobotNew
	TimeMultiplierParse []float64
}

func GetRobotNewByID

func GetRobotNewByID(id int) (*CsvRobotNew, error)

type IConfManager

type IConfManager interface {
	GetConfLevelRaceUsergroupConfigNum() (int, error)
	GetConfLevelRaceUsergroupConfigByKey(key int) (confcsv.ILevelRaceUsergroupConfig, error)
	GetConfLevelRaceUsergroupConfigByIndex(index int) (confcsv.ILevelRaceUsergroupConfig, error)

	GetConfRobotNum() (int, error)
	GetConfRobotByKey(key int) (confcsv.IRobot, error)
	GetConfRobotByIndex(index int) (confcsv.IRobot, error)

	GetConfRobotNameNum() (int, error)
	GetConfRobotNameByKey(key int) (confcsv.IRobotName, error)
	GetConfRobotNameByIndex(index int) (confcsv.IRobotName, error)

	GetConfRobotNewNum() (int, error)
	GetConfRobotNewByKey(key int) (confcsv.IRobotNew, error)
	GetConfRobotNewByIndex(index int) (confcsv.IRobotNew, error)

	GetConfRobotTeamChatNum() (int, error)
	GetConfRobotTeamChatByKey(key int) (confcsv.IRobotTeamChat, error)
	GetConfRobotTeamChatByIndex(index int) (confcsv.IRobotTeamChat, error)

	GetConfActivityTableNum() (int, error)
	GetConfActivityTableByKey(key string) (confcsv.IActivityTable, error)
	GetConfActivityTableByIndex(index int) (confcsv.IActivityTable, error)

	GetConfLevelRaceConfigNum() (int, error)
	GetConfLevelRaceConfigByKey(key int) (confcsv.ILevelRaceConfig, error)
	GetConfLevelRaceConfigByIndex(index int) (confcsv.ILevelRaceConfig, error)

	GetConfLevelRaceGroupConfigNum() (int, error)
	GetConfLevelRaceGroupConfigByKey(key int) (confcsv.ILevelRaceGroupConfig, error)
	GetConfLevelRaceGroupConfigByIndex(index int) (confcsv.ILevelRaceGroupConfig, error)

	GetConfLevelRaceResultConfigNum() (int, error)
	GetConfLevelRaceResultConfigByKey(key int) (confcsv.ILevelRaceResultConfig, error)
	GetConfLevelRaceResultConfigByIndex(index int) (confcsv.ILevelRaceResultConfig, error)

	GetConfRobotTeamNum() (int, error)
	GetConfRobotTeamByKey(key int) (confcsv.IRobotTeam, error)
	GetConfRobotTeamByIndex(index int) (confcsv.IRobotTeam, error)

	GetConfRobotTeamConfigNum() (int, error)
	GetConfRobotTeamConfigByKey(key int) (confcsv.IRobotTeamConfig, error)
	GetConfRobotTeamConfigByIndex(index int) (confcsv.IRobotTeamConfig, error)

	GetConfRobotTeamInitialNum() (int, error)
	GetConfRobotTeamInitialByKey(key int) (confcsv.IRobotTeamInitial, error)
	GetConfRobotTeamInitialByIndex(index int) (confcsv.IRobotTeamInitial, error)
}

IConfManager 配置管理中心

Directories

Path Synopsis
Package csvauto GENERATED BY CSV AUTO; DO NOT EDIT
Package csvauto GENERATED BY CSV AUTO; DO NOT EDIT
csv2go
Package csv2go Manager Gen
Package csv2go Manager Gen

Jump to

Keyboard shortcuts

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