utils

package
v0.0.0-...-40ccd29 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Python3 is the type used for Python3
	Python3 string = "Python3"

	// Java11 is the type used for Java11
	Java11 string = "Java11"

	// Golang is the type used for Golang
	Golang string = "Golang"

	// NodeJS is the type used for NodeJS
	NodeJS string = "NodeJS"
)
View Source
const (
	// Python3Image is the type used for Python3Image
	Python3Image string = "spaceuptech/runtime-python:latest"

	// Java11Image is the type used for Java11Image
	Java11Image string = "spaceuptech/runtime-java:latest"

	// GolangImage is the type used for GolangImage
	GolangImage string = "spaceuptech/runtime-golang:latest"

	// NodeJSImage is the type used for NodeJSImage
	NodeJSImage string = "spaceuptech/runtime-node:latest"

	// WebAppImage is the type used for WebAppImage
	WebAppImage string = "spaceuptech/runtime-web-app:latest"
)
View Source
const (
	// KindService is the kind used for a Service
	KindService string = "service"

	// KindWebApp is the kind used for a WebApp
	KindWebApp string = "web-app"
)
View Source
const BuildVersion = "0.1.1"

BuildVersion is the current version of Space Cli

View Source
const DefaultConfigFilePath string = "deployer.yaml"

DefaultConfigFilePath is the default path to load / store the config file

View Source
const ZipName string = "SPACEzip.zip"

ZipName is the name of the temporary zip file created

Variables

This section is empty.

Functions

func Deploy

func Deploy(name string, cluster *model.Cluster, conf *model.Deploy) error

Deploy deploys the archive and config to the space cloud clusters

func GetGlobalConfigDir

func GetGlobalConfigDir() string

func GetGlobalConfigFile

func GetGlobalConfigFile() string

func SendToCluster

func SendToCluster(token, url, zip string, conf []byte) error

SendToCluster sends the config & archive to the space cloud cluster

func ZipFiles

func ZipFiles(filename string, files []string) error

ZipFiles creates an archive based on list of file paths provided

Types

type Ignore

type Ignore struct {
	// contains filtered or unexported fields
}

Ignore is the instance used to selectively add files to archive

func NewIgnore

func NewIgnore(ignoreFile string) (*Ignore, error)

NewIgnore creates a new Ignore instance

func (*Ignore) GetFileList

func (i *Ignore) GetFileList(workingDir string) ([]string, error)

GetFileList fetches the file list after applying the ignore rule

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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