Documentation ¶
Index ¶
- func BoolToInt(ok bool) int
- func Register(gen MessagerGenerator)
- type ActivityConf
- func (x *ActivityConf) Data() *protoconf.ActivityConf
- func (x *ActivityConf) FindChapter(chapterId uint32) []*protoconf.ActivityConf_Activity_Chapter
- func (x *ActivityConf) FindChapterMap() ActivityConf_Index_ChapterMap
- func (x *ActivityConf) FindFirstChapter(chapterId uint32) *protoconf.ActivityConf_Activity_Chapter
- func (x *ActivityConf) FindFirstNamedChapter(chapterName string) *protoconf.ActivityConf_Activity_Chapter
- func (x *ActivityConf) FindNamedChapter(chapterName string) []*protoconf.ActivityConf_Activity_Chapter
- func (x *ActivityConf) FindNamedChapterMap() ActivityConf_Index_NamedChapterMap
- func (x *ActivityConf) Get1(activityId uint64) (*protoconf.ActivityConf_Activity, error)
- func (x *ActivityConf) Get2(activityId uint64, chapterId uint32) (*protoconf.ActivityConf_Activity_Chapter, error)
- func (x *ActivityConf) Get3(activityId uint64, chapterId uint32, sectionId uint32) (*protoconf.Section, error)
- func (x *ActivityConf) Get4(activityId uint64, chapterId uint32, sectionId uint32, key4 uint32) (int32, error)
- func (x *ActivityConf) GetOrderedMap() *ProtoconfActivityConfActivityMap_OrderedMap
- func (x *ActivityConf) GetOrderedMap1(activityId uint64) (*ProtoconfActivityConfActivityChapterMap_OrderedMap, error)
- func (x *ActivityConf) GetOrderedMap2(activityId uint64, chapterId uint32) (*ProtoconfActivityConfActivityChapterSectionMap_OrderedMap, error)
- func (x *ActivityConf) GetOrderedMap3(activityId uint64, chapterId uint32, sectionId uint32) (*ProtoconfSectionSectionRankMap_OrderedMap, error)
- func (x *ActivityConf) Load(dir string, format format.Format, options ...load.Option) error
- func (x *ActivityConf) Message() proto.Message
- func (x *ActivityConf) Messager() Messager
- func (x *ActivityConf) Name() string
- func (x *ActivityConf) Store(dir string, format format.Format, options ...store.Option) error
- type ActivityConf_Index_ChapterMap
- type ActivityConf_Index_NamedChapterMap
- type BaseHeroItemMap_OrderedMap
- type ChapterConf
- func (x *ChapterConf) Data() *protoconf.ChapterConf
- func (x *ChapterConf) Get1(id uint64) (*protoconf.ChapterConf_Chapter, error)
- func (x *ChapterConf) Load(dir string, format format.Format, options ...load.Option) error
- func (x *ChapterConf) Message() proto.Message
- func (x *ChapterConf) Messager() Messager
- func (x *ChapterConf) Name() string
- func (x *ChapterConf) Store(dir string, format format.Format, options ...store.Option) error
- type Checker
- type HeroBaseConf
- func (x *HeroBaseConf) Data() *protoconf.HeroBaseConf
- func (x *HeroBaseConf) Get1(name string) (*base.Hero, error)
- func (x *HeroBaseConf) Get2(name string, id string) (*base.Item, error)
- func (x *HeroBaseConf) GetOrderedMap() *ProtoconfHeroBaseConfHeroMap_OrderedMap
- func (x *HeroBaseConf) GetOrderedMap1(name string) (*BaseHeroItemMap_OrderedMap, error)
- func (x *HeroBaseConf) Load(dir string, format format.Format, options ...load.Option) error
- func (x *HeroBaseConf) Message() proto.Message
- func (x *HeroBaseConf) Messager() Messager
- func (x *HeroBaseConf) Name() string
- func (x *HeroBaseConf) Store(dir string, format format.Format, options ...store.Option) error
- type HeroConf
- func (x *HeroConf) Data() *protoconf.HeroConf
- func (x *HeroConf) FindAttr(title string) []*protoconf.HeroConf_Hero_Attr
- func (x *HeroConf) FindAttrMap() HeroConf_Index_AttrMap
- func (x *HeroConf) FindFirstAttr(title string) *protoconf.HeroConf_Hero_Attr
- func (x *HeroConf) Get1(name string) (*protoconf.HeroConf_Hero, error)
- func (x *HeroConf) Get2(name string, title string) (*protoconf.HeroConf_Hero_Attr, error)
- func (x *HeroConf) Load(dir string, format format.Format, options ...load.Option) error
- func (x *HeroConf) Message() proto.Message
- func (x *HeroConf) Messager() Messager
- func (x *HeroConf) Name() string
- func (x *HeroConf) Store(dir string, format format.Format, options ...store.Option) error
- type HeroConf_Index_AttrMap
- type Hub
- func (h *Hub) GetActivityConf() *ActivityConf
- func (h *Hub) GetChapterConf() *ChapterConf
- func (h *Hub) GetHeroBaseConf() *HeroBaseConf
- func (h *Hub) GetHeroConf() *HeroConf
- func (h *Hub) GetItemConf() *ItemConf
- func (h *Hub) GetLastLoadedTime() time.Time
- func (h *Hub) GetMessager(name string) Messager
- func (h *Hub) GetMessagerMap() MessagerMap
- func (h *Hub) GetPatchMergeConf() *PatchMergeConf
- func (h *Hub) GetPatchReplaceConf() *PatchReplaceConf
- func (h *Hub) GetRecursivePatchConf() *RecursivePatchConf
- func (h *Hub) GetThemeConf() *ThemeConf
- func (h *Hub) Load(dir string, format format.Format, options ...load.Option) error
- func (h *Hub) NewMessagerMap(filter load.FilterFunc) MessagerMap
- func (h *Hub) SetMessagerMap(messagerMap MessagerMap)
- func (h *Hub) Store(dir string, format format.Format, options ...store.Option) error
- type ItemConf
- func (x *ItemConf) Data() *protoconf.ItemConf
- func (x *ItemConf) FindAwardItem(key ItemConf_Index_AwardItemKey) []*protoconf.ItemConf_Item
- func (x *ItemConf) FindAwardItemMap() ItemConf_Index_AwardItemMap
- func (x *ItemConf) FindFirstAwardItem(key ItemConf_Index_AwardItemKey) *protoconf.ItemConf_Item
- func (x *ItemConf) FindFirstItem(type_ protoconf.FruitType) *protoconf.ItemConf_Item
- func (x *ItemConf) FindFirstItemDefaultInfo(default_ string) *protoconf.ItemConf_Item
- func (x *ItemConf) FindFirstItemExtInfo(extType protoconf.FruitType) *protoconf.ItemConf_Item
- func (x *ItemConf) FindFirstItemInfo(param int32) *protoconf.ItemConf_Item
- func (x *ItemConf) FindFirstItemPathDir(dir string) *protoconf.ItemConf_Item
- func (x *ItemConf) FindFirstItemPathFriendID(id uint32) *protoconf.ItemConf_Item
- func (x *ItemConf) FindFirstItemPathName(name string) *protoconf.ItemConf_Item
- func (x *ItemConf) FindFirstSpecialItem(key ItemConf_Index_SpecialItemKey) *protoconf.ItemConf_Item
- func (x *ItemConf) FindFirstUseEffectType(type_ protoconf.UseEffect_Type) *protoconf.ItemConf_Item
- func (x *ItemConf) FindItem(type_ protoconf.FruitType) []*protoconf.ItemConf_Item
- func (x *ItemConf) FindItemDefaultInfo(default_ string) []*protoconf.ItemConf_Item
- func (x *ItemConf) FindItemDefaultInfoMap() ItemConf_Index_ItemDefaultInfoMap
- func (x *ItemConf) FindItemExtInfo(extType protoconf.FruitType) []*protoconf.ItemConf_Item
- func (x *ItemConf) FindItemExtInfoMap() ItemConf_Index_ItemExtInfoMap
- func (x *ItemConf) FindItemInfo(param int32) []*protoconf.ItemConf_Item
- func (x *ItemConf) FindItemInfoMap() ItemConf_Index_ItemInfoMap
- func (x *ItemConf) FindItemMap() ItemConf_Index_ItemMap
- func (x *ItemConf) FindItemPathDir(dir string) []*protoconf.ItemConf_Item
- func (x *ItemConf) FindItemPathDirMap() ItemConf_Index_ItemPathDirMap
- func (x *ItemConf) FindItemPathFriendID(id uint32) []*protoconf.ItemConf_Item
- func (x *ItemConf) FindItemPathFriendIDMap() ItemConf_Index_ItemPathFriendIDMap
- func (x *ItemConf) FindItemPathName(name string) []*protoconf.ItemConf_Item
- func (x *ItemConf) FindItemPathNameMap() ItemConf_Index_ItemPathNameMap
- func (x *ItemConf) FindSpecialItem(key ItemConf_Index_SpecialItemKey) []*protoconf.ItemConf_Item
- func (x *ItemConf) FindSpecialItemMap() ItemConf_Index_SpecialItemMap
- func (x *ItemConf) FindUseEffectType(type_ protoconf.UseEffect_Type) []*protoconf.ItemConf_Item
- func (x *ItemConf) FindUseEffectTypeMap() ItemConf_Index_UseEffectTypeMap
- func (x *ItemConf) Get1(id uint32) (*protoconf.ItemConf_Item, error)
- func (x *ItemConf) GetOrderedMap() *ProtoconfItemConfItemMap_OrderedMap
- func (x *ItemConf) Load(dir string, format format.Format, options ...load.Option) error
- func (x *ItemConf) Message() proto.Message
- func (x *ItemConf) Messager() Messager
- func (x *ItemConf) Name() string
- func (x *ItemConf) Store(dir string, format format.Format, options ...store.Option) error
- type ItemConf_Index_AwardItemKey
- type ItemConf_Index_AwardItemMap
- type ItemConf_Index_ItemDefaultInfoMap
- type ItemConf_Index_ItemExtInfoMap
- type ItemConf_Index_ItemInfoMap
- type ItemConf_Index_ItemMap
- type ItemConf_Index_ItemPathDirMap
- type ItemConf_Index_ItemPathFriendIDMap
- type ItemConf_Index_ItemPathNameMap
- type ItemConf_Index_SpecialItemKey
- type ItemConf_Index_SpecialItemMap
- type ItemConf_Index_UseEffectTypeMap
- type Messager
- type MessagerGenerator
- type MessagerMap
- type PatchMergeConf
- func (x *PatchMergeConf) Data() *protoconf.PatchMergeConf
- func (x *PatchMergeConf) Get1(id uint32) (*protoconf.Item, error)
- func (x *PatchMergeConf) Load(dir string, format format.Format, options ...load.Option) error
- func (x *PatchMergeConf) Message() proto.Message
- func (x *PatchMergeConf) Messager() Messager
- func (x *PatchMergeConf) Name() string
- func (x *PatchMergeConf) Store(dir string, format format.Format, options ...store.Option) error
- type PatchReplaceConf
- func (x *PatchReplaceConf) Data() *protoconf.PatchReplaceConf
- func (x *PatchReplaceConf) Load(dir string, format format.Format, options ...load.Option) error
- func (x *PatchReplaceConf) Message() proto.Message
- func (x *PatchReplaceConf) Messager() Messager
- func (x *PatchReplaceConf) Name() string
- func (x *PatchReplaceConf) Store(dir string, format format.Format, options ...store.Option) error
- type ProtoconfActivityConfActivityChapterMap_OrderedMap
- type ProtoconfActivityConfActivityChapterMap_OrderedMapValue
- type ProtoconfActivityConfActivityChapterSectionMap_OrderedMap
- type ProtoconfActivityConfActivityChapterSectionMap_OrderedMapValue
- type ProtoconfActivityConfActivityMap_OrderedMap
- type ProtoconfActivityConfActivityMap_OrderedMapValue
- type ProtoconfHeroBaseConfHeroMap_OrderedMap
- type ProtoconfHeroBaseConfHeroMap_OrderedMapValue
- type ProtoconfItemConfItemMap_OrderedMap
- type ProtoconfSectionSectionRankMap_OrderedMap
- type RecursivePatchConf
- func (x *RecursivePatchConf) Data() *protoconf.RecursivePatchConf
- func (x *RecursivePatchConf) Get1(shopId uint32) (*protoconf.RecursivePatchConf_Shop, error)
- func (x *RecursivePatchConf) Get2(shopId uint32, goodsId uint32) (*protoconf.RecursivePatchConf_Shop_Goods, error)
- func (x *RecursivePatchConf) Get3(shopId uint32, goodsId uint32, type_ uint32) (*protoconf.RecursivePatchConf_Shop_Goods_Currency, error)
- func (x *RecursivePatchConf) Get4(shopId uint32, goodsId uint32, type_ uint32, key4 int32) (int32, error)
- func (x *RecursivePatchConf) Load(dir string, format format.Format, options ...load.Option) error
- func (x *RecursivePatchConf) Message() proto.Message
- func (x *RecursivePatchConf) Messager() Messager
- func (x *RecursivePatchConf) Name() string
- func (x *RecursivePatchConf) Store(dir string, format format.Format, options ...store.Option) error
- type Registrar
- type Stats
- type ThemeConf
- func (x *ThemeConf) Data() *protoconf.ThemeConf
- func (x *ThemeConf) Get1(name string) (*protoconf.ThemeConf_Theme, error)
- func (x *ThemeConf) Load(dir string, format format.Format, options ...load.Option) error
- func (x *ThemeConf) Message() proto.Message
- func (x *ThemeConf) Messager() Messager
- func (x *ThemeConf) Name() string
- func (x *ThemeConf) Store(dir string, format format.Format, options ...store.Option) error
- type UnimplementedMessager
- func (x *UnimplementedMessager) Check(hub *Hub) error
- func (x *UnimplementedMessager) CheckCompatibility(hub, newHub *Hub) error
- func (x *UnimplementedMessager) GetStats() *Stats
- func (x *UnimplementedMessager) Load(dir string, format format.Format, options ...load.Option) error
- func (x *UnimplementedMessager) Message() proto.Message
- func (x *UnimplementedMessager) Messager() Messager
- func (x *UnimplementedMessager) Name() string
- func (x *UnimplementedMessager) ProcessAfterLoadAll(hub *Hub) error
- func (x *UnimplementedMessager) Store(dir string, format format.Format, options ...store.Option) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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:
- Easy use: simple yet powerful accessers.
- Elegant API: concise and clean functions.
- 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 ¶
func (x *ActivityConf) GetOrderedMap() *ProtoconfActivityConfActivityMap_OrderedMap
GetOrderedMap returns the 1-level ordered map.
func (*ActivityConf) GetOrderedMap1 ¶
func (x *ActivityConf) GetOrderedMap1(activityId uint64) (*ProtoconfActivityConfActivityChapterMap_OrderedMap, error)
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 ¶
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.
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 ¶
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:
- Easy use: simple yet powerful accessers.
- Elegant API: concise and clean functions.
- Extensibility: Map, OrdererdMap, Index...
func (*ChapterConf) Data ¶
func (x *ChapterConf) Data() *protoconf.ChapterConf
Data returns the ChapterConf's inner message data.
func (*ChapterConf) Get1 ¶
func (x *ChapterConf) Get1(id uint64) (*protoconf.ChapterConf_Chapter, error)
Get1 finds value in the 1-level map. It will return NotFound error if the key is not found.
func (*ChapterConf) Load ¶
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.
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:
- Easy use: simple yet powerful accessers.
- Elegant API: concise and clean functions.
- 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 ¶
Get2 finds value in the 2-level map. It will return NotFound error if the key is not found.
func (*HeroBaseConf) GetOrderedMap ¶
func (x *HeroBaseConf) GetOrderedMap() *ProtoconfHeroBaseConfHeroMap_OrderedMap
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 ¶
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.
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:
- Easy use: simple yet powerful accessers.
- Elegant API: concise and clean functions.
- Extensibility: Map, OrdererdMap, Index...
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 ¶
Get2 finds value in the 2-level map. It will return NotFound error if the key is not found.
func (*HeroConf) Load ¶
Load fills HeroConf's inner message from file in the specified directory and format.
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 (*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 (*Hub) GetItemConf ¶
func (*Hub) GetLastLoadedTime ¶
GetLastLoadedTime returns the time when hub's messagerMap was last set.
func (*Hub) GetMessager ¶
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 (*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.
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:
- Easy use: simple yet powerful accessers.
- Elegant API: concise and clean functions.
- Extensibility: Map, OrdererdMap, Index...
func (*ItemConf) FindAwardItem ¶
func (x *ItemConf) FindAwardItem(key ItemConf_Index_AwardItemKey) []*protoconf.ItemConf_Item
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 ¶
func (x *ItemConf) FindSpecialItem(key ItemConf_Index_SpecialItemKey) []*protoconf.ItemConf_Item
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 ¶
Load fills ItemConf's inner message from file in the specified directory and format.
type ItemConf_Index_AwardItemKey ¶
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 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:
- Easy use: simple yet powerful accessers.
- Elegant API: concise and clean functions.
- Extensibility: Map, OrdererdMap, Index...
func (*PatchMergeConf) Data ¶
func (x *PatchMergeConf) Data() *protoconf.PatchMergeConf
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 ¶
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.
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:
- Easy use: simple yet powerful accessers.
- Elegant API: concise and clean functions.
- Extensibility: Map, OrdererdMap, Index...
func (*PatchReplaceConf) Data ¶
func (x *PatchReplaceConf) Data() *protoconf.PatchReplaceConf
Data returns the PatchReplaceConf's inner message data.
func (*PatchReplaceConf) Load ¶
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.
type ProtoconfActivityConfActivityChapterMap_OrderedMap ¶
type ProtoconfActivityConfActivityChapterMap_OrderedMap = treemap.TreeMap[uint32, *ProtoconfActivityConfActivityChapterMap_OrderedMapValue]
type ProtoconfActivityConfActivityChapterMap_OrderedMapValue ¶
type ProtoconfActivityConfActivityChapterMap_OrderedMapValue = pair.Pair[*ProtoconfActivityConfActivityChapterSectionMap_OrderedMap, *protoconf.ActivityConf_Activity_Chapter]
type ProtoconfActivityConfActivityChapterSectionMap_OrderedMap ¶
type ProtoconfActivityConfActivityChapterSectionMap_OrderedMap = treemap.TreeMap[uint32, *ProtoconfActivityConfActivityChapterSectionMap_OrderedMapValue]
type ProtoconfActivityConfActivityChapterSectionMap_OrderedMapValue ¶
type ProtoconfActivityConfActivityChapterSectionMap_OrderedMapValue = pair.Pair[*ProtoconfSectionSectionRankMap_OrderedMap, *protoconf.Section]
type ProtoconfActivityConfActivityMap_OrderedMap ¶
type ProtoconfActivityConfActivityMap_OrderedMap = treemap.TreeMap[uint64, *ProtoconfActivityConfActivityMap_OrderedMapValue]
type ProtoconfActivityConfActivityMap_OrderedMapValue ¶
type ProtoconfActivityConfActivityMap_OrderedMapValue = pair.Pair[*ProtoconfActivityConfActivityChapterMap_OrderedMap, *protoconf.ActivityConf_Activity]
type ProtoconfHeroBaseConfHeroMap_OrderedMap ¶
type ProtoconfHeroBaseConfHeroMap_OrderedMap = treemap.TreeMap[string, *ProtoconfHeroBaseConfHeroMap_OrderedMapValue]
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 ¶
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:
- Easy use: simple yet powerful accessers.
- Elegant API: concise and clean functions.
- Extensibility: Map, OrdererdMap, Index...
func (*RecursivePatchConf) Data ¶
func (x *RecursivePatchConf) Data() *protoconf.RecursivePatchConf
Data returns the RecursivePatchConf's inner message data.
func (*RecursivePatchConf) Get1 ¶
func (x *RecursivePatchConf) Get1(shopId uint32) (*protoconf.RecursivePatchConf_Shop, error)
Get1 finds value in the 1-level map. It will return NotFound error if the key is not found.
func (*RecursivePatchConf) Get2 ¶
func (x *RecursivePatchConf) Get2(shopId uint32, goodsId uint32) (*protoconf.RecursivePatchConf_Shop_Goods, error)
Get2 finds value in the 2-level map. It will return NotFound error if the key is not found.
func (*RecursivePatchConf) Get3 ¶
func (x *RecursivePatchConf) Get3(shopId uint32, goodsId uint32, type_ uint32) (*protoconf.RecursivePatchConf_Shop_Goods_Currency, error)
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 ¶
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.
type Registrar ¶
type Registrar struct {
Generators map[string]MessagerGenerator
}
func NewRegistrar ¶
func NewRegistrar() *Registrar
func (*Registrar) Register ¶
func (r *Registrar) Register(gen MessagerGenerator)
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:
- Easy use: simple yet powerful accessers.
- Elegant API: concise and clean functions.
- Extensibility: Map, OrdererdMap, Index...
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 ¶
Load fills ThemeConf's inner message from file in the specified directory and format.
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) 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