loader

package
v0.0.0-...-af867be Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolToInt

func BoolToInt(ok bool) int

func Register

func Register(gen MessagerGenerator)

Types

type ActivityConf

type ActivityConf struct {
	UnimplementedMessager
	// contains filtered or unexported fields
}

ActivityConf is a wrapper around protobuf message: protoconf.ActivityConf.

It is designed for three goals:

  1. Easy use: simple yet powerful accessers.
  2. Elegant API: concise and clean functions.
  3. Extensibility: Map, OrdererdMap, Index...

func (*ActivityConf) Data

func (x *ActivityConf) Data() *protoconf.ActivityConf

Data returns the ActivityConf's inner message data.

func (*ActivityConf) FindChapter

func (x *ActivityConf) FindChapter(chapterId uint32) []*protoconf.ActivityConf_Activity_Chapter

FindChapter returns a slice of all values of the given key.

func (*ActivityConf) FindChapterMap

func (x *ActivityConf) FindChapterMap() ActivityConf_Index_ChapterMap

FindChapterMap returns the index(ChapterID) to value(protoconf.ActivityConf_Activity_Chapter) map. One key may correspond to multiple values, which are contained by a slice.

func (*ActivityConf) FindFirstChapter

func (x *ActivityConf) FindFirstChapter(chapterId uint32) *protoconf.ActivityConf_Activity_Chapter

FindFirstChapter returns the first value of the given key, or nil if the key correspond to no value.

func (*ActivityConf) FindFirstNamedChapter

func (x *ActivityConf) FindFirstNamedChapter(chapterName string) *protoconf.ActivityConf_Activity_Chapter

FindFirstNamedChapter returns the first value of the given key, or nil if the key correspond to no value.

func (*ActivityConf) FindNamedChapter

func (x *ActivityConf) FindNamedChapter(chapterName string) []*protoconf.ActivityConf_Activity_Chapter

FindNamedChapter returns a slice of all values of the given key.

func (*ActivityConf) FindNamedChapterMap

func (x *ActivityConf) FindNamedChapterMap() ActivityConf_Index_NamedChapterMap

FindNamedChapterMap returns the index(ChapterName@NamedChapter) to value(protoconf.ActivityConf_Activity_Chapter) map. One key may correspond to multiple values, which are contained by a slice.

func (*ActivityConf) Get1

func (x *ActivityConf) Get1(activityId uint64) (*protoconf.ActivityConf_Activity, error)

Get1 finds value in the 1-level map. It will return NotFound error if the key is not found.

func (*ActivityConf) Get2

func (x *ActivityConf) Get2(activityId uint64, chapterId uint32) (*protoconf.ActivityConf_Activity_Chapter, error)

Get2 finds value in the 2-level map. It will return NotFound error if the key is not found.

func (*ActivityConf) Get3

func (x *ActivityConf) Get3(activityId uint64, chapterId uint32, sectionId uint32) (*protoconf.Section, error)

Get3 finds value in the 3-level map. It will return NotFound error if the key is not found.

func (*ActivityConf) Get4

func (x *ActivityConf) Get4(activityId uint64, chapterId uint32, sectionId uint32, key4 uint32) (int32, error)

Get4 finds value in the 4-level map. It will return NotFound error if the key is not found.

func (*ActivityConf) GetOrderedMap

GetOrderedMap returns the 1-level ordered map.

func (*ActivityConf) GetOrderedMap1

GetOrderedMap1 finds value in the 1-level ordered map. It will return NotFound error if the key is not found.

func (*ActivityConf) GetOrderedMap2

func (x *ActivityConf) GetOrderedMap2(activityId uint64, chapterId uint32) (*ProtoconfActivityConfActivityChapterSectionMap_OrderedMap, error)

GetOrderedMap2 finds value in the 2-level ordered map. It will return NotFound error if the key is not found.

func (*ActivityConf) GetOrderedMap3

func (x *ActivityConf) GetOrderedMap3(activityId uint64, chapterId uint32, sectionId uint32) (*ProtoconfSectionSectionRankMap_OrderedMap, error)

GetOrderedMap3 finds value in the 3-level ordered map. It will return NotFound error if the key is not found.

func (*ActivityConf) Load

func (x *ActivityConf) Load(dir string, format format.Format, options ...load.Option) error

Load fills ActivityConf's inner message from file in the specified directory and format.

func (*ActivityConf) Message

func (x *ActivityConf) Message() proto.Message

