profile

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Credits       = "Credits"
	Refund        = "Refund"
	PurpleExotics = "Exotic1"
	RedExotics    = "Exotic2"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ProfileData

type ProfileData struct {
	UserID        string                 `json:"UserID"`
	MetaResources []shared.MetaResources `json:"MetaResources"`
	UnlockedFlags []int                  `json:"UnlockedFlags"`
	Talents       []shared.Talents       `json:"Talents"`
	Metadata      shared.Metadata        `json:"-"`
}

func NewProfileData

func NewProfileData() (*ProfileData, error)

NewProfileData creates a new ProfileData struct

func (*ProfileData) GetCountFor

func (P *ProfileData) GetCountFor(key string) string

GetCountFor returns the count for a given key

func (*ProfileData) Read

func (P *ProfileData) Read() error

OpenProfileFile return an io.Reader for ProfileData

func (*ProfileData) ReadF added in v0.1.1

func (P *ProfileData) ReadF(file io.Reader) error

Read reads the ProfileData from an io.Reader

func (*ProfileData) SetCountFor

func (P *ProfileData) SetCountFor(key string, count int)

SetCountFor sets the count for a given key

func (*ProfileData) Write

func (P *ProfileData) Write() error

Write writes the ProfileData to a file

func (*ProfileData) WriteF added in v0.1.1

func (P *ProfileData) WriteF(file io.Writer) error

Write writes the ProfileData to an io.Writer The function will only write if the data has been altered

Jump to

Keyboard shortcuts

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