file

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 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 IsDir added in v0.0.10

func IsDir(path string) bool

IsDir return true if path is directory

func IsGit

func IsGit(path string) bool

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

func IsGitFile added in v0.0.10

func IsGitFile(path string) (string, string)

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
	Namespace   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"`
		PullPolicy     string `yaml:"pull-policy"`
		Namespace      string
		Runtime        string
		Buildtimeout   string
		Environment    map[string]string
		EnvSecrets     []string `yaml:"env-secrets"`
		Annotations    map[string]string
	}
	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
	Source      string
	Runtime     string
	Concurrency int
	Buildargs   []string
	Description string
	Labels      []string
	Environment map[string]string
	EnvSecrets  []string `yaml:"env-secrets"`
	Annotations map[string]string
	Events      []map[string]interface{}
}

Function describes function definition in serverless format

type Schedule added in v0.0.10

type Schedule struct {
	Rate string
	Data string
}

Jump to

Keyboard shortcuts

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