Message returns the ActivityConf's inner message data.

func (*ActivityConf) Messager

func (x *ActivityConf) Messager() Messager

Messager is used to implement Checker interface.

func (*ActivityConf) Name

func (x *ActivityConf) Name() string

Name returns the ActivityConf's message name.

func (*ActivityConf) Store

func (x *ActivityConf) Store(dir string, format format.Format, options ...store.Option) error

Store writes ActivityConf's inner message to file in the specified directory and format. Available formats: JSON, Bin, and Text.

type ActivityConf_Index_ChapterMap

type ActivityConf_Index_ChapterMap = map[uint32][]*protoconf.ActivityConf_Activity_Chapter

Index types. Index: ChapterID

type ActivityConf_Index_NamedChapterMap

type ActivityConf_Index_NamedChapterMap = map[string][]*protoconf.ActivityConf_Activity_Chapter

Index: ChapterName@NamedChapter

type BaseHeroItemMap_OrderedMap

type BaseHeroItemMap_OrderedMap = treemap.TreeMap[string, *base.Item]

OrderedMap types.

type ChapterConf

type ChapterConf struct {
	UnimplementedMessager
	// contains filtered or unexported fields
}

ChapterConf is a wrapper around protobuf message: protoconf.ChapterConf.

It is designed for three goals:

  1. Easy use: simple yet powerful accessers.
  2. Elegant API: concise and clean functions.
  3. Extensibility: Map, OrdererdMap, Index...

func (*ChapterConf) Data

func (x *ChapterConf) Data() *protoconf.ChapterConf

Data returns the ChapterConf's inner message data.

func (*ChapterConf) Get1

Get1 finds value in the 1-level map. It will return NotFound error if the key is not found.

func (*ChapterConf) Load

func (x *ChapterConf) Load(dir string, format format.Format, options ...load.Option) error

Load fills ChapterConf's inner message from file in the specified directory and format.

func (*ChapterConf) Message

func (x *ChapterConf) Message() proto.Message

Message returns the ChapterConf's inner message data.

func (*ChapterConf) Messager

func (x *ChapterConf) Messager() Messager

Messager is used to implement Checker interface.

func (*ChapterConf) Name

func (x *ChapterConf) Name() string

Name returns the ChapterConf's message name.

func (*ChapterConf) Store

func (x *ChapterConf) Store(dir string, format format.Format, options ...store.Option) error

Store writes ChapterConf's inner message to file in the specified directory and format. Available formats: JSON, Bin, and Text.

type Checker

type Checker interface {
	Messager() Messager
	Check(hub *Hub) error
	CheckCompatibility(hub, newHub *Hub) error
}

type HeroBaseConf

type HeroBaseConf struct {
	UnimplementedMessager
	// contains filtered or unexported fields
}

HeroBaseConf is a wrapper around protobuf message: protoconf.HeroBaseConf.

It is designed for three goals:

  1. Easy use: simple yet powerful accessers.
  2. Elegant API: concise and clean functions.
  3. Extensibility: Map, OrdererdMap, Index...

func (*HeroBaseConf) Data

func (x *HeroBaseConf) Data() *protoconf.HeroBaseConf

Data returns the HeroBaseConf's inner message data.

func (*HeroBaseConf) Get1

func (x *HeroBaseConf) Get1(name string) (*base.Hero, error)

Get1 finds value in the 1-level map. It will return NotFound error if the key is not found.

func (*HeroBaseConf) Get2

func (x *HeroBaseConf) Get2(name string, id string) (*base.Item, error)

Get2 finds value in the 2-level map. It will return NotFound error if the key is not found.

func (*HeroBaseConf) GetOrderedMap

GetOrderedMap returns the 1-level ordered map.

func (*HeroBaseConf) GetOrderedMap1

func (x *HeroBaseConf) GetOrderedMap1(name string) (*BaseHeroItemMap_OrderedMap, error)

GetOrderedMap1 finds value in the 1-level ordered map. It will return NotFound error if the key is not found.

func (*HeroBaseConf) Load

func (x *HeroBaseConf) Load(dir string, format format.Format, options ...load.Option) error

Load fills HeroBaseConf's inner message from file in the specified directory and format.

func (*HeroBaseConf) Message

func (x *HeroBaseConf) Message() proto.Message

Message returns the HeroBaseConf's inner message data.

func (*HeroBaseConf) Messager

func (x *HeroBaseConf) Messager() Messager

