Documentation ¶
Overview ¶
Read and parse Refractor engine configuration files (.con)
Index ¶
- type ErrActionNotSupportedForGame
- type ErrGameNotSupported
- type FileRepository
- type Game
- type Handler
- func (h *Handler) BuildBasePath(game Game) (string, error)
- func (h *Handler) BuildProfilesFolderPath(game Game) (string, error)
- func (h *Handler) GetProfileKeys(game Game) ([]string, error)
- func (h *Handler) IsValidProfileKey(game Game, profileKey string) (bool, error)
- func (h *Handler) PurgeLogoCache(game Game) error
- func (h *Handler) PurgeShaderCache(game Game) error
- func (h *Handler) ReadConfigFile(path string) (*config.Config, error)
- func (h *Handler) ReadGlobalConfig(game Game) (*config.Config, error)
- func (h *Handler) ReadProfileConfig(game Game, profileKey string) (*config.Config, error)
- func (h *Handler) WriteConfigFile(c *config.Config) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrActionNotSupportedForGame ¶ added in v0.1.2
type ErrActionNotSupportedForGame struct {
// contains filtered or unexported fields
}
func (*ErrActionNotSupportedForGame) Error ¶ added in v0.1.2
func (e *ErrActionNotSupportedForGame) Error() string
type ErrGameNotSupported ¶
type ErrGameNotSupported struct {
// contains filtered or unexported fields
}
func (*ErrGameNotSupported) Error ¶
func (e *ErrGameNotSupported) Error() string
type FileRepository ¶ added in v0.0.2
type FileRepository interface { FileExists(path string) (bool, error) DirExists(path string) (bool, error) WriteFile(path string, data []byte, perm os.FileMode) error ReadFile(path string) ([]byte, error) ReadDir(path string) ([]os.DirEntry, error) Glob(pattern string) ([]string, error) RemoveAll(path string) error }
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func New ¶
func New(repository FileRepository) *Handler
func (*Handler) BuildBasePath ¶ added in v0.1.0
Build path to the root folder for given game's configuration
func (*Handler) BuildProfilesFolderPath ¶ added in v0.1.2
Build path to the folder containing given game's profile configuration
func (*Handler) GetProfileKeys ¶ added in v0.1.0
Retrieve a list of profile keys (valid profile directories in the game's profile folder)
func (*Handler) IsValidProfileKey ¶ added in v0.1.0
Checks whether a given profile key is valid (a profile with the given key exists)
func (*Handler) PurgeLogoCache ¶ added in v0.1.2
Delete all cached server banner images [Refractor v2 games only]
func (*Handler) PurgeShaderCache ¶ added in v0.1.2
Delete all shader cache (.cfx) files [Refractor v2 games only]
func (*Handler) ReadConfigFile ¶ added in v0.1.0
Read the config file at given path
func (*Handler) ReadGlobalConfig ¶
Read central profile configuration file (primarily contains reference to current default profile)
func (*Handler) ReadProfileConfig ¶
Read the profile configuration file for the specified profile