common

package
v0.0.0-...-8bcec81 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	API_VERSION     string
	SSL_SKIP_VERIFY bool
	JWT_AUTH_KEY    string
	API_URL         string
	SCHEME          string
	INITIAL_VERSION string
	HOST            string
	BASE_PATH       string
)
View Source
var AcceptableFnRuntimes = map[string]string{
	"elixir":           "iron/elixir",
	"erlang":           "iron/erlang",
	"gcc":              "iron/gcc",
	"go":               "iron/go",
	"java":             "iron/java",
	"leiningen":        "iron/leiningen",
	"mono":             "iron/mono",
	"node":             "iron/node",
	"perl":             "iron/perl",
	"php":              "iron/php",
	"python":           "iron/python:2",
	"ruby":             "iron/ruby",
	"scala":            "iron/scala",
	"rust":             "corey/rust-alpine",
	"dotnet":           "microsoft/dotnet:runtime",
	"lambda-nodejs4.3": "iron/functions-lambda:nodejs4.3",
}
View Source
var (
	Validfn = [...]string{
		"func.yaml",
		"func.yml",
		"func.json",
	}
)

Functions

func ApiClient

func ApiClient() *fnclient.Functions

func AppNamePath

func AppNamePath(img string) (string, string)

func Dockerpush

func Dockerpush(ff *Funcfile) error

func EncodeFuncfileYAML

func EncodeFuncfileYAML(path string, ff *Funcfile) error

func Exists

func Exists(name string) bool

func ExtractEnvConfig

func ExtractEnvConfig(configs []string) map[string]string

func FindFuncfile

func FindFuncfile(path string) (string, error)

func GetBasePath

func GetBasePath(version string) string

func ResetBasePath

func ResetBasePath(c *functions.Configuration) error

func SetEnv

func SetEnv()

func StoreFuncfile

func StoreFuncfile(path string, ff *Funcfile) error

func Verbwriter

func Verbwriter(verbose bool) io.Writer

Types

type Funcfile

type Funcfile struct {
	Name           string            `yaml:"name,omitempty" json:"name,omitempty"`
	Version        string            `yaml:"version,omitempty" json:"version,omitempty"`
	Runtime        *string           `yaml:"runtime,omitempty" json:"runtime,omitempty"`
	Entrypoint     string            `yaml:"entrypoint,omitempty" json:"entrypoint,omitempty"`
	Cmd            string            `yaml:"cmd,omitempty" json:"cmd,omitempty"`
	Type           *string           `yaml:"type,omitempty" json:"type,omitempty"`
	Memory         *int64            `yaml:"memory,omitempty" json:"memory,omitempty"`
	Format         *string           `yaml:"format,omitempty" json:"format,omitempty"`
	Timeout        *time.Duration    `yaml:"timeout,omitempty" json:"timeout,omitempty"`
	IDLETimeout    *time.Duration    `yaml:"idle_timeout,omitempty" json:"idle_timeout,omitempty"`
	Headers        map[string]string `yaml:"headers,omitempty" json:"headers,omitempty"`
	Config         map[string]string `yaml:"config,omitempty" json:"config,omitempty"`
	Build          []string          `yaml:"build,omitempty" json:"build,omitempty"`
	Tests          []fftest          `yaml:"tests,omitempty" json:"tests,omitempty"`
	Path           *string           `yaml:"path,omitempty" json:"path,omitempty"`
	MaxConcurrency *int              `yaml:"max_concurrency,omitempty" json:"max_concurrency,omitempty"`
	JwtKey         *string           `yaml:"jwt_key,omitempty" json:"jwt_key,omitempty"`
}

func Buildfunc

func Buildfunc(verbwriter io.Writer, fn string) (*Funcfile, error)

func LoadFuncfile

func LoadFuncfile() (*Funcfile, error)

func ParseFuncfile

func ParseFuncfile(path string) (*Funcfile, error)

func (*Funcfile) Bumpversion

func (ff *Funcfile) Bumpversion() error

func (*Funcfile) FullName

func (ff *Funcfile) FullName() string

func (*Funcfile) RuntimeTag

func (ff *Funcfile) RuntimeTag() (runtime, tag string)

type NotFoundError

type NotFoundError struct {
	S string
}

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Jump to

Keyboard shortcuts

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