Messager is used to implement Checker interface.

func (*HeroBaseConf) Name

func (x *HeroBaseConf) Name() string

Name returns the HeroBaseConf's message name.

func (*HeroBaseConf) Store

func (x *HeroBaseConf) Store(dir string, format format.Format, options ...store.Option) error

Store writes HeroBaseConf's inner message to file in the specified directory and format. Available formats: JSON, Bin, and Text.

type HeroConf

type HeroConf struct {
	UnimplementedMessager
	// contains filtered or unexported fields
}

HeroConf is a wrapper around protobuf message: protoconf.HeroConf.

It is designed for three goals:

  1. Easy use: simple yet powerful accessers.
  2. Elegant API: concise and clean functions.
  3. Extensibility: Map, OrdererdMap, Index...

func (*HeroConf) Data

func (x *HeroConf) Data() *protoconf.HeroConf

Data returns the HeroConf's inner message data.

func (*HeroConf) FindAttr

func (x *HeroConf) FindAttr(title string) []*protoconf.HeroConf_Hero_Attr

FindAttr returns a slice of all values of the given key.

func (*HeroConf) FindAttrMap

func (x *HeroConf) FindAttrMap() HeroConf_Index_AttrMap

FindAttrMap returns the index(Title) to value(protoconf.HeroConf_Hero_Attr) map. One key may correspond to multiple values, which are contained by a slice.

func (*HeroConf) FindFirstAttr

func (x *HeroConf) FindFirstAttr(title string) *protoconf.HeroConf_Hero_Attr

FindFirstAttr returns the first value of the given key, or nil if the key correspond to no value.

func (*HeroConf) Get1

func (x *HeroConf) Get1(name string) (*protoconf.HeroConf_Hero, error)

Get1 finds value in the 1-level map. It will return NotFound error if the key is not found.

func (*HeroConf) Get2

func (x *HeroConf) Get2(name string, title string) (*protoconf.HeroConf_Hero_Attr, error)

Get2 finds value in the 2-level map. It will return NotFound error if the key is not found.

func (*HeroConf) Load

func (x *HeroConf) Load(dir string, format format.Format, options ...load.Option) error

Load fills HeroConf's inner message from file in the specified directory and format.

func (*HeroConf) Message

func (x *HeroConf) Message() proto.Message

Message returns the HeroConf's inner message data.

func (*HeroConf) Messager

func (x *HeroConf) Messager() Messager

Messager is used to implement Checker interface.

func (*HeroConf) Name

func (x *HeroConf) Name() string

Name returns the HeroConf's message name.

func (*HeroConf) Store

func (x *HeroConf) Store(dir string, format format.Format, options ...store.Option) error

Store writes HeroConf's inner message to file in the specified directory and format. Available formats: JSON, Bin, and Text.

type HeroConf_Index_AttrMap

type HeroConf_Index_AttrMap = map[string][]*protoconf.HeroConf_Hero_Attr

Index types. Index: Title

type Hub

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

Hub is the messager manager.

func NewHub

func NewHub() *Hub

func (*Hub) GetActivityConf

func (h *Hub) GetActivityConf() *ActivityConf

func (*Hub) GetChapterConf

func (h *Hub) GetChapterConf() *ChapterConf

func (*Hub) GetHeroBaseConf

func (h *Hub) GetHeroBaseConf() *HeroBaseConf

func (*Hub) GetHeroConf

func (h *Hub) GetHeroConf() *HeroConf

func (*Hub) GetItemConf

func (h *Hub) GetItemConf() *ItemConf

func (*Hub) GetLastLoadedTime

func (h *Hub) GetLastLoadedTime() time.Time

GetLastLoadedTime returns the time when hub's messagerMap was last set.

func (*Hub) GetMessager

func (h *Hub) GetMessager(name string) Messager

GetMessager finds and returns the specified Messenger in hub.

func (*Hub) GetMessagerMap

func (h *Hub) GetMessagerMap() MessagerMap

GetMessagerMap returns hub's inner field messagerMap.

func (*Hub) GetPatchMergeConf

func (h *Hub) GetPatchMergeConf() *PatchMergeConf

func (*Hub) GetPatchReplaceConf

func (h *Hub) GetPatchReplaceConf() *PatchReplaceConf

func (*Hub) GetRecursivePatchConf

func (h *Hub) GetRecursivePatchConf() *RecursivePatchConf

func (*Hub) GetThemeConf

