configuration

package
v0.0.0-...-941ac12 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PlatformWindows = "windows"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	BuildName        string   `toml:"build_name"`
	LogName          string   `toml:"log_name"`
	RelSrcDir        string   `toml:"relative_source_dir"`
	RelBuildDir      string   `toml:"relative_build_dir"`
	RelLogDir        string   `toml:"relative_log_dir"`
	IncludeExts      []string `toml:"watch_relative_ext"`
	ExcludeDirs      []string `toml:"ignore_relative_dir"`
	IncludeDirs      []string `toml:"watch_relative_dir"`
	IgnoreFiles      []string `toml:"ignore_relative_files"`
	EventBufferTime  int
	Port             int `toml:"port"`
	Root             string
	ExecutionCommand string `toml:"execution_command"`
	BuildCommand     string `toml:"build_command"`
	Reload           bool
	Sync             bool
}

Configuration is a in-memory representation of the expected configuration file

func DefaultConfiguration

func DefaultConfiguration() *Configuration

DefaultConfiguration is the default configuration if none is provided

func ParsedConfiguration

func ParsedConfiguration(path string) (*Configuration, error)

ParsedConfiguration is a parsed configuration merged with the default configuration and adapted to the OS

func TestConfiguration

func TestConfiguration() (*Configuration, error)

TestConfiguration is the configuration used for internal tests

func (*Configuration) Binary

func (c *Configuration) Binary() (string, error)

Binary is the current absolute binary path

func (*Configuration) BufferTime

func (c *Configuration) BufferTime() time.Duration

BufferTime is the event buffer time in milliseconds

func (*Configuration) BuildDir

func (c *Configuration) BuildDir() (string, error)

BuildDir is the current absolute build directory path

func (*Configuration) Log

func (c *Configuration) Log() (string, error)

Log is the current absolute log path

func (*Configuration) LogDir

func (c *Configuration) LogDir() (string, error)

LogDir is the current absolute log directory path

func (*Configuration) SrcDir

func (c *Configuration) SrcDir() (string, error)

SrcDir is the current absolute source directory path

Jump to

Keyboard shortcuts

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