faas-cli: github.com/openfaas/faas-cli/proxy Index | Files

package proxy

import "github.com/openfaas/faas-cli/proxy"

Index

Package Files

auth.go delete.go deploy.go describe.go function_store.go invoke.go list.go logs.go proxy.go secret.go utils.go version.go

func CreateSecret Uses

func CreateSecret(gateway string, secret types.Secret, tlsInsecure bool) (int, string)

CreateSecret create secret

func CreateSecretToken Uses

func CreateSecretToken(gateway string, secret types.Secret, tlsInsecure bool, token string) (int, string)

CreateSecretToken create secret with token as auth

func DeleteFunction Uses

func DeleteFunction(gateway string, functionName string, tlsInsecure bool, namespace string) error

DeleteFunction delete a function from the OpenFaaS server

func DeleteFunctionToken Uses

func DeleteFunctionToken(gateway string, functionName string, tlsInsecure bool, token string, namespace string) error

DeleteFunctionToken delete a function with token as auth

func Deploy Uses

func Deploy(spec *DeployFunctionSpec, update bool, warnInsecureGateway bool) (int, string)

Deploy a function to an OpenFaaS gateway over REST

func DeployFunction Uses

func DeployFunction(spec *DeployFunctionSpec) int

DeployFunction first tries to deploy a function and if it exists will then attempt a rolling update. Warnings are suppressed for the second API call (if required.)

func FunctionStoreList Uses

func FunctionStoreList(store string) ([]schema.StoreItem, error)

FunctionStoreList returns functions from a store URL

func GetFunctionInfo Uses

func GetFunctionInfo(gateway string, functionName string, tlsInsecure bool, namespace string) (types.FunctionStatus, error)

GetFunctionInfo get an OpenFaaS function information

func GetFunctionInfoToken Uses

func GetFunctionInfoToken(gateway string, functionName string, tlsInsecure bool, token string, namespace string) (types.FunctionStatus, error)

GetFunctionInfoToken get a function information with a token as auth

func GetLogs Uses

func GetLogs(gateway string, tlsInsecure bool, params logs.Request, token string) (<-chan logs.Message, error)

GetLogs list deployed functions

func GetSecretList Uses

func GetSecretList(gateway string, tlsInsecure bool, namespace string) ([]types.Secret, error)

GetSecretList get secrets list

func GetSecretListToken Uses

func GetSecretListToken(gateway string, tlsInsecure bool, token, namespace string) ([]types.Secret, error)

GetSecretListToken get secrets lists with taken as auth

func GetSystemInfo Uses

func GetSystemInfo(gateway string, tlsInsecure bool, token string) (map[string]interface{}, error)

GetSystemInfo get system information from /system/info endpoint

func InvokeFunction Uses

func InvokeFunction(gateway string, name string, bytesIn *[]byte, contentType string, query []string, headers []string, async bool, httpMethod string, tlsInsecure bool) (*[]byte, error)

InvokeFunction a function

func ListFunctions Uses

func ListFunctions(gateway string, tlsInsecure bool, namespace string) ([]types.FunctionStatus, error)

ListFunctions list deployed functions

func ListFunctionsToken Uses

func ListFunctionsToken(gateway string, tlsInsecure bool, token string, namespace string) ([]types.FunctionStatus, error)

ListFunctionsToken list deployed functions with a token as auth

func MakeHTTPClient Uses

func MakeHTTPClient(timeout *time.Duration, tlsInsecure bool) http.Client

MakeHTTPClient makes a HTTP client with good defaults for timeouts.

func RemoveSecret Uses

func RemoveSecret(gateway string, secret types.Secret, tlsInsecure bool) error

RemoveSecret remove a secret via the OpenFaaS API by name

func RemoveSecretToken Uses

func RemoveSecretToken(gateway string, secret types.Secret, tlsInsecure bool, token string) error

RemoveSecretToken remove a secret with token as auth

func SetAuth Uses

func SetAuth(req *http.Request, gateway string)

SetAuth sets basic auth for the given gateway

func SetToken Uses

func SetToken(req *http.Request, token string)

SetToken sets authentication token

func UpdateSecret Uses

func UpdateSecret(gateway string, secret types.Secret, tlsInsecure bool) (int, string)

UpdateSecret update a secret via the OpenFaaS API by name

func UpdateSecretToken Uses

func UpdateSecretToken(gateway string, secret types.Secret, tlsInsecure bool, token string) (int, string)

UpdateSecretToken update a secret with token as auth

type DeployFunctionSpec Uses

type DeployFunctionSpec struct {
    FProcess                string
    Gateway                 string
    FunctionName            string
    Image                   string
    RegistryAuth            string
    Language                string
    Replace                 bool
    EnvVars                 map[string]string
    Network                 string
    Constraints             []string
    Update                  bool
    Secrets                 []string
    Labels                  map[string]string
    Annotations             map[string]string
    FunctionResourceRequest FunctionResourceRequest
    ReadOnlyRootFilesystem  bool
    TLSInsecure             bool
    Token                   string
    Namespace               string
}

DeployFunctionSpec defines the spec used when deploying a function

type FunctionResourceRequest Uses

type FunctionResourceRequest struct {
    Limits   *stack.FunctionResources
    Requests *stack.FunctionResources
}

FunctionResourceRequest defines a request to set function resources

Package proxy imports 20 packages (graph) and is imported by 2 packages. Updated 2019-10-18. Refresh now. Tools for package owners.