func (h *Hub) GetThemeConf() *ThemeConf

func (*Hub) Load

func (h *Hub) Load(dir string, format format.Format, options ...load.Option) error

Load fills messages from files in the specified directory and format.

func (*Hub) NewMessagerMap

func (h *Hub) NewMessagerMap(filter load.FilterFunc) MessagerMap

NewMessagerMap creates a new MessagerMap.

func (*Hub) SetMessagerMap

func (h *Hub) SetMessagerMap(messagerMap MessagerMap)

SetMessagerMap sets hub's inner field messagerMap.

func (*Hub) Store

func (h *Hub) Store(dir string, format format.Format, options ...store.Option) error

Store stores protobuf messages to files in the specified directory and format. Available formats: JSON, Bin, and Text.

type ItemConf

type ItemConf struct {
	UnimplementedMessager
	// contains filtered or unexported fields
}

ItemConf is a wrapper around protobuf message: protoconf.ItemConf.

It is designed for three goals:

  1. Easy use: simple yet powerful accessers.
  2. Elegant API: concise and clean functions.
  3. Extensibility: Map, OrdererdMap, Index...

func (*ItemConf) Data

func (x *ItemConf) Data() *protoconf.ItemConf

Data returns the ItemConf's inner message data.

func (*ItemConf) FindAwardItem

FindAwardItem returns a slice of all values of the given key.

func (*ItemConf) FindAwardItemMap

func (x *ItemConf) FindAwardItemMap() ItemConf_Index_AwardItemMap

FindAwardItemMap returns the index((ID,Name)@AwardItem) to value(protoconf.ItemConf_Item) map. One key may correspond to multiple values, which are contained by a slice.

func (*ItemConf) FindFirstAwardItem

func (x *ItemConf) FindFirstAwardItem(key ItemConf_Index_AwardItemKey) *protoconf.ItemConf_Item

FindFirstAwardItem returns the first value of the given key, or nil if the key correspond to no value.

func (*ItemConf) FindFirstItem

func (x *ItemConf) FindFirstItem(type_ protoconf.FruitType) *protoconf.ItemConf_Item

FindFirstItem returns the first value of the given key, or nil if the key correspond to no value.

func (*ItemConf) FindFirstItemDefaultInfo

func (x *ItemConf) FindFirstItemDefaultInfo(default_ string) *protoconf.ItemConf_Item

FindFirstItemDefaultInfo returns the first value of the given key, or nil if the key correspond to no value.

func (*ItemConf) FindFirstItemExtInfo

func (x *ItemConf) FindFirstItemExtInfo(extType protoconf.FruitType) *protoconf.ItemConf_Item

FindFirstItemExtInfo returns the first value of the given key, or nil if the key correspond to no value.

func (*ItemConf) FindFirstItemInfo

func (x *ItemConf) FindFirstItemInfo(param int32) *protoconf.ItemConf_Item

FindFirstItemInfo returns the first value of the given key, or nil if the key correspond to no value.

func (*ItemConf) FindFirstItemPathDir

func (x *ItemConf) FindFirstItemPathDir(dir string) *protoconf.ItemConf_Item

FindFirstItemPathDir returns the first value of the given key, or nil if the key correspond to no value.

func (*ItemConf) FindFirstItemPathFriendID

func (x *ItemConf) FindFirstItemPathFriendID(id uint32) *protoconf.ItemConf_Item

FindFirstItemPathFriendID returns the first value of the given key, or nil if the key correspond to no value.

func (*ItemConf) FindFirstItemPathName

func (x *ItemConf) FindFirstItemPathName(name string) *protoconf.ItemConf_Item

FindFirstItemPathName returns the first value of the given key, or nil if the key correspond to no value.

func (*ItemConf) FindFirstSpecialItem

func (x *ItemConf) FindFirstSpecialItem(key ItemConf_Index_SpecialItemKey) *protoconf.ItemConf_Item

FindFirstSpecialItem returns the first value of the given key, or nil if the key correspond to no value.

func (*ItemConf) FindFirstUseEffectType

func (x *ItemConf) FindFirstUseEffectType(type_ protoconf.UseEffect_Type) *protoconf.ItemConf_Item

FindFirstUseEffectType returns the first value of the given key, or nil if the key correspond to no value.

func (*ItemConf) FindItem

func (x *ItemConf) FindItem(type_ protoconf.FruitType) []*protoconf.ItemConf_Item

