settings

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2016 License: GPL-3.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blue

type Blue struct{}

func (Blue) Bold

func (c Blue) Bold(t ...interface{}) string

func (Blue) Regular

func (c Blue) Regular(t ...interface{}) string

type Colors

type Colors struct {
	Red
	Blue
	Yellow
	Magenta
	Green
}

type Config

type Config struct {
	Flimit uint64 `yaml:"flimit" json:"flimit"`
}

type Green

type Green struct{}

func (Green) Bold

func (c Green) Bold(t ...interface{}) string

func (Green) Regular

func (c Green) Regular(t ...interface{}) string

type Magenta

type Magenta struct{}

func (Magenta) Bold

func (c Magenta) Bold(t ...interface{}) string

func (Magenta) Regular

func (c Magenta) Regular(t ...interface{}) string

type Red

type Red struct{}

func (Red) Bold

func (c Red) Bold(t ...interface{}) string

func (Red) Regular

func (c Red) Regular(t ...interface{}) string

type Resources

type Resources struct {
	Config string `yaml:"-" json:"-"`
	Output string `yaml:"output" json:"output"`
	Log    string `yaml:"log" json:"log"`
}

type Server

type Server struct {
	Enabled bool   `yaml:"enable" json:"enable"`
	Open    bool   `yaml:"open" json:"open"`
	Host    string `yaml:"host" json:"host"`
	Port    int    `yaml:"port" json:"port"`
}

type Settings

type Settings struct {
	Colors    `yaml:"-"`
	Resources `yaml:"resources" json:"resources"`
	Server    `yaml:"server" json:"server"`
	Config    `yaml:"config" json:"config"`
}

func (Settings) Create

func (s Settings) Create(path string, name string) *os.File

Create a new file and return its pointer

func (Settings) Fatal

func (s Settings) Fatal(err error, msg ...interface{})

func (*Settings) Flimit

func (s *Settings) Flimit()

Flimit defines the max number of watched files

func (*Settings) Read

func (s *Settings) Read(out interface{}) error

Read from config file

func (*Settings) Record

func (s *Settings) Record(out interface{}) error

Record create and unmarshal the yaml config file

func (Settings) Stream

func (s Settings) Stream(file string) ([]byte, error)

Scan return a byte stream of a given file

func (Settings) Validate

func (s Settings) Validate(err error) error

func (Settings) Wdir

func (s Settings) Wdir() string

func (Settings) Write

func (s Settings) Write(name string, data []byte) error

Write a file given a name and a byte stream

type Yellow

type Yellow struct{}

func (Yellow) Bold

func (c Yellow) Bold(t ...interface{}) string

func (Yellow) Regular

func (c Yellow) Regular(t ...interface{}) string

Jump to

Keyboard shortcuts

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