config

package
v0.0.0-...-bae2323 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	OutDir  string        `json:"outDir"`
	Target  string        `json:"target"`
	Prefix  string        `json:"prefix"`
	Suffix  string        `json:"suffix"`
	Sizes   []*size       `json:"sizes"`
	JpegOpt *jpeg.Options `json:"jpegOpt"`
	PngOpt  *png.Options  `json:"pngOpt"`
	WebpOpt *webp.Options `json:"webpOpt"`
}

App represents application persistent configuration values.

type Config

type Config struct {
	App     *App
	Runtime *wails.Runtime
	Logger  *wails.CustomLogger
	// contains filtered or unexported fields
}

Config represents the application settings.

func NewConfig

func NewConfig() *Config

NewConfig returns a new instance of Config.

func (*Config) GetAppConfig

func (c *Config) GetAppConfig() map[string]interface{}

GetAppConfig returns the application configuration.

func (*Config) OpenOutputDir

func (c *Config) OpenOutputDir() error

OpenOutputDir opens the output directory using the native system browser.

func (*Config) RestoreDefaults

func (c *Config) RestoreDefaults() (err error)

RestoreDefaults sets the app configuration to defaults.

func (*Config) SetConfig

func (c *Config) SetConfig(cfg string) error

SetConfig sets and stores the given configuration.

func (*Config) SetOutDir

func (c *Config) SetOutDir() string

SetOutDir opens a directory select dialog and sets the output directory to the chosen directory.

func (*Config) WailsInit

func (c *Config) WailsInit(runtime *wails.Runtime) error

WailsInit performs setup when Wails is ready.

Jump to

Keyboard shortcuts

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