FindItem returns a slice of all values of the given key.

func (*ItemConf) FindItemDefaultInfo

func (x *ItemConf) FindItemDefaultInfo(default_ string) []*protoconf.ItemConf_Item

FindItemDefaultInfo returns a slice of all values of the given key.

func (*ItemConf) FindItemDefaultInfoMap

func (x *ItemConf) FindItemDefaultInfoMap() ItemConf_Index_ItemDefaultInfoMap

FindItemDefaultInfoMap returns the index(Default@ItemDefaultInfo) to value(protoconf.ItemConf_Item) map. One key may correspond to multiple values, which are contained by a slice.

func (*ItemConf) FindItemExtInfo

func (x *ItemConf) FindItemExtInfo(extType protoconf.FruitType) []*protoconf.ItemConf_Item

FindItemExtInfo returns a slice of all values of the given key.

func (*ItemConf) FindItemExtInfoMap

func (x *ItemConf) FindItemExtInfoMap() ItemConf_Index_ItemExtInfoMap

FindItemExtInfoMap returns the index(ExtType@ItemExtInfo) to value(protoconf.ItemConf_Item) map. One key may correspond to multiple values, which are contained by a slice.

func (*ItemConf) FindItemInfo

func (x *ItemConf) FindItemInfo(param int32) []*protoconf.ItemConf_Item

FindItemInfo returns a slice of all values of the given key.

func (*ItemConf) FindItemInfoMap

func (x *ItemConf) FindItemInfoMap() ItemConf_Index_ItemInfoMap

FindItemInfoMap returns the index(Param@ItemInfo) to value(protoconf.ItemConf_Item) map. One key may correspond to multiple values, which are contained by a slice.

func (*ItemConf) FindItemMap

func (x *ItemConf) FindItemMap() ItemConf_Index_ItemMap

FindItemMap returns the index(Type) to value(protoconf.ItemConf_Item) map. One key may correspond to multiple values, which are contained by a slice.

func (*ItemConf) FindItemPathDir

func (x *ItemConf) FindItemPathDir(dir string) []*protoconf.ItemConf_Item

FindItemPathDir returns a slice of all values of the given key.

func (*ItemConf) FindItemPathDirMap

func (x *ItemConf) FindItemPathDirMap() ItemConf_Index_ItemPathDirMap

FindItemPathDirMap returns the index(PathDir@ItemPathDir) to value(protoconf.ItemConf_Item) map. One key may correspond to multiple values, which are contained by a slice.

func (*ItemConf) FindItemPathFriendID

func (x *ItemConf) FindItemPathFriendID(id uint32) []*protoconf.ItemConf_Item

FindItemPathFriendID returns a slice of all values of the given key.

func (*ItemConf) FindItemPathFriendIDMap

func (x *ItemConf) FindItemPathFriendIDMap() ItemConf_Index_ItemPathFriendIDMap

FindItemPathFriendIDMap returns the index(PathFriendID@ItemPathFriendID) to value(protoconf.ItemConf_Item) map. One key may correspond to multiple values, which are contained by a slice.

func (*ItemConf) FindItemPathName

func (x *ItemConf) FindItemPathName(name string) []*protoconf.ItemConf_Item

FindItemPathName returns a slice of all values of the given key.

func (*ItemConf) FindItemPathNameMap

func (x *ItemConf) FindItemPathNameMap() ItemConf_Index_ItemPathNameMap

FindItemPathNameMap returns the index(PathName@ItemPathName) to value(protoconf.ItemConf_Item) map. One key may correspond to multiple values, which are contained by a slice.

func (*ItemConf) FindSpecialItem

FindSpecialItem returns a slice of all values of the given key.

func (*ItemConf) FindSpecialItemMap

func (x *ItemConf) FindSpecialItemMap() ItemConf_Index_SpecialItemMap

FindSpecialItemMap returns the index((ID,Type,Param,ExtType)@SpecialItem) to value(protoconf.ItemConf_Item) map. One key may correspond to multiple values, which are contained by a slice.

func (*ItemConf) FindUseEffectType

func (x *ItemConf) FindUseEffectType(type_ protoconf.UseEffect_Type) []*protoconf.ItemConf_Item

FindUseEffectType returns a slice of all values of the given key.

func (*ItemConf) FindUseEffectTypeMap

func (x *ItemConf) FindUseEffectTypeMap() ItemConf_Index_UseEffectTypeMap

