fileparser

package
v0.0.0-...-bcacd0f Latest Latest
Warning

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

Go to latest
Published: May 31, 2016 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	JSON_FILE_NAME = "vane.json" // default saved directory named "vane.json"
	DFT_TIME_OUT   = 36000       // default timeour set to 10 hours.
)
View Source
const (
	RCFileName = ".vanerc"
)
View Source
const (
	RegPackageVersion = `\d+\.\d+(\.\d+.*)?` // will match, e.g. 1.1.1, 1.11.1, 1.2, 111.0.1, 1.0.0-alpha.7
)

Variables

View Source
var (
	ERR_JSON_FILE_NOT_FOUND = errors.New("vane.json file not found")
	ERR_JSON_FILE_CONF      = errors.New("bad vane.json configuration")
)
View Source
var (
	ERR_RC_FILE_NOT_FOUND = errors.New(".vanerc file not found.")
	ERR_RC_FILE_CONF      = errors.New(".vanerc file configuration error.")
)

Functions

func GetVersionInfo

func GetVersionInfo(raw string) string

func OpenRCFile

func OpenRCFile(name string) ([]byte, error)

Types

type PackageInfo

type PackageInfo struct {
	Name    string
	Version string
}

type VaneJSON

type VaneJSON struct {
	Directory       string            `json:"directory,-"`
	Timeout         int               `json:"timeout,-"`
	Dependencies    map[string]string `json:"dependencies,omitempty"`
	DevDependencies map[string]string `json:"devDependencies,omitempty"`
}

func (*VaneJSON) Read

func (v *VaneJSON) Read() error

func (*VaneJSON) ReadPackages

func (v *VaneJSON) ReadPackages(pkgs map[string]string) []PackageInfo

ReadPackages read the given map that might be VaneJSON.Dependencies or VaneJSON.DebDependencies.

func (*VaneJSON) Write

func (v *VaneJSON) Write(code writeWhat) error

type VaneRC

type VaneRC struct {
	Directory string
	TimeOut   int32
	Scripts   interface{}
}

func RsvJSONFromRCFile

func RsvJSONFromRCFile(rawJSONs []byte) (*VaneRC, error)

func RsvRCFile

func RsvRCFile(rcfpath string) (*VaneRC, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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