Documentation ¶
Index ¶
- Constants
- Variables
- type CombatLogFile
- type CombatLogRecord
- func (*CombatLogRecord) Descriptor() ([]byte, []int)deprecated
- func (x *CombatLogRecord) GetCharacterName() string
- func (x *CombatLogRecord) GetCombatLogLines() []string
- func (x *CombatLogRecord) GetLanguageCode() LanguageCode
- func (*CombatLogRecord) ProtoMessage()
- func (x *CombatLogRecord) ProtoReflect() protoreflect.Message
- func (x *CombatLogRecord) Reset()
- func (x *CombatLogRecord) String() string
- type LanguageCode
- func (LanguageCode) Descriptor() protoreflect.EnumDescriptor
- func (x LanguageCode) Enum() *LanguageCode
- func (LanguageCode) EnumDescriptor() ([]byte, []int)deprecated
- func (x LanguageCode) Number() protoreflect.EnumNumber
- func (x LanguageCode) String() string
- func (LanguageCode) Type() protoreflect.EnumType
- type LocalizedMatcher
- type LocalizedMatchers
- type Reader
- func (r *Reader) GetCombatLogRecords(characters map[string]CombatLogFile) []*CombatLogRecord
- func (r *Reader) GetLogFiles(end time.Time, timeWindow time.Duration) ([]string, error)
- func (r *Reader) MapCharactersToFiles(files []string) map[string]CombatLogFile
- func (r *Reader) MarkStartOffsets(characters map[string]CombatLogFile)
- func (r *Reader) SetLogFolder(folder string)
Constants ¶
View Source
const DateFormat = "2006.01.02 15:04:05"
Variables ¶
View Source
var ( LanguageCode_name = map[int32]string{ 0: "UNKNOWN", 1: "ENGLISH", 2: "FRENCH", 3: "GERMAN", 4: "JAPANESE", 5: "KOREAN", 6: "RUSSIAN", 7: "CHINESE", 8: "SPANISH", } LanguageCode_value = map[string]int32{ "UNKNOWN": 0, "ENGLISH": 1, "FRENCH": 2, "GERMAN": 3, "JAPANESE": 4, "KOREAN": 5, "RUSSIAN": 6, "CHINESE": 7, "SPANISH": 8, } )
Enum value maps for LanguageCode.
View Source
var File_combatlog_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type CombatLogFile ¶
type CombatLogFile struct { Filename string LanguageCode LanguageCode }
type CombatLogRecord ¶
type CombatLogRecord struct { CharacterName string `protobuf:"bytes,1,opt,name=character_name,json=characterName,proto3" json:"character_name,omitempty"` CombatLogLines []string `protobuf:"bytes,2,rep,name=combat_log_lines,json=combatLogLines,proto3" json:"combat_log_lines,omitempty"` LanguageCode LanguageCode `` /* 126-byte string literal not displayed */ // contains filtered or unexported fields }
func (*CombatLogRecord) Descriptor
deprecated
func (*CombatLogRecord) Descriptor() ([]byte, []int)
Deprecated: Use CombatLogRecord.ProtoReflect.Descriptor instead.
func (*CombatLogRecord) GetCharacterName ¶
func (x *CombatLogRecord) GetCharacterName() string
func (*CombatLogRecord) GetCombatLogLines ¶
func (x *CombatLogRecord) GetCombatLogLines() []string
func (*CombatLogRecord) GetLanguageCode ¶
func (x *CombatLogRecord) GetLanguageCode() LanguageCode
func (*CombatLogRecord) ProtoMessage ¶
func (*CombatLogRecord) ProtoMessage()
func (*CombatLogRecord) ProtoReflect ¶
func (x *CombatLogRecord) ProtoReflect() protoreflect.Message
func (*CombatLogRecord) Reset ¶
func (x *CombatLogRecord) Reset()
func (*CombatLogRecord) String ¶
func (x *CombatLogRecord) String() string
type LanguageCode ¶
type LanguageCode int32
const ( LanguageCode_UNKNOWN LanguageCode = 0 LanguageCode_ENGLISH LanguageCode = 1 LanguageCode_FRENCH LanguageCode = 2 LanguageCode_GERMAN LanguageCode = 3 LanguageCode_JAPANESE LanguageCode = 4 LanguageCode_KOREAN LanguageCode = 5 LanguageCode_RUSSIAN LanguageCode = 6 LanguageCode_CHINESE LanguageCode = 7 LanguageCode_SPANISH LanguageCode = 8 )
func (LanguageCode) Descriptor ¶
func (LanguageCode) Descriptor() protoreflect.EnumDescriptor
func (LanguageCode) Enum ¶
func (x LanguageCode) Enum() *LanguageCode
func (LanguageCode) EnumDescriptor
deprecated
func (LanguageCode) EnumDescriptor() ([]byte, []int)
Deprecated: Use LanguageCode.Descriptor instead.
func (LanguageCode) Number ¶
func (x LanguageCode) Number() protoreflect.EnumNumber
func (LanguageCode) String ¶
func (x LanguageCode) String() string
func (LanguageCode) Type ¶
func (LanguageCode) Type() protoreflect.EnumType
type LocalizedMatcher ¶
LocalizedMatcher holds regexps for language to detect.
type LocalizedMatchers ¶
type LocalizedMatchers map[LanguageCode]LocalizedMatcher
LocalizedMatchers mapping between LanguageCode and LocalizedMatchers.
var LanguageMatchers LocalizedMatchers
LanguageMatchers holds default initialized regexps for all languages.
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func (*Reader) GetCombatLogRecords ¶
func (r *Reader) GetCombatLogRecords(characters map[string]CombatLogFile) []*CombatLogRecord
GetCombatLogRecords reads combatlog from stored offsets and converts to CombatLogRecord struct.
func (*Reader) GetLogFiles ¶
GetLogFiles returns slice of filepaths that logged in in last timeWindow.
func (*Reader) MapCharactersToFiles ¶
func (r *Reader) MapCharactersToFiles(files []string) map[string]CombatLogFile
MapCharactersToFiles maps given paths to characters, detecting combatlog language in process.
func (*Reader) MarkStartOffsets ¶
func (r *Reader) MarkStartOffsets(characters map[string]CombatLogFile)
MarkStartOffsets stores offsets of combatlog files.
func (*Reader) SetLogFolder ¶
Click to show internal directories.
Click to hide internal directories.