FindUseEffectTypeMap returns the index(UseEffectType@UseEffectType) to value(protoconf.ItemConf_Item) map. One key may correspond to multiple values, which are contained by a slice.

func (*ItemConf) Get1

func (x *ItemConf) Get1(id uint32) (*protoconf.ItemConf_Item, error)

Get1 finds value in the 1-level map. It will return NotFound error if the key is not found.

func (*ItemConf) GetOrderedMap

func (x *ItemConf) GetOrderedMap() *ProtoconfItemConfItemMap_OrderedMap

GetOrderedMap returns the 1-level ordered map.

func (*ItemConf) Load

func (x *ItemConf) Load(dir string, format format.Format, options ...load.Option) error

Load fills ItemConf's inner message from file in the specified directory and format.

func (*ItemConf) Message

func (x *ItemConf) Message() proto.Message

Message returns the ItemConf's inner message data.

func (*ItemConf) Messager

func (x *ItemConf) Messager() Messager

Messager is used to implement Checker interface.

func (*ItemConf) Name

func (x *ItemConf) Name() string

Name returns the ItemConf's message name.

func (*ItemConf) Store

func (x *ItemConf) Store(dir string, format format.Format, options ...store.Option) error

Store writes ItemConf's inner message to file in the specified directory and format. Available formats: JSON, Bin, and Text.

type ItemConf_Index_AwardItemKey

type ItemConf_Index_AwardItemKey struct {
	Id   uint32
	Name string
}

Index: (ID,Name)@AwardItem

type ItemConf_Index_AwardItemMap

type ItemConf_Index_AwardItemMap = map[ItemConf_Index_AwardItemKey][]*protoconf.ItemConf_Item

type ItemConf_Index_ItemDefaultInfoMap

type ItemConf_Index_ItemDefaultInfoMap = map[string][]*protoconf.ItemConf_Item

Index: Default@ItemDefaultInfo

type ItemConf_Index_ItemExtInfoMap

type ItemConf_Index_ItemExtInfoMap = map[protoconf.FruitType][]*protoconf.ItemConf_Item

Index: ExtType@ItemExtInfo

type ItemConf_Index_ItemInfoMap

type ItemConf_Index_ItemInfoMap = map[int32][]*protoconf.ItemConf_Item

Index: Param@ItemInfo

type ItemConf_Index_ItemMap

type ItemConf_Index_ItemMap = map[protoconf.FruitType][]*protoconf.ItemConf_Item

Index types. Index: Type

type ItemConf_Index_ItemPathDirMap

type ItemConf_Index_ItemPathDirMap = map[string][]*protoconf.ItemConf_Item

Index: PathDir@ItemPathDir

type ItemConf_Index_ItemPathFriendIDMap

type ItemConf_Index_ItemPathFriendIDMap = map[uint32][]*protoconf.ItemConf_Item

Index: PathFriendID@ItemPathFriendID

type ItemConf_Index_ItemPathNameMap

type ItemConf_Index_ItemPathNameMap = map[string][]*protoconf.ItemConf_Item

Index: PathName@ItemPathName

type ItemConf_Index_SpecialItemKey

type ItemConf_Index_SpecialItemKey struct {
	Id      uint32
	Type    protoconf.FruitType
	Param   int32
	ExtType protoconf.FruitType
}

Index: (ID,Type,Param,ExtType)@SpecialItem

type ItemConf_Index_SpecialItemMap

type ItemConf_Index_SpecialItemMap = map[ItemConf_Index_SpecialItemKey][]*protoconf.ItemConf_Item

type ItemConf_Index_UseEffectTypeMap

type ItemConf_Index_UseEffectTypeMap = map[protoconf.UseEffect_Type][]*protoconf.ItemConf_Item

Index: UseEffectType@UseEffectType

type Messager

type Messager interface {
	Checker
	// Name returns the unique message name.
	Name() string
	// GetStats returns stats info.
	GetStats() *Stats
	// Load fills message from file in the specified directory and format.
	Load(dir string, fmt format.Format, options ...load.Option) error
	// Store writes message to file in the specified directory and format.
	Store(dir string, fmt format.Format, options ...store.Option) error

	// ProcessAfterLoadAll is invoked after all messagers loaded.
	ProcessAfterLoadAll(hub *Hub) error
	// Message returns the inner message data.
	Message() proto.Message
	// contains filtered or unexported methods
}

type MessagerGenerator

type MessagerGenerator = func() Messager

type MessagerMap

