file

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clone

func Clone(url string) (string, error)

Clone runs `git clone` operation for specified URL and returns local path to repository root directory

func Download

func Download(url string) (string, error)

Download receives URL and return path to saved file

func IsGit

func IsGit(path string) bool

IsGit most likely return true if path is URL to git repository

func IsLocal

func IsLocal(path string) bool

IsLocal return true if path is local filesystem

func IsRegistry

func IsRegistry(path string) bool

IsRegistry return true if path "behaves" like URL to docker registry

func IsRemote

func IsRemote(path string) bool

IsRemote return true if path is URL

Types

type Copy

type Copy struct {
	Pod         string
	Container   string
	Source      string
	Destination string
}

Copy contains information to copy local path to remote destination

func (*Copy) RemoteExec

func (c *Copy) RemoteExec(clientset *client.ConfigSet, command string, file io.Reader) (string, string, error)

RemoteExec executes command on remote pod and returns stdout and stderr output

func (*Copy) Upload

func (c *Copy) Upload(clientset *client.ConfigSet) error

Upload receives Copy structure, creates tarball of local source path and uploads it to active (un)tar process on remote pod

type Definition added in v0.0.8

type Definition struct {
	Service     string
	Description string
	Provider    struct {
		Name           string
		Registry       string
		RegistrySecret string `yaml:"registry-secret"`
		Namespace      string
		Runtime        string
		Environment    map[string]string
		MemorySize     int
	}
	Repository string
	Functions  map[string]Function
	Include    []string
}

Definition represents serverless.yaml file structure

func ParseServerlessYAML

func ParseServerlessYAML(path string) (Definition, error)

ParseServerlessYAML accepts serverless yaml file path and returns decoded structure

type Function

type Function struct {
	Handler     string
	Runtime     string
	Buildargs   []string
	Description string
	Labels      []string
	Environment map[string]string
}

Function describes function definition in serverless format

Jump to

Keyboard shortcuts

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