commands

package
v0.0.0-...-83de85e Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 64 Imported by: 8

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

View Source
const DefaultTemplateRepository = "https://github.com/openfaas/templates.git"

DefaultTemplateRepository contains the Git repo for the official templates

View Source
const (
	// DefaultTemplatesStore is the URL where the official store can be found
	DefaultTemplatesStore = "https://raw.githubusercontent.com/openfaas/store/master/templates.json"
)
View Source
const (
	// NoTLSWarn Warning thrown when no SSL/TLS is used
	NoTLSWarn = "WARNING! You are not using an encrypted connection to the gateway, consider using HTTPS."
)

Variables

View Source
var (

	//Platform platform variable set at build time
	Platform string
)

Functions

func Execute

func Execute(customArgs []string)

func GetDefaultCLITransport

func GetDefaultCLITransport(tlsInsecure bool, timeout *time.Duration) *http.Transport

func GetDefaultSDKClient

func GetDefaultSDKClient() (*sdk.Client, error)

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 PlainFormatMessage

func PlainFormatMessage(msg logs.Message, timeFormat string, includeName, includeInstance bool) string

PlainFormatMessage formats a log message as "<timestamp> <name> (<instance>) <text>"

Types

type Auth

type Auth struct {
	Base64AuthString string `json:"auth"`
}

type Cancel

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

Cancel is a struct to hold a reference to a context and cancellation function between closures

func (*Cancel) Cancel

func (c *Cancel) Cancel()

func (*Cancel) Set

func (c *Cancel) Set(ctx context.Context, cancel context.CancelFunc)

type DeployFlags

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

DeployFlags holds flags that are to be added to commands.

type ECRRegistryAuth

type ECRRegistryAuth struct {
	CredsStore  string            `json:"credsStore"`
	CredHelpers map[string]string `json:"credHelpers"`
}

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 NamespaceCreateFlags

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

NamespaceCreateFlags holds flags that are to be added to commands.

type NamespaceUpdateFlags

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

NamespaceUpdateFlags holds flags that are to be added to commands.

type RegistryAuth

type RegistryAuth struct {
	AuthConfigs map[string]Auth `json:"auths"`
}

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"`
	Recommended  bool   `json:"recommended"`
}

TemplateInfo is the definition of a template which is part of the store

Jump to

Keyboard shortcuts

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