eventconf

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2019 License: GPL-3.0 Imports: 4 Imported by: 42

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Defaults = map[string]interface{}{
	"DAllowEvents":   false,
	"DCurrentEvents": []ConfiguredEvent{},
	"DEnforceGlobal": false,
}

defaults default variable names MUST be "D" + (nameOfVariable)

View Source
var EventTypes = map[string]int64{
	"specialStage":  enums.EventIDSpecialStage,
	"raidBoss":      enums.EventIDRaidBoss,
	"collectObject": enums.EventIDCollectObject,
	"gacha":         enums.EventIDGacha,
	"advert":        enums.EventIDAdvert,
	"quick":         enums.EventIDQuick,
	"bgm":           enums.EventIDBGM,
}

Functions

func Parse

func Parse(filename string) error

Types

type ConfigFile

type ConfigFile struct {
	AllowEvents   bool              `json:"allowEvents,omitempty"`
	CurrentEvents []ConfiguredEvent `json:"currentEvents,omitempty"`
	EnforceGlobal bool              `json:"enforceGlobal,omitempty"`
}
var CFile ConfigFile

type ConfiguredEvent

type ConfiguredEvent struct {
	ID        int64  `json:"id"`
	Type      string `json:"type"`
	StartTime int64  `json:"startTime"` // *
	EndTime   int64  `json:"endTime"`   // *
}

func (ConfiguredEvent) HasValidType

func (c ConfiguredEvent) HasValidType() bool

func (ConfiguredEvent) RealType

func (c ConfiguredEvent) RealType() int64

Jump to

Keyboard shortcuts

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