type MessagerMap = map[string]Messager

type PatchMergeConf

type PatchMergeConf struct {
	UnimplementedMessager
	// contains filtered or unexported fields
}

PatchMergeConf is a wrapper around protobuf message: protoconf.PatchMergeConf.

It is designed for three goals:

  1. Easy use: simple yet powerful accessers.
  2. Elegant API: concise and clean functions.
  3. Extensibility: Map, OrdererdMap, Index...

func (*PatchMergeConf) Data

Data returns the PatchMergeConf's inner message data.

func (*PatchMergeConf) Get1

func (x *PatchMergeConf) Get1(id uint32) (*protoconf.Item, error)

Get1 finds value in the 1-level map. It will return NotFound error if the key is not found.

func (*PatchMergeConf) Load

func (x *PatchMergeConf) Load(dir string, format format.Format, options ...load.Option) error

Load fills PatchMergeConf's inner message from file in the specified directory and format.

func (*PatchMergeConf) Message

func (x *PatchMergeConf) Message() proto.Message

Message returns the PatchMergeConf's inner message data.

func (*PatchMergeConf) Messager

func (x *PatchMergeConf) Messager() Messager

Messager is used to implement Checker interface.

func (*PatchMergeConf) Name

func (x *PatchMergeConf) Name() string

Name returns the PatchMergeConf's message name.

func (*PatchMergeConf) Store

func (x *PatchMergeConf) Store(dir string, format format.Format, options ...store.Option) error

Store writes PatchMergeConf's inner message to file in the specified directory and format. Available formats: JSON, Bin, and Text.

type PatchReplaceConf

type PatchReplaceConf struct {
	UnimplementedMessager
	// contains filtered or unexported fields
}

PatchReplaceConf is a wrapper around protobuf message: protoconf.PatchReplaceConf.

It is designed for three goals:

  1. Easy use: simple yet powerful accessers.
  2. Elegant API: concise and clean functions.
  3. Extensibility: Map, OrdererdMap, Index...

func (*PatchReplaceConf) Data

Data returns the PatchReplaceConf's inner message data.

func (*PatchReplaceConf) Load

func (x *PatchReplaceConf) Load(dir string, format format.Format, options ...load.Option) error

Load fills PatchReplaceConf's inner message from file in the specified directory and format.

func (*PatchReplaceConf) Message

func (x *PatchReplaceConf) Message() proto.Message

Message returns the PatchReplaceConf's inner message data.

func (*PatchReplaceConf) Messager

func (x *PatchReplaceConf) Messager() Messager

Messager is used to implement Checker interface.

func (*PatchReplaceConf) Name

func (x *PatchReplaceConf) Name() string

Name returns the PatchReplaceConf's message name.

func (*PatchReplaceConf) Store

func (x *PatchReplaceConf) Store(dir string, format format.Format, options ...store.Option) error

Store writes PatchReplaceConf's inner message to file in the specified directory and format. Available formats: JSON, Bin, and Text.

type ProtoconfActivityConfActivityChapterSectionMap_OrderedMapValue

type ProtoconfActivityConfActivityChapterSectionMap_OrderedMapValue = pair.Pair[*ProtoconfSectionSectionRankMap_OrderedMap, *protoconf.Section]

type ProtoconfHeroBaseConfHeroMap_OrderedMapValue

type ProtoconfHeroBaseConfHeroMap_OrderedMapValue = pair.Pair[*BaseHeroItemMap_OrderedMap, *base.Hero]

type ProtoconfItemConfItemMap_OrderedMap

type ProtoconfItemConfItemMap_OrderedMap = treemap.TreeMap[uint32, *protoconf.ItemConf_Item]

OrderedMap types.

type ProtoconfSectionSectionRankMap_OrderedMap

type ProtoconfSectionSectionRankMap_OrderedMap = treemap.TreeMap[uint32, int32]

OrderedMap types.

type RecursivePatchConf

type RecursivePatchConf struct {
	UnimplementedMessager
	// contains filtered or unexported fields
}

RecursivePatchConf is a wrapper around protobuf message: protoconf.RecursivePatchConf.

It is designed for three goals:

  1. Easy use: simple yet powerful accessers.
  2. Elegant API: concise and clean functions.
  3. Extensibility: Map, OrdererdMap, Index...

func (*RecursivePatchConf) Data

Data returns the RecursivePatchConf's inner message data.

func (*RecursivePatchConf) Get1

