rainbond: github.com/goodrain/rainbond/builder/parser/code Index | Files | Directories

package code

import "github.com/goodrain/rainbond/builder/parser/code"

Index

Package Files

dependencies.go lang.go procfile.go rainbondfile.go runtime.go specification.go

Variables

var ErrCodeDirNotExist = fmt.Errorf("code dir is not exist")

ErrCodeDirNotExist 代码目录不存在

var ErrCodeNotExist = fmt.Errorf("code is not exist")

ErrCodeNotExist 代码为空错误

var ErrCodeUnableIdentify = fmt.Errorf("code lang unable to identify")

ErrCodeUnableIdentify 代码无法识别语言

var ErrRainbondFileNotFound = fmt.Errorf("rainbond file not found")

ErrRainbondFileNotFound rainbond file not found

var ErrRuntimeNotSupport = fmt.Errorf("runtime version not support")

ErrRuntimeNotSupport runtime not support

func CheckDependencies Uses

func CheckDependencies(buildPath string, lang Lang) bool

CheckDependencies check dependencies with lang

func CheckProcfile Uses

func CheckProcfile(buildPath string, lang Lang) (bool, string)

CheckProcfile check runtime with lang

func CheckRuntime Uses

func CheckRuntime(buildPath string, lang Lang) (map[string]string, error)

CheckRuntime CheckRuntime

type Lang Uses

type Lang string

Lang 语言类型

var Clojure Lang = "Clojure"

Clojure Lang

var Docker Lang = "docker"

Docker Lang

var Dockerfile Lang = "dockerfile"

Dockerfile Lang

var Golang Lang = "Go"

Golang Lang

var Gradle Lang = "Gradle"

Gradle Lang

var Grails Lang = "Grails"

Grails Lang

var JavaJar Lang = "Java-jar"

JavaJar Lang

var JavaMaven Lang = "Java-maven"

JavaMaven Lang

var JaveWar Lang = "Java-war"

JaveWar Lang

var NO Lang = "no"

NO 空语言类型

var NetCore Lang = ".NetCore"

NetCore Lang

var NodeJSStatic Lang = "NodeJSStatic"

NodeJSStatic static Lang

var Nodejs Lang = "Node.js"

Nodejs Lang

var PHP Lang = "PHP"

PHP Lang

var Python Lang = "Python"

Python Lang

var Ruby Lang = "Ruby"

Ruby Lang

var Static Lang = "static"

Static Lang

func GetLangType Uses

func GetLangType(homepath string) (Lang, error)

GetLangType check code lang

func (Lang) String Uses

func (l Lang) String() string

String return lang string

type Port Uses

type Port struct {
    Port     int    `yaml:"port"`
    Protocol string `yaml:"protocol"`
}

Port Port

type RainbondFileConfig Uses

type RainbondFileConfig struct {
    Language  string            `yaml:"language"`
    BuildPath string            `yaml:"buildpath"`
    Ports     []Port            `yaml:"ports"`
    Envs      map[string]string `yaml:"envs"`
    Cmd       string            `yaml:"cmd"`
    Services  []*Service        `yaml:"services"`
}

RainbondFileConfig 云帮源码配置文件

func ReadRainbondFile Uses

func ReadRainbondFile(homepath string) (*RainbondFileConfig, error)

ReadRainbondFile 读取云帮代码配置

type Service Uses

type Service struct {
    Name  string            `yaml:"name"`
    Ports []Port            `yaml:"ports"`
    Envs  map[string]string `yaml:"envs"`
}

Service contains

type Specification Uses

type Specification struct {
    //是否符合规范
    Conform bool
    //不符合项目 解决方式
    Noconform map[string]string
    //建议规范项目 处理方式
    Advice map[string]string
}

Specification 规范

func CheckCodeSpecification Uses

func CheckCodeSpecification(buildPath string, lang Lang) Specification

CheckCodeSpecification 检查语言规范

Directories

PathSynopsis
multisvc

Package code imports 8 packages (graph) and is imported by 4 packages. Updated 2019-12-11. Refresh now. Tools for package owners.