parser

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2018 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadInConfig

func ReadInConfig(paths ...string) (err error)

Types

type Config

type Config struct {
	GithubUser string `json:"github_user"`
	SourceDir  string `json:"source_dir"`
	GitlabUser string `json:"gitlab_user"`
	GitlabURL  string `json:"gitlab_url"`
}
var DevctlConfig *Config

type Parser

type Parser struct {
	Data *simplejson.Json
}

func (*Parser) GetMap

func (p *Parser) GetMap(key string) map[string]interface{}

func (*Parser) Parse

func (p *Parser) Parse(file string) error

type ProjectConfigStruct

type ProjectConfigStruct struct {
	Node              Version
	Go                Version
	Python            Version
	Scripts           map[string]utilities.RunCommand
	DockerCompose     interface{} `json:"docker-compose"`
	DockerComposeFile string      `json:"docker-compose-file"`
	Services          []interface{}
	Dependencies      struct {
		Install []string
		Brew    struct {
			Install []string
		}
		Aptget struct {
			Install []string
		} `json:"apt-get"`
	}
}
var ProjectConfig *ProjectConfigStruct

TODO: make this work

func (*ProjectConfigStruct) ParseFile

func (c *ProjectConfigStruct) ParseFile(paths ...string) (err error)

func (*ProjectConfigStruct) ParseFileDefault

func (c *ProjectConfigStruct) ParseFileDefault() error

func (*ProjectConfigStruct) ParseJson

func (c *ProjectConfigStruct) ParseJson(data string)

func (*ProjectConfigStruct) ParseYaml

func (c *ProjectConfigStruct) ParseYaml(data string)

func (*ProjectConfigStruct) ProjectName

func (c *ProjectConfigStruct) ProjectName() (string, error)

type Version

type Version struct {
	Version string
}

Jump to

Keyboard shortcuts

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