Get1 finds value in the 1-level map. It will return NotFound error if the key is not found.

func (*RecursivePatchConf) Get2

Get2 finds value in the 2-level map. It will return NotFound error if the key is not found.

func (*RecursivePatchConf) Get3

Get3 finds value in the 3-level map. It will return NotFound error if the key is not found.

func (*RecursivePatchConf) Get4

func (x *RecursivePatchConf) Get4(shopId uint32, goodsId uint32, type_ uint32, key4 int32) (int32, error)

Get4 finds value in the 4-level map. It will return NotFound error if the key is not found.

func (*RecursivePatchConf) Load

func (x *RecursivePatchConf) Load(dir string, format format.Format, options ...load.Option) error

Load fills RecursivePatchConf's inner message from file in the specified directory and format.

func (*RecursivePatchConf) Message

func (x *RecursivePatchConf) Message() proto.Message

Message returns the RecursivePatchConf's inner message data.

func (*RecursivePatchConf) Messager

func (x *RecursivePatchConf) Messager() Messager

Messager is used to implement Checker interface.

func (*RecursivePatchConf) Name

func (x *RecursivePatchConf) Name() string

Name returns the RecursivePatchConf's message name.

func (*RecursivePatchConf) Store

func (x *RecursivePatchConf) Store(dir string, format format.Format, options ...store.Option) error

Store writes RecursivePatchConf's inner message to file in the specified directory and format. Available formats: JSON, Bin, and Text.

type Registrar

type Registrar struct {
	Generators map[string]MessagerGenerator
}

func NewRegistrar

func NewRegistrar() *Registrar

func (*Registrar) Register

func (r *Registrar) Register(gen MessagerGenerator)

type Stats

type Stats struct {
	Duration time.Duration // total load time consuming.

}

type ThemeConf

type ThemeConf struct {
	UnimplementedMessager
	// contains filtered or unexported fields
}

ThemeConf is a wrapper around protobuf message: protoconf.ThemeConf.

It is designed for three goals:

  1. Easy use: simple yet powerful accessers.
  2. Elegant API: concise and clean functions.
  3. Extensibility: Map, OrdererdMap, Index...

func (*ThemeConf) Data

func (x *ThemeConf) Data() *protoconf.ThemeConf

Data returns the ThemeConf's inner message data.

func (*ThemeConf) Get1

func (x *ThemeConf) Get1(name string) (*protoconf.ThemeConf_Theme, error)

Get1 finds value in the 1-level map. It will return NotFound error if the key is not found.

func (*ThemeConf) Load

func (x *ThemeConf) Load(dir string, format format.Format, options ...load.Option) error

Load fills ThemeConf's inner message from file in the specified directory and format.

func (*ThemeConf) Message

func (x *ThemeConf) Message() proto.Message

Message returns the ThemeConf's inner message data.

func (*ThemeConf) Messager

func (x *ThemeConf) Messager() Messager

Messager is used to implement Checker interface.

func (*ThemeConf) Name

func (x *ThemeConf) Name() string

Name returns the ThemeConf's message name.

func (*ThemeConf) Store

func (x *ThemeConf) Store(dir string, format format.Format, options ...store.Option) error

Store writes ThemeConf's inner message to file in the specified directory and format. Available formats: JSON, Bin, and Text.

type UnimplementedMessager

type UnimplementedMessager struct {
	Stats Stats
}

func (*UnimplementedMessager) Check

func (x *UnimplementedMessager) Check(hub *Hub) error

func (*UnimplementedMessager) CheckCompatibility

func (x *UnimplementedMessager) CheckCompatibility(hub, newHub *Hub) error

func (*UnimplementedMessager) GetStats

func (x *UnimplementedMessager) GetStats() *Stats

func (*UnimplementedMessager) Load

func (x *UnimplementedMessager) Load(dir string, format format.Format, options ...load.Option) error

func (*UnimplementedMessager) Message

func (x *UnimplementedMessager) Message() proto.Message

func (*UnimplementedMessager) Messager

func (x *UnimplementedMessager) Messager() Messager

func (*UnimplementedMessager) Name

func (x *UnimplementedMessager) Name() string

func (*UnimplementedMessager) ProcessAfterLoadAll

func (x *UnimplementedMessager) ProcessAfterLoadAll(hub *Hub) error

func (*UnimplementedMessager) Store

func (x *UnimplementedMessager) Store(dir string, format format.Format, options ...store.Option) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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