Documentation
¶
Index ¶
- Constants
- func EncodeSharedArchive(shared SharedProfile, iconPNG []byte) ([]byte, error)
- type Manager
- func (m *Manager) Add(p Profile) error
- func (m *Manager) Get(id uuid.UUID) (Profile, bool)
- func (m *Manager) List() []Profile
- func (m *Manager) LoadIconPNG(id uuid.UUID) ([]byte, error)
- func (m *Manager) ProfileDir(id uuid.UUID) (string, error)
- func (m *Manager) Remove(id uuid.UUID) error
- func (m *Manager) RemoveIcon(id uuid.UUID) error
- func (m *Manager) SaveIconPNG(id uuid.UUID, png []byte) error
- type Profile
- func (p *Profile) AddModVersion(version modmgr.ModVersion)
- func (p *Profile) AddPlayDuration(d time.Duration)
- func (p *Profile) Clone() Profile
- func (p *Profile) MakeShared() SharedProfile
- func (p *Profile) PlayDuration() time.Duration
- func (p *Profile) RemoveModVersion(modID string)
- func (p *Profile) Versions() []modmgr.ModVersion
- type SharedProfile
Constants ¶
View Source
const ( )
Variables ¶
This section is empty.
Functions ¶
func EncodeSharedArchive ¶ added in v1.5.0
func EncodeSharedArchive(shared SharedProfile, iconPNG []byte) ([]byte, error)
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) LoadIconPNG ¶ added in v1.4.0
func (*Manager) ProfileDir ¶ added in v1.5.2
type Profile ¶
type Profile struct {
ID uuid.UUID `json:"id"`
Name string `json:"name"`
Author string `json:"author"`
Description string `json:"description,omitempty"`
ModVersions map[string]modmgr.ModVersion `json:"mod_versions,omitempty"`
UpdatedAt time.Time `json:"updated_at"`
PlayDurationNS int64 `json:"play_duration_ns,omitempty"`
LastLaunchedAt time.Time `json:"last_launched_at"`
}
func (*Profile) AddModVersion ¶
func (p *Profile) AddModVersion(version modmgr.ModVersion)
func (*Profile) AddPlayDuration ¶ added in v1.4.0
func (*Profile) MakeShared ¶ added in v1.2.1
func (p *Profile) MakeShared() SharedProfile
func (*Profile) PlayDuration ¶ added in v1.4.0
func (*Profile) RemoveModVersion ¶
func (*Profile) Versions ¶
func (p *Profile) Versions() []modmgr.ModVersion
type SharedProfile ¶ added in v1.2.1
type SharedProfile struct {
}
func DecodeSharedArchive ¶ added in v1.5.0
Click to show internal directories.
Click to hide internal directories.