Documentation ¶
Index ¶
- Variables
- type CharManager
- func (c *CharManager) ActiveCharacter() *Character
- func (c *CharManager) AddCharacterFromToken(token string)
- func (c *CharManager) EventHandlerCharAdd()
- func (c *CharManager) GetActiveCharacterToken(_ context.Context) string
- func (c *CharManager) LoadCache() error
- func (c *CharManager) MainWindow(window *mainwindow.AbyssRecorderWindow) *CharManager
- func (c *CharManager) PersistCache() error
- func (c *CharManager) RefreshUI()
- func (c *CharManager) SetActiveCharacter(charID int32) error
- type Character
- type CharacterCache
- type CharacterRecord
- func (*CharacterRecord) Descriptor() ([]byte, []int)deprecated
- func (x *CharacterRecord) GetCharacterID() int32
- func (x *CharacterRecord) GetCharacterName() string
- func (x *CharacterRecord) GetPortrait() []byte
- func (x *CharacterRecord) GetToken() string
- func (*CharacterRecord) ProtoMessage()
- func (x *CharacterRecord) ProtoReflect() protoreflect.Message
- func (x *CharacterRecord) Reset()
- func (x *CharacterRecord) String() string
- type OnCharacterActivatedHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var File_characters_cache_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type CharManager ¶
type CharManager struct { sync.RWMutex OnActivateCharacter OnCharacterActivatedHandler // contains filtered or unexported fields }
func New ¶
func New(notifier func(string, string)) *CharManager
func (*CharManager) ActiveCharacter ¶
func (c *CharManager) ActiveCharacter() *Character
func (*CharManager) AddCharacterFromToken ¶
func (c *CharManager) AddCharacterFromToken(token string)
AddCharacterFromToken used as callback to add character to state from JWT token.
func (*CharManager) EventHandlerCharAdd ¶
func (c *CharManager) EventHandlerCharAdd()
func (*CharManager) GetActiveCharacterToken ¶ added in v0.8.2
func (c *CharManager) GetActiveCharacterToken(_ context.Context) string
func (*CharManager) LoadCache ¶
func (c *CharManager) LoadCache() error
LoadCache loads records of characters from cache file if it exists.
func (*CharManager) MainWindow ¶
func (c *CharManager) MainWindow(window *mainwindow.AbyssRecorderWindow) *CharManager
func (*CharManager) PersistCache ¶
func (c *CharManager) PersistCache() error
PersistCache stores current state to cache file
func (*CharManager) SetActiveCharacter ¶
func (c *CharManager) SetActiveCharacter(charID int32) error
type Character ¶
type Character struct { CharacterID int32 `json:"characterID"` CharacterName string `json:"characterName"` CharacterToken string CharacterPortraitIcon []byte }
func (*Character) PortraitIcon ¶
type CharacterCache ¶
type CharacterCache struct { Characters []*CharacterRecord `protobuf:"bytes,1,rep,name=characters,proto3" json:"characters,omitempty"` // contains filtered or unexported fields }
func (*CharacterCache) Descriptor
deprecated
func (*CharacterCache) Descriptor() ([]byte, []int)
Deprecated: Use CharacterCache.ProtoReflect.Descriptor instead.
func (*CharacterCache) GetCharacters ¶
func (x *CharacterCache) GetCharacters() []*CharacterRecord
func (*CharacterCache) ProtoMessage ¶
func (*CharacterCache) ProtoMessage()
func (*CharacterCache) ProtoReflect ¶
func (x *CharacterCache) ProtoReflect() protoreflect.Message
func (*CharacterCache) Reset ¶
func (x *CharacterCache) Reset()
func (*CharacterCache) String ¶
func (x *CharacterCache) String() string
type CharacterRecord ¶
type CharacterRecord struct { CharacterID int32 `protobuf:"varint,1,opt,name=characterID,proto3" json:"characterID,omitempty"` CharacterName string `protobuf:"bytes,2,opt,name=characterName,proto3" json:"characterName,omitempty"` Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` Portrait []byte `protobuf:"bytes,4,opt,name=portrait,proto3" json:"portrait,omitempty"` // contains filtered or unexported fields }
func (*CharacterRecord) Descriptor
deprecated
func (*CharacterRecord) Descriptor() ([]byte, []int)
Deprecated: Use CharacterRecord.ProtoReflect.Descriptor instead.
func (*CharacterRecord) GetCharacterID ¶
func (x *CharacterRecord) GetCharacterID() int32
func (*CharacterRecord) GetCharacterName ¶
func (x *CharacterRecord) GetCharacterName() string
func (*CharacterRecord) GetPortrait ¶
func (x *CharacterRecord) GetPortrait() []byte
func (*CharacterRecord) GetToken ¶
func (x *CharacterRecord) GetToken() string
func (*CharacterRecord) ProtoMessage ¶
func (*CharacterRecord) ProtoMessage()
func (*CharacterRecord) ProtoReflect ¶
func (x *CharacterRecord) ProtoReflect() protoreflect.Message
func (*CharacterRecord) Reset ¶
func (x *CharacterRecord) Reset()
func (*CharacterRecord) String ¶
func (x *CharacterRecord) String() string
type OnCharacterActivatedHandler ¶
type OnCharacterActivatedHandler = func(Character)
Click to show internal directories.
Click to hide internal directories.