code

package
v0.0.0-...-a3a5c94 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

ErrCodeDirNotExist Code directory does not exist

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

ErrCodeNotExist Code is empty error

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

ErrCodeUnableIdentify The code does not recognize the language

View Source
var ErrKatoFileNotFound = fmt.Errorf("kato file not found")

ErrKatoFileNotFound kato file not found

View Source
var ErrRuntimeNotSupport = fmt.Errorf("runtime version not supported")

ErrRuntimeNotSupport runtime not supported

Functions

func CheckDependencies

func CheckDependencies(buildPath string, lang Lang) bool

CheckDependencies check dependencies with lang

func CheckProcfile

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

CheckProcfile check runtime with lang

func CheckRuntime

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

CheckRuntime

Types

type KatoFileConfig

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

KatoFileConfig - source code configuration file

func ReadKatoFile

func ReadKatoFile(homepath string) (*KatoFileConfig, error)

ReadKatoFile - read cloud help code configuration

type Lang

type Lang string

Lang Language type

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 Empty language type

var NetCore Lang = ".NetCore"

NetCore Lang

var NodeJSStatic Lang = "NodeJSStatic"

NodeJSStatic static Lang

var Nodejs Lang = "Node.js"

Nodejs Lang

var OSS Lang = "OSS"

OSS 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

func GetLangType(homepath string) (Lang, error)

GetLangType check code lang

func (Lang) String

func (l Lang) String() string

String return lang string

type Port

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

Port

type Service

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

Service contains

type Specification

type Specification struct {
	//Whether it meets the specification
	Conform bool
	//Non-conforming project solution
	Noconform map[string]string
	//Proposal to standardize the project
	Advice map[string]string
}

Specification

func CheckCodeSpecification

func CheckCodeSpecification(buildPath string, lang Lang) Specification

CheckCodeSpecification

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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