Documentation ¶
Overview ¶
Copyright (c) Alex Ellis 2017. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.
Index ¶
- Constants
- Variables
- func Execute(customArgs []string)
- func GetDefaultCLITransport(tlsInsecure bool, timeout *time.Duration) *http.Transport
- func JSONFormatMessage(msg logs.Message, timeFormat string, includeName, includeInstance bool) string
- func KeyValueFormatMessage(msg logs.Message, timeFormat string, includeName, includeInstance bool) string
- func NewCLIAuth(token string, gateway string) proxy.ClientAuth
- func PlainFormatMessage(msg logs.Message, timeFormat string, includeName, includeInstance bool) string
- func PullTemplates(templateURL string) error
- type BasicAuth
- type BearerToken
- type CLIAuth
- type ClientCredentialsReq
- type ClientCredentialsToken
- type DeployFlags
- type LogFormatter
- type TemplateInfo
Constants ¶
const DefaultTemplateRepository = "https://github.com/openfaas/templates.git"
DefaultTemplateRepository contains the Git repo for the official templates
const (
// DefaultTemplatesStore is the URL where the official store can be found
DefaultTemplatesStore = "https://raw.githubusercontent.com/openfaas/store/master/templates.json"
)
const (
// NoTLSWarn Warning thrown when no SSL/TLS is used
NoTLSWarn = "WARNING! Communication is not secure, please consider using HTTPS. Letsencrypt.org offers free SSL/TLS certificates."
)
Variables ¶
var ( //Platform platform variable updated at build time Platform string )
Functions ¶
func GetDefaultCLITransport ¶
func JSONFormatMessage ¶
func JSONFormatMessage(msg logs.Message, timeFormat string, includeName, includeInstance bool) string
JSONFormatMessage is a JSON formatting for log messages, the options are ignored and the entire log message json serialized
func KeyValueFormatMessage ¶
func KeyValueFormatMessage(msg logs.Message, timeFormat string, includeName, includeInstance bool) string
KeyValueFormatMessage returns the message in the format "timestamp=<> name=<> instance=<> message=<>"
func NewCLIAuth ¶
func NewCLIAuth(token string, gateway string) proxy.ClientAuth
NewCLIAuth returns a new CLI Auth
func PlainFormatMessage ¶
func PlainFormatMessage(msg logs.Message, timeFormat string, includeName, includeInstance bool) string
PlainFormatMessage formats a log message as "<timestamp> <name> (<instance>) <text>"
func PullTemplates ¶
PullTemplates pulls templates from specified git remote. templateURL may be a pinned repository.
Types ¶
type BasicAuth ¶
type BasicAuth struct {
// contains filtered or unexported fields
}
BasicAuth basic authentication type
type BearerToken ¶
type BearerToken struct {
// contains filtered or unexported fields
}
BearerToken bearer token
type ClientCredentialsReq ¶
type ClientCredentialsToken ¶
type DeployFlags ¶
type DeployFlags struct {
// contains filtered or unexported fields
}
DeployFlags holds flags that are to be added to commands.
type LogFormatter ¶
type LogFormatter func(msg logs.Message, timeFormat string, includeName, includeInstance bool) string
LogFormatter is a function that converts a log message to a string based on the supplied options
func GetLogFormatter ¶
func GetLogFormatter(name string) LogFormatter
GetLogFormatter maps a formatter name to a LogFormatter method
type TemplateInfo ¶
type TemplateInfo struct { TemplateName string `json:"template"` Platform string `json:"platform"` Language string `json:"language"` Source string `json:"source"` Description string `json:"description"` Repository string `json:"repo"` Official string `json:"official"` }
TemplateInfo is the definition of a template which is part of the store
Source Files ¶
- auth.go
- bash_completion.go
- build.go
- cloud.go
- completion.go
- deploy.go
- describe.go
- errors.go
- faas.go
- fetch_templates.go
- general.go
- generate.go
- invoke.go
- list.go
- login.go
- logout.go
- logs.go
- logs_format.go
- namespaces.go
- new_function.go
- priority.go
- push.go
- remove.go
- secret.go
- secret_create.go
- secret_list.go
- secret_remove.go
- secret_update.go
- store.go
- store_deploy.go
- store_inspect.go
- store_list.go
- template.go
- template_pull.go
- template_pull_stack.go
- template_store.go
- template_store_describe.go
- template_store_list.go
- template_store_pull.go
- up.go
- update_gitignore.go
- validate.go
- version.go