commands

package
v0.0.0-...-706a057 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2018 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MigrateSuccessMessage = "Successfully migrated func.yaml and created a back up func.yaml.bak"
	MigrateFailureMessage = "you have an up to date func.yaml file and do not need to migrate"
)
View Source
const FnInvokeEndpointAnnotation = "fnproject.io/fn/invokeEndpoint"

FnInvokeEndpointAnnotation is the annotation that exposes the fn invoke endpoint as defined in models/fn.go

Variables

View Source
var Commands = cmd{
	"build":        BuildCommand(),
	"build-server": BuildServerCommand(),
	"bump":         common.BumpCommand(),
	"call":         CallCommand(),
	"invoke":       InvokeCommand(),
	"configure":    ConfigureCommand(),
	"create":       CreateCommand(),
	"delete":       DeleteCommand(),
	"deploy":       DeployCommand(),
	"get":          GetCommand(),
	"init":         InitCommand(),
	"inspect":      InspectCommand(),
	"list":         ListCommand(),
	"migrate":      MigrateCommand(),
	"push":         PushCommand(),
	"start":        StartCommand(),
	"stop":         StopCommand(),
	"unset":        UnsetCommand(),
	"update":       UpdateCommand(),
	"use":          UseCommand(),
}

Commands map of all top-level commands

View Source
var ConfigCmds = cmd{
	"apps":      app.SetConfig(),
	"functions": fn.SetConfig(),
}
View Source
var ConfigGetCmds = cmd{
	"apps":      app.GetConfig(),
	"functions": fn.GetConfig(),
}
View Source
var ConfigListCmds = cmd{
	"apps":      app.ListConfig(),
	"functions": fn.ListConfig(),
}
View Source
var ConfigSetCmds = cmd{
	"apps":      app.SetConfig(),
	"functions": fn.SetConfig(),
}
View Source
var ConfigUnsetCmds = cmd{
	"apps":      app.UnsetConfig(),
	"functions": fn.UnsetConfig(),
}
View Source
var CreateCmds = cmd{
	"apps":      app.Create(),
	"functions": fn.Create(),
	"triggers":  trigger.Create(),
	"context":   context.Create(),
}
View Source
var DeleteCmds = cmd{
	"apps":      app.Delete(),
	"functions": fn.Delete(),
	"context":   context.Delete(),
	"triggers":  trigger.Delete(),
}
View Source
var GetCmds = cmd{
	"config": ConfigCommand("get"),
	"logs":   log.Get(),
	"calls":  call.Get(),
}
View Source
var InspectCmds = cmd{
	"apps":      app.Inspect(),
	"context":   context.Inspect(),
	"functions": fn.Inspect(),
	"triggers":  trigger.Inspect(),
}
View Source
var InvokeFnFlags = []cli.Flag{
	cli.StringFlag{
		Name:  "endpoint",
		Usage: "Specify the function invoke endpoint for this function, the app-name and func-name parameters will be ignored",
	},
	cli.StringFlag{
		Name:  "method",
		Usage: "Http method for function",
	},
	cli.StringFlag{
		Name:  "content-type",
		Usage: "The payload Content-Type for the function invocation.",
	},
	cli.BoolFlag{
		Name:  "display-call-id",
		Usage: "whether display call ID or not",
	},
}

InvokeFnFlags used to invoke and fn

View Source
var ListCmds = cmd{
	"config":    ConfigCommand("list"),
	"apps":      app.List(),
	"functions": fn.List(),
	"triggers":  trigger.List(),
	"calls":     call.List(),
	"contexts":  context.List(),
}
View Source
var UnsetCmds = cmd{
	"config":  ConfigCommand("unset"),
	"context": context.Unset(),
}
View Source
var UpdateCmds = cmd{
	"apps":      app.Update(),
	"functions": fn.Update(),
	"context":   context.Update(),
	"server":    server.Update(),
	"trigger":   trigger.Update(),
}
View Source
var UseCmds = cmd{
	"context": context.Use(),
}

Functions

func BuildCommand

func BuildCommand() cli.Command

BuildCommand returns build cli.command

func BuildServerCommand

func BuildServerCommand() cli.Command

BuildServerCommand returns build server cli.command

func CallCommand

func CallCommand() cli.Command

CallCommand returns call cli.command

func ConfigCommand

func ConfigCommand(command string) cli.Command

ConfigCommand returns config cli.command dependant on command parameter

func ConfigureCommand

func ConfigureCommand() cli.Command

ConfigureCommand returns configure cli.command

func CreateCommand

func CreateCommand() cli.Command

CreateCommand returns create cli.command

func DeleteCommand

func DeleteCommand() cli.Command

DeleteCommand returns delete cli.command

func DeployCommand

func DeployCommand() cli.Command

DeployCommand returns deploy cli.command

func GetCommand

func GetCommand() cli.Command

GetCommand returns get cli.command

func GetCommands

func GetCommands(commands map[string]cli.Command) []cli.Command

GetCommands returns a list of cli.commands

func InitCommand

func InitCommand() cli.Command

InitCommand returns init cli.command

func InspectCommand

func InspectCommand() cli.Command

InspectCommand returns inspect cli.command

func InvokeCommand

func InvokeCommand() cli.Command

InvokeCommand returns call cli.command

func ListCommand

func ListCommand() cli.Command

ListCommand returns list cli.command

func MigrateCommand

func MigrateCommand() cli.Command

func PushCommand

func PushCommand() cli.Command

PushCommand returns push cli.command

func StartCommand

func StartCommand() cli.Command

StartCommand returns start server cli.command

func StopCommand

func StopCommand() cli.Command

StopCommand returns stop server cli.command

func UnsetCommand

func UnsetCommand() cli.Command

UnsetCommand returns unset cli.command

func UpdateCommand

func UpdateCommand() cli.Command

UpdateCommand returns update cli.command

func UseCommand

func UseCommand() cli.Command

UseCommand returns use cli.command

func ValidateFuncName

func ValidateFuncName(name string) error

ValidateFuncName checks if the func name is valid, the name can't contain a colon and must be all lowercase

func VersionCommand

func VersionCommand() cli.Command

VersionCommand

Types

type BuildServerCmd

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

Jump to

Keyboard